mirror of
https://dev.iopsys.eu/iopsys/iopsyswrt.git
synced 2025-12-20 00:52:33 +08:00
110 lines
3.0 KiB
YAML
110 lines
3.0 KiB
YAML
variables:
|
|
SKIP_TEST: "true"
|
|
FF_SCRIPT_SECTIONS: "true"
|
|
|
|
stages:
|
|
- Update docker image
|
|
- Update code-analysis Docker image
|
|
- IOWRT
|
|
|
|
.continuous:
|
|
stage: IOWRT
|
|
trigger:
|
|
project: devops/iopsyswrt
|
|
strategy: depend
|
|
variables:
|
|
IOWRT_REF: $CI_COMMIT_SHA
|
|
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
|
|
echo "On default branch '$CI_DEFAULT_BRANCH', going to push 'latest' tag for container image as well"
|
|
DO_PUSH_LATEST=1
|
|
fi
|
|
- |
|
|
if [ "$CI_COMMIT_REF_PROTECTED" = true ]; then
|
|
echo "On protected branch, going to push container image to registries"
|
|
DO_PUSH=1
|
|
else
|
|
echo "Not on a protected branch. Only going to build the image, not going to push it"
|
|
NO_PUSH=1
|
|
fi
|
|
- |
|
|
set -x && /kaniko/executor \
|
|
--context "${CI_PROJECT_DIR}" \
|
|
--cache \
|
|
--cache-repo "${CI_REGISTRY_IMAGE}/sdk-builder/cache" \
|
|
--dockerfile "${CI_PROJECT_DIR}/Dockerfile" \
|
|
${NO_PUSH:+--no-push} \
|
|
${NO_PUSH:+--no-push-cache} \
|
|
${DO_PUSH:+--destination "${REGISTRY_REPOSITORY}:${CI_COMMIT_SHA}"} \
|
|
${DO_PUSH:+--destination "${CI_REGISTRY_IMAGE}/sdk-builder:${CI_COMMIT_SHA}"} \
|
|
${DO_PUSH:+--destination "${REGISTRY_REPOSITORY}:${CI_COMMIT_REF_NAME}"} \
|
|
${DO_PUSH:+--destination "${CI_REGISTRY_IMAGE}/sdk-builder:${CI_COMMIT_REF_NAME}"} \
|
|
${DO_PUSH_LATEST:+--destination "${REGISTRY_REPOSITORY}:latest"} \
|
|
${DO_PUSH_LATEST:+--destination "${CI_REGISTRY_IMAGE}/sdk-builder:latest"}
|
|
rules:
|
|
- if: '$CI_COMMIT_REF_PROTECTED == "true"'
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
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"
|
|
VERSION_SUFFIX: "eval"
|
|
|
|
# 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
|
|
cx750_continuous:
|
|
extends:
|
|
- .continuous
|
|
- .variables_eval
|
|
variables:
|
|
BOARD_NAME: "cx750"
|
|
|
|
# Airoha
|
|
XGXB_continuous:
|
|
extends:
|
|
- .continuous
|
|
- .variables_eval
|
|
variables:
|
|
BOARD_NAME: "XGXB"
|