Skip to content

Commit 3b536dc

Browse files
authored
Merge pull request #20168 from abdurrehman107/abdur-rehman/20250612-add-makefile-target-for-release-yaml
[release-3.5] Add test-release makefile target
2 parents 9592a90 + b9350f4 commit 3b536dc

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ test-e2e:
179179
test-e2e-release:
180180
PASSES="build release e2e" ./test.sh $(GO_TEST_FLAGS)
181181

182+
.PHONY: test-release
183+
test-release:
184+
PASSES="release_tests" ./test.sh $(GO_TEST_FLAGS)
185+
182186
ensure-docker-test-image-exists:
183187
make pull-docker-test || ( echo "WARNING: Container Image not found in registry, building locally"; make build-docker-test )
184188

test.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,34 @@ function release_pass {
687687
mv /tmp/etcd ./bin/etcd-last-release
688688
}
689689

690+
function release_tests_pass {
691+
if [ -z "${VERSION:-}" ]; then
692+
VERSION=$(go list -m go.etcd.io/etcd/api/v3 2>/dev/null | \
693+
awk '{split(substr($2,2), a, "."); print a[1]"."a[2]".99"}')
694+
fi
695+
696+
if [ -n "${CI:-}" ]; then
697+
git config user.email "[email protected]"
698+
git config user.name "Prow"
699+
700+
gpg --batch --gen-key <<EOF
701+
%no-protection
702+
Key-Type: 1
703+
Key-Length: 2048
704+
Subkey-Type: 1
705+
Subkey-Length: 2048
706+
Name-Real: Prow
707+
Name-Email: [email protected]
708+
Expire-Date: 0
709+
EOF
710+
711+
git remote add origin https://github.com/etcd-io/etcd.git
712+
fi
713+
714+
DRY_RUN=true run "${ETCD_ROOT_DIR}/scripts/release.sh" --no-upload --no-docker-push --no-gh-release --in-place "${VERSION}"
715+
VERSION="${VERSION}" run "${ETCD_ROOT_DIR}/scripts/test_images.sh"
716+
}
717+
690718
function mod_tidy_for_module {
691719
# Watch for upstream solution: https://github.com/golang/go/issues/27005
692720
local tmpModDir

0 commit comments

Comments
 (0)