Files
iopsyswrt/.gitlab-ci.yml
Andreas Gnau 473387aef9 CI: Trigger continues build on all changes
Recent changes have split feeds.conf into several files. Previouly
continous builds had been triggered only on changes to feeds.conf. While
triggering on the new files only would be an option it does not make
sense to limit CI runs to feeds-changes only, because the changes to
other files (normal OpenWrt files, iop script, Dockerfile,
.gitlab-ci-yml) have the same or an even bigger likelihood of breaking
the build.

Trigger the build on all changes instead.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-01-24 14:18:21 +00:00

88 lines
2.2 KiB
YAML

workflow:
rules:
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
variables:
SKIP_TEST: "false"
stages:
- Update docker image
- Update code-analysis Docker image
- IOWRT
.continuous:
stage: IOWRT
trigger:
project: devops/iopsyswrt
strategy: depend
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
Update Docker Image:
stage: Update docker image
tags:
- priority
image:
name: gcr.io/kaniko-project/executor:v1.9.1-debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${REGISTRY_URL}\":{\"auth\":\"${REGISTRY_AUTH}\"}}}" > /kaniko/.docker/config.json
- if [ "${CI_COMMIT_REF_NAME:-}" = "${CI_DEFAULT_BRANCH}" ]; then IS_DEFAULT_BRANCH=1; fi
- |
/kaniko/executor \
--context "${CI_PROJECT_DIR}" \
--cache \
--cache-copy-layers \
--cache-repo "${CI_REGISTRY_IMAGE}/sdk-builder/cache" \
--dockerfile "${CI_PROJECT_DIR}/Dockerfile" \
--destination "${REGISTRY_REPOSITORY}:${CI_COMMIT_SHA}" \
--destination "${CI_REGISTRY_IMAGE}/sdk-builder:${CI_COMMIT_SHA}" \
--destination "${REGISTRY_REPOSITORY}:${CI_COMMIT_REF_NAME}" \
--destination "${CI_REGISTRY_IMAGE}/sdk-builder:${CI_COMMIT_REF_NAME}" \
${IS_DEFAULT_BRANCH:+--destination "${REGISTRY_REPOSITORY}:latest" --destination "${CI_REGISTRY_IMAGE}/sdk-builder:latest"}
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
interruptible: true
code-analysis:
stage: Update code-analysis Docker image
trigger:
project: iopsys/gitlab-ci-pipeline
strategy: depend
branch: $CI_COMMIT_REF_NAME
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
allow_failure: true
# For select devices that support the EVAL profile
.variables_eval:
variables:
CUSTOMER_PROFILE: "EVAL"
SKIP_TEST: "true"
# Continuous Builds:
# Qualcomm
SH40J_continuous:
extends:
- .continuous
- .variables_eval
variables:
BOARD_NAME: "SH40J"
# Broadcom
SH31B_continuous:
extends:
- .continuous
- .variables_eval
variables:
BOARD_NAME: "SH31B"
# MediaTek
CW3B_continuous:
extends:
- .continuous
- .variables_eval
variables:
BOARD_NAME: "CW3B"