diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 74 |
1 files changed, 54 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4294ab0eadc..6aef87e07c7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,45 +1,45 @@ stages: - - lint - - build + - verify + - trigger variables: - GIT_STRATEGY: fetch - GIT_DEPTH: "0" + GIT_STRATEGY: clone + GIT_DEPTH: "500" -default: - # Make sure master points to the correct upstream commit - before_script: - - > - git fetch $CI_MERGE_REQUEST_PROJECT_URL - +refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME:refs/heads/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME +# only rune pipelines for merge requests or when tags are pushed (for triggers) +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_TAG lint: - stage: lint + stage: verify image: alpinelinux/apkbuild-lint-tools:latest + interruptible: true script: - - changed-aports $CI_MERGE_REQUEST_TARGET_BRANCH_NAME | lint + - lint allow_failure: true - only: - - merge_requests + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" tags: - docker-alpine - x86_64 .build: - stage: build + stage: verify image: alpinelinux/alpine-gitlab-ci:latest + interruptible: true script: - build.sh - - cp -ar ~/packages packages/ - - mkdir -p keys - - cp ~/.abuild/*.rsa.pub keys/ artifacts: paths: - packages/ - keys/ + - logs/ expire_in: 1 day - only: - - merge_requests + when: always + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" build-x86_64: extends: .build @@ -91,9 +91,43 @@ build-aarch64: build-armv7: extends: .build + image: + name: alpinelinux/alpine-gitlab-ci:latest-armv7 + entrypoint: ["linux32", "sh", "-c"] artifacts: name: MR${CI_MERGE_REQUEST_ID}_armv7 tags: - docker-alpine - ci-build - armv7 + +build-armhf: + extends: .build + image: + name: alpinelinux/alpine-gitlab-ci:latest-armhf + entrypoint: ["linux32", "sh", "-c"] + artifacts: + name: MR${CI_MERGE_REQUEST_ID}_armhf + tags: + - docker-alpine + - ci-build + - armhf + +build-riscv64: + extends: .build + artifacts: + name: MR${CI_MERGE_REQUEST_ID}_riscv64 + tags: + - docker-alpine + - ci-build + - riscv64 + +trigger_build_image: + stage: trigger + rules: + - if: $CI_COMMIT_TAG + variables: + APORTS_TAG: $CI_COMMIT_TAG + trigger: + project: clandmeter/alpine-disk-image + branch: master |