CI: extract before_script
This commit is contained in:
@@ -8,14 +8,18 @@ variables:
|
|||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
build:
|
.prepare_build: &prepare_build
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- ls -l
|
- ls -l
|
||||||
- pwd
|
- pwd
|
||||||
- apk add bash
|
- apk add bash
|
||||||
- mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR"
|
- mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR"
|
||||||
- echo "Build Ubuntu 18 on all branches"
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
before_script:
|
||||||
|
- *prepare_build
|
||||||
|
script:
|
||||||
|
- echo "Always build Ubuntu 18"
|
||||||
- bash builder/build-distro ubuntu bionic
|
- bash builder/build-distro ubuntu bionic
|
||||||
- if echo "$CI_COMMIT_BRANCH" | grep -Eq '(release|testing)'; then
|
- if echo "$CI_COMMIT_BRANCH" | grep -Eq '(release|testing)'; then
|
||||||
echo "Build all distros";
|
echo "Build all distros";
|
||||||
|
|||||||
Reference in New Issue
Block a user