File tree 3 files changed +28
-4
lines changed
3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change 5
5
# ###
6
6
# ### Global variables used for all tasks
7
7
# ###
8
- # Name of the ultimate destination branch for this CI run, PR or post-merge.
9
- DEST_BRANCH : " main"
10
8
# Sane (default) value for GOPROXY and GOSUMDB.
11
9
GOPROXY : " https://proxy.golang.org,direct"
12
10
GOSUMDB : " sum.golang.org"
@@ -106,6 +104,11 @@ validate-source_task:
106
104
cd /
107
105
rm -rf $CIRRUS_WORKING_DIR
108
106
mkdir -p $CIRRUS_WORKING_DIR
107
+ if [[ -z "$CIRRUS_PR" ]]; then
108
+ DEST_BRANCH="$CIRRUS_BRANCH"
109
+ else
110
+ DEST_BRANCH="$CIRRUS_BASE_BRANCH"
111
+ fi
109
112
git clone --recursive --branch=$DEST_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR
110
113
cd $CIRRUS_WORKING_DIR
111
114
git remote update origin
@@ -772,7 +775,7 @@ podman_machine_windows_task:
772
775
<< : *windows
773
776
type : m5zn.metal
774
777
platform : windows
775
- timeout_in : 45m
778
+ timeout_in : 60m
776
779
env : *winenv
777
780
matrix :
778
781
- env :
@@ -795,7 +798,7 @@ podman_machine_mac_task:
795
798
skip : *skip_rhel_release
796
799
depends_on : *build
797
800
persistent_worker : *mac_pw
798
- timeout_in : 45m
801
+ timeout_in : 60m
799
802
env :
800
803
<< : *mac_env
801
804
DISTRO_NV : " darwin"
Original file line number Diff line number Diff line change 36
36
# Managed by setup_environment.sh; holds task-specific definitions.
37
37
if [[ -r " /etc/ci_environment" ]]; then source /etc/ci_environment; fi
38
38
39
+ # Set DEST_BRANCH automatically, this var used for many checks,
40
+ # i.e. to find out the merge base to do build/commit checks.
41
+ # To avoid having to set it manually for each branch try to
42
+ # generate based of the CIRRUS env.
43
+ # shellcheck disable=SC2154
44
+ if [[ -z " $CIRRUS_PR " ]]; then
45
+ # shellcheck disable=SC2154
46
+ DEST_BRANCH=" $CIRRUS_BRANCH "
47
+ else
48
+ # shellcheck disable=SC2154
49
+ DEST_BRANCH=" $CIRRUS_BASE_BRANCH "
50
+ fi
51
+ if [[ -z " ${DEST_BRANCH} " ]]; then
52
+ die " DEST_BRANCH is undefined, not running under cirrus?"
53
+ fi
54
+ msg " DEST_BRANCH is $DEST_BRANCH "
55
+ export DEST_BRANCH
56
+
57
+
39
58
# This is normally set from .cirrus.yml but default is necessary when
40
59
# running under hack/get_ci_vm.sh since it cannot infer the value.
41
60
DISTRO_NV=" ${DISTRO_NV:- $OS_REL_VER } "
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ set -eo pipefail
12
12
set -a
13
13
source /etc/automation_environment
14
14
source $AUTOMATION_LIB_PATH /common_lib.sh
15
+ # shellcheck source=contrib/cirrus/lib.sh
16
+ source $( dirname $0 ) /lib.sh
15
17
set +a
16
18
17
19
req_env_vars CI DEST_BRANCH IMAGE_SUFFIX TEST_FLAVOR TEST_ENVIRON \
You can’t perform that action at this time.
0 commit comments