Skip to content

Commit 77e5c6f

Browse files
joshjmsk8s-infra-cherrypick-robot
authored andcommitted
Add test-release-tests Makefile target
Signed-off-by: joshjms <[email protected]>
1 parent 5a9094c commit 77e5c6f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ test-grpcproxy-e2e: build
5454
test-e2e-release: build
5555
PASSES="release e2e" ./scripts/test.sh $(GO_TEST_FLAGS)
5656

57+
.PHONY: test-release
58+
test-release:
59+
PASSES="release_tests" CI=$$CI ./scripts/test.sh $(GO_TEST_FLAGS)
60+
5761
.PHONY: test-robustness
5862
test-robustness:
5963
PASSES="robustness" ./scripts/test.sh $(GO_TEST_FLAGS)

scripts/test.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,31 @@ function release_pass {
601601
mv /tmp/etcd ./bin/etcd-last-release
602602
}
603603

604+
function release_tests_pass {
605+
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"}')
606+
607+
if [ -n "${CI:-}" ]; then
608+
git config user.email "[email protected]"
609+
git config user.name "Prow"
610+
611+
gpg --batch --gen-key <<EOF
612+
%no-protection
613+
Key-Type: 1
614+
Key-Length: 2048
615+
Subkey-Type: 1
616+
Subkey-Length: 2048
617+
Name-Real: Prow
618+
Name-Email: [email protected]
619+
Expire-Date: 0
620+
EOF
621+
622+
git remote add origin https://github.com/etcd-io/etcd.git
623+
fi
624+
625+
DRY_RUN=true run "${ETCD_ROOT_DIR}/scripts/release.sh" --no-upload --no-docker-push --no-gh-release --in-place "${VERSION}"
626+
VERSION="${VERSION}" run "${ETCD_ROOT_DIR}/scripts/test_images.sh"
627+
}
628+
604629
function mod_tidy_for_module {
605630
run go mod tidy -diff
606631
}

0 commit comments

Comments
 (0)