From 9a9b14daf1646d1be3c6f0c7d3df2a4bf6a4a8b5 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Thu, 18 Mar 2021 22:56:03 +1300 Subject: [PATCH] CI: extract before_script --- .gitlab-ci.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b4b8489..2954a74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,14 +8,18 @@ variables: stages: - build +.prepare_build: &prepare_build + - ls -l + - pwd + - apk add bash + - mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR" + build: stage: build + before_script: + - *prepare_build script: - - ls -l - - pwd - - apk add bash - - mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR" - - echo "Build Ubuntu 18 on all branches" + - echo "Always build Ubuntu 18" - bash builder/build-distro ubuntu bionic - if echo "$CI_COMMIT_BRANCH" | grep -Eq '(release|testing)'; then echo "Build all distros";