-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from kubevirt-bot/cherry-pick-62-to-release-v1.2
[release-v1.2] Add requirement for release tool for safe publishing
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
|
||
source $(dirname "$0")/build/common.sh | ||
source $(dirname "$0")/build/config.sh | ||
|
||
set -e | ||
|
||
if [ -z "${AAQ_CRI}" ]; then | ||
echo >&2 "no working container runtime found. Neither docker nor podman seems to work." | ||
exit 1 | ||
fi | ||
|
||
if [ -z ${GPG_PRIVATE_KEY_FILE} ]; then | ||
echo "GPG_PRIVATE_KEY_FILE env var must be set" | ||
exit 1 | ||
elif [ -z ${GPG_PASSPHRASE_FILE} ]; then | ||
echo "GPG_PASSPHRASE_FILE env var must be set" | ||
exit 1 | ||
elif [ -z ${GITHUB_API_TOKEN_FILE} ]; then | ||
echo "GITHUB_API_TOKEN_FILE env var must be set" | ||
exit 1 | ||
fi | ||
|
||
GIT_USER=${GIT_USER:-$(git config user.name)} | ||
GIT_EMAIL=${GIT_EMAIL:-$(git config user.email)} | ||
|
||
echo "git user: $GIT_USER" | ||
echo "git email: $GIT_EMAIL" | ||
|
||
${AAQ_CRI} pull quay.io/kubevirtci/release-tool:latest | ||
|
||
echo "${AAQ_CRI} run -it --rm \ | ||
-v ${GPG_PRIVATE_KEY_FILE}:/home/releaser/gpg-private \ | ||
-v ${GPG_PASSPHRASE_FILE}:/home/releaser/gpg-passphrase \ | ||
-v ${GITHUB_API_TOKEN_FILE}:/home/releaser/github-api-token \ | ||
-v /home/.gitconfig:/home/releaser/.gitconfig \ | ||
quay.io/kubevirtci/release-tool:latest \ | ||
--org=kubevirt \ | ||
--repo=application-aware-quota \ | ||
--git-email \"${GIT_EMAIL}\" \ | ||
--git-user \"${GIT_USER}\" | ||
\"$@\"" | ||
|
||
${AAQ_CRI} run -it --rm \ | ||
-v ${GPG_PRIVATE_KEY_FILE}:/home/releaser/gpg-private \ | ||
-v ${GPG_PASSPHRASE_FILE}:/home/releaser/gpg-passphrase \ | ||
-v ${GITHUB_API_TOKEN_FILE}:/home/releaser/github-api-token \ | ||
-v /home/.gitconfig:/home/.gitconfig \ | ||
quay.io/kubevirtci/release-tool:latest \ | ||
--org=kubevirt \ | ||
--repo=application-aware-quota \ | ||
--git-email "${GIT_EMAIL}" \ | ||
--git-user "${GIT_USER}" \ | ||
"$@" |