121 lines
2.5 KiB
YAML
121 lines
2.5 KiB
YAML
workflow:
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
|
|
when: never
|
|
- if: "$CI_COMMIT_TAG"
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
when: never
|
|
- if: "$CI_COMMIT_BRANCH"
|
|
|
|
stages:
|
|
- base-images
|
|
- build
|
|
|
|
variables:
|
|
DOCKER_HOST: tcp://docker:2376
|
|
DOCKER_TLS_CERTDIR: /certs
|
|
DOCKER_TLS_VERIFY: 1
|
|
DOCKER_CERT_PATH: $DOCKER_TLS_CERTDIR/client
|
|
RUST_LOG_STYLE: always
|
|
BB_SIGNING_DRIVER: sigstore
|
|
BB_CACHE_LAYERS: 'true'
|
|
BB_BUILD_PUSH: 'true'
|
|
CLICOLOR_FORCE: 1
|
|
TAG: main
|
|
|
|
default:
|
|
services:
|
|
- docker:dind
|
|
interruptible: true
|
|
image: ghcr.io/blue-build/cli:$TAG
|
|
before_script:
|
|
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
|
|
- export COSIGN_PRIVATE_KEY=$(cat .secure_files/cosign.key)
|
|
- sleep 5
|
|
|
|
.build:
|
|
script:
|
|
- bluebuild build "./recipes/${RECIPE}"
|
|
|
|
base-images:
|
|
extends:
|
|
- .build
|
|
stage: base-images
|
|
variables:
|
|
BB_BUILD_RECHUNK: 'true'
|
|
rules:
|
|
# Run when any of the base recipes change
|
|
- changes:
|
|
- recipes/base*.yml
|
|
- recipes/base/*
|
|
- .gitlab-ci.yml
|
|
when: always
|
|
# Run on a scheduled pipeline (weekly or otherwise)
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
when: always
|
|
# All other cases: do not run
|
|
- when: never
|
|
parallel:
|
|
matrix:
|
|
- RECIPE:
|
|
- base.yml
|
|
# - base-nvidia.yml
|
|
# - base-cosmic.yml
|
|
# - base-cosmic-nvidia.yml
|
|
- base-combo.yml
|
|
- base-combo-nvidia.yml
|
|
- base-kinoite.yml
|
|
# - base-kinoite-nvidia.yml
|
|
|
|
wke-images:
|
|
extends:
|
|
- .build
|
|
stage: build
|
|
needs:
|
|
- job: 'base-images: [base.yml]'
|
|
optional: true
|
|
parallel:
|
|
matrix:
|
|
- RECIPE:
|
|
- wke-worker.yml
|
|
- wke-fw-desktop.yml
|
|
- wke-server.yml
|
|
|
|
kinoite-images:
|
|
extends:
|
|
- .build
|
|
stage: build
|
|
needs:
|
|
- job: 'base-images: [base-kinoite.yml]'
|
|
optional: true
|
|
parallel:
|
|
matrix:
|
|
- RECIPE:
|
|
- cp-laptop.yml
|
|
|
|
combo-images:
|
|
extends:
|
|
- .build
|
|
stage: build
|
|
needs:
|
|
- job: 'base-images: [base-combo.yml]'
|
|
optional: true
|
|
parallel:
|
|
matrix:
|
|
- RECIPE:
|
|
- jp-laptop.yml
|
|
|
|
combo-nvidia-images:
|
|
extends:
|
|
- .build
|
|
stage: build
|
|
needs:
|
|
- job: 'base-images: [base-combo-nvidia.yml]'
|
|
optional: true
|
|
parallel:
|
|
matrix:
|
|
- RECIPE:
|
|
- jp-desktop-nvidia.yml
|
|
|