Skip to content

Commit d610b04

Browse files
authored
Merge pull request #19815 from joshjms/add-test-release-tests-makefile-target
Add test-release-tests Makefile target
2 parents f5bc761 + 64cd6b6 commit d610b04

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ test-grpcproxy-e2e: build
5656
test-e2e-release: build
5757
PASSES="release e2e" ./scripts/test.sh $(GO_TEST_FLAGS)
5858

59+
.PHONY: test-release
60+
test-release:
61+
PASSES="release_tests" CI=$$CI ./scripts/test.sh $(GO_TEST_FLAGS)
62+
5963
.PHONY: test-robustness
6064
test-robustness:
6165
PASSES="robustness" ./scripts/test.sh $(GO_TEST_FLAGS)

scripts/test.sh

+25
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,31 @@ function release_pass {
623623
mv /tmp/etcd ./bin/etcd-last-release
624624
}
625625

626+
function release_tests_pass {
627+
VERSION=$(go list -m go.etcd.io/etcd/api/v3 2>/dev/null | awk '{split(substr($2,2), a, "."); print a[1]"."a[2]".99"}')
628+
629+
if [ -n "${CI:-}" ]; then
630+
git config user.email "[email protected]"
631+
git config user.name "Prow"
632+
633+
gpg --batch --gen-key <<EOF
634+
%no-protection
635+
Key-Type: 1
636+
Key-Length: 2048
637+
Subkey-Type: 1
638+
Subkey-Length: 2048
639+
Name-Real: Prow
640+
Name-Email: [email protected]
641+
Expire-Date: 0
642+
EOF
643+
644+
git remote add origin https://github.com/etcd-io/etcd.git
645+
fi
646+
647+
DRY_RUN=true run "${ETCD_ROOT_DIR}/scripts/release.sh" --no-upload --no-docker-push --no-gh-release --in-place "${VERSION}"
648+
VERSION="${VERSION}" run "${ETCD_ROOT_DIR}/scripts/test_images.sh"
649+
}
650+
626651
function mod_tidy_for_module {
627652
run go mod tidy -diff
628653
}

0 commit comments

Comments
 (0)