diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e134a1cf..6d05eeae3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -191,8 +191,8 @@ variables: value: "no" description: "If set to yes then all images will re-pull their base images and rebuild entirely from scratch with no caching." ENABLE_JOB_SKIPPING: - value: "true" - description: "If set to false then tests and lints will be forced to run and not use previously cached results." + value: "false" + description: "If set to true then tests and lints will skipped when safe to do so." ENABLE_COVERAGE: value: "true" description: "If set to false then tests will not generate coverage or testing reports used by gitlab to show nicer MRs." @@ -245,7 +245,7 @@ variables: CLOUDRON_DOCKERFILE_PATH: $CI_PROJECT_DIR/deploy/cloudron/Dockerfile HEROKU_DOCKERFILE_PATH: $CI_PROJECT_DIR/heroku.Dockerfile # The image path for the helper CI util image that will be built and pushed to. - CI_UTIL_IMAGE: $CI_IMAGE_REPO/ci_util_image:latest + CI_UTIL_IMAGE: registry.gitlab.com/bramw/baserow/ci/ci_util_image:latest # ==================================== CI UTIL ==================================== diff --git a/.gitlab/ci_includes/jobs.yml b/.gitlab/ci_includes/jobs.yml index 30cbde3f3..0a8a92428 100644 --- a/.gitlab/ci_includes/jobs.yml +++ b/.gitlab/ci_includes/jobs.yml @@ -434,6 +434,11 @@ exit 1 fi + if [[ -z "$PROJECT_READ_ONLY_API_TOKEN" && "$ENABLE_JOB_SKIPPING" = "true" ]]; then + echo -e "$RED Disabling job skipping as PROJECT_READ_ONLY_API_TOKEN env variable not set. $CLEAR" + ENABLE_JOB_SKIPPING=false + fi + # If we are doing a full rebuild then force run all the linting and tests. # Always do this on master as we are always doing a full image rebuild and hence # always need to run the tests. @@ -448,7 +453,7 @@ if [[ "$COMMIT_GITLAB_JOBS" ]]; then echo -e "\e[0Ksection_start:`date +%s`:$COMMIT_HASH$JOB_NAME[collapsed=true]\r\e[0KRaw job status download for $JOB_NAME and $COMMIT_HASH" echo "Got these job statuses: $COMMIT_GITLAB_JOBS" - JOB_ID=$(echo $COMMIT_GITLAB_JOBS| jq "[.[] | select(.status == \"success\")][0].id") + JOB_ID=$(echo $COMMIT_GITLAB_JOBS| jq "[.[] | select(.status == \"success\")][0].id" || '') echo -e "\e[0Ksection_end:`date +%s`:$COMMIT_HASH$JOB_NAME\r\e[0K" # Check if JOB_ID is an integer (POSIX compliant way)