2021-01-18 20:12:23 +01:00
|
|
|
image: docker
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
|
2021-01-20 10:42:52 +01:00
|
|
|
variables:
|
|
|
|
GITLAB_SHARED_DIND_DIR: /builds/$CI_PROJECT_PATH/shared
|
|
|
|
|
2021-01-18 20:12:23 +01:00
|
|
|
stages:
|
|
|
|
- build
|
2021-01-20 10:42:52 +01:00
|
|
|
|
2021-03-18 10:56:03 +01:00
|
|
|
.prepare_build: &prepare_build
|
|
|
|
- ls -l
|
|
|
|
- pwd
|
|
|
|
- apk add bash
|
|
|
|
- mkdir -p "$GITLAB_SHARED_DIND_DIR" && chmod 777 "$GITLAB_SHARED_DIND_DIR"
|
|
|
|
|
2021-01-18 20:12:23 +01:00
|
|
|
build:
|
|
|
|
stage: build
|
2021-03-18 10:56:03 +01:00
|
|
|
before_script:
|
|
|
|
- *prepare_build
|
2021-01-18 20:12:23 +01:00
|
|
|
script:
|
2021-03-18 10:56:03 +01:00
|
|
|
- echo "Always build Ubuntu 18"
|
2021-03-15 09:33:57 +01:00
|
|
|
- bash builder/build-distro ubuntu bionic
|
|
|
|
- if echo "$CI_COMMIT_BRANCH" | grep -Eq '(release|testing)'; then
|
|
|
|
echo "Build all distros";
|
|
|
|
bash builder/build-distro ubuntu focal;
|
|
|
|
bash builder/build-distro debian buster;
|
|
|
|
bash builder/build-distro debian bullseye;
|
|
|
|
bash builder/build-distro kali kali-rolling;
|
|
|
|
fi
|
2021-01-18 20:12:23 +01:00
|
|
|
- mkdir output
|
2021-02-14 07:20:13 +01:00
|
|
|
- cp -r builder/build/* output/
|
2021-03-18 10:42:40 +01:00
|
|
|
- rm output/*.tar.gz
|
2021-01-18 20:12:23 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- output/
|