forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·48 lines (39 loc) · 1.29 KB
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
source common.sh
set -e
fail_if_cri_bin_missing
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"
${KUBEVIRT_CRI} pull quay.io/kubevirtci/release-tool:latest
echo "${KUBEVIRT_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 \
kubevirtci/release-tool:latest \
--org=kubevirt \
--repo=kubevirt \
--git-email \"${GIT_EMAIL}\" \
--git-user \"${GIT_USER}\"
\"$@\""
${KUBEVIRT_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 \
quay.io/kubevirtci/release-tool:latest \
--org=kubevirt \
--repo=kubevirt \
--git-email "${GIT_EMAIL}" \
--git-user "${GIT_USER}" \
"$@"