summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2021-01-21 14:56:34 -0500
committerChris Evich <cevich@redhat.com>2021-01-27 10:35:27 -0500
commitbfc1b66be1f2717e997a84fc33386cf621525208 (patch)
tree651155045f7f9c689e6784015f65dc682396f28b /hack
parent5d444466e1b55edbf48a2ad4999d4564bc20d01f (diff)
downloadpodman-bfc1b66be1f2717e997a84fc33386cf621525208.tar.gz
podman-bfc1b66be1f2717e997a84fc33386cf621525208.tar.bz2
podman-bfc1b66be1f2717e997a84fc33386cf621525208.zip
Cirrus: Fix running Validate task on branches
Followup to dbb9943 Despite skipping the `Smoke` check, it was observed on a *new* branch, the `validate` task (specifically `git-validation`) will fail. This is because: * `$CIRRUS_LAST_GREEN_CHANGE` will be empty on a new branch. * `$CIRRUS_BASE_SHA` is always empty for runs triggered by branch-push * `$EPOCH_TEST_COMMIT` will be set to `YOU_FOUND_A_BUG`. Fix this by eliminating the `Smoke` task entirely, simplifying all the `make validate` operations into the `validate` cirrus task. Ensure this task does not run when a new branch or tag is pushed. Also, eliminate the `$CIRRUS_BUILD_ID` value as it's confusing and not actually used anywhere. It was formerly used for building VM images, but this has moved to another repo entirely. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'hack')
-rwxr-xr-xhack/get_ci_vm.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/hack/get_ci_vm.sh b/hack/get_ci_vm.sh
index d1e38eb35..4f6c42a06 100755
--- a/hack/get_ci_vm.sh
+++ b/hack/get_ci_vm.sh
@@ -157,11 +157,14 @@ parse_args(){
VM_IMAGE_NAME="$1"
- # Word-splitting is desirable in this case
- # shellcheck disable=SC2207
+ # Word-splitting is desirable in this case.
+ # Values are used literally (with '=') as args to future `env` command.
+ # get_env_vars() will take care of properly quoting it's output.
+ # shellcheck disable=SC2207,SC2191
ENVS=(
$(get_env_vars)
- "VM_IMAGE_NAME=$VM_IMAGE_NAME"
+ VM_IMAGE_NAME="$VM_IMAGE_NAME"
+ UPSTREAM_REMOTE="upstream"
)
VMNAME="${VMNAME:-${USER}-${VM_IMAGE_NAME}}"
@@ -263,7 +266,7 @@ echo -e "Note: Script can be re-used in another terminal if needed."
echo -e "${RED}(option to delete VM presented upon exiting).${NOR}"
# TODO: This is fairly fragile, specifically the quoting for the remote command.
echo '#!/bin/bash' > $TMPDIR/ssh
-echo "$SSH_CMD -- -t 'cd $GOSRC && exec env \"${ENVS[*]}\" bash -il'" >> $TMPDIR/ssh
+echo "$SSH_CMD -- -t 'cd $GOSRC && exec env ${ENVS[*]} bash -il'" >> $TMPDIR/ssh
chmod +x $TMPDIR/ssh
showrun $TMPDIR/ssh