Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • seco-ne/yocto/infrastructure/gitlab-ci
1 result
Show changes
Commits on Source (6)
......@@ -87,13 +87,26 @@ deployimage-{{ machine }}:
stage: deploy
needs: [build-{{ machine }}, changelog]
# Deploy jobs for the yocto sdk
deploysdk-{{ machine }}:
extends: .deployimage
stage: deploy
needs: [buildsdk-{{ machine }}]
# Upload ftp jobs for the yocto image
uploadftp-{{ machine }}:
extends:
- .uploadftp
- .uploadsdkftp
stage: uploadftp
needs: [build-{{ machine }}, buildsdk-{{ machine }}, changelog]
needs: [build-{{ machine }}, changelog]
# Upload ftp jobs for the yocto sdk
uploadftp-sdk-{{ machine }}:
extends:
- .uploadftp
stage: uploadftp
needs: [ buildsdk-{{ machine }}]
# Run platform tests for this machine which the yocto image
# This is a little hacky as we need to match the machine name to
......
......@@ -168,19 +168,14 @@ variables:
.buildsdk:
extends:
- .buildimage
- .package
stage: build
rules:
- when: manual
allow_failure: true
variables:
BITBAKE_TASK: "populate_sdk"
artifacts:
paths:
- "${BUILDPATH}/${SDKPATH}/*.manifest"
- "${BUILDPATH}/${SDKPATH}/*.json"
reports:
dotenv: package.env
- "${BUILDPATH}/${SDKPATH}/*"
# ---------------------------------------------------------------------------------------
# Stage: test
......@@ -233,11 +228,6 @@ variables:
- .package
rules:
- when: manual
allow_failure: true
script:
# Workaround: We need a command in the script section to be able to run the
# after_script section of the package step.
- echo
artifacts:
paths:
- release/**/**/*
......@@ -256,11 +246,6 @@ variables:
rules:
- if: $CI_COMMIT_TAG
when: manual
allow_failure: true
script:
# Workaround: We need a command in the script section to be able to run the
# after_script section of the package step.
- echo
timeout: 30m
.uploadsdkftp:
......
......@@ -3,7 +3,7 @@
variables:
CI_PARAM_PACKAGE_FTP: "false"
LOGPREFIX: "CI:package:"
after_script:
script:
- |-
# Package release files
# TODO: At the moment this script is used for
......
......@@ -6,12 +6,12 @@ variables:
# The id of the gitlab project used in the rules section to not run pipelines in
# forked projects. Using variable here, to allow override in other projects including
# this file.
MANIFEST_PROJECT_ID: 1725
MANIFEST_PROJECT_ID: 1742
# In the manifest, the remotes are specified by an identifier. This is used to find
# out included projects for the retrigger job. In custom manifests, the remote may be
# named differently, so we need a variable that may be overriden.
CI_PARAM_SECO_REMOTE: seco-ne
CI_PARAM_SECO_REMOTE: ci-test
BUILD_TIMEOUT: 2m
......
......@@ -13,7 +13,9 @@ stages:
workflow:
rules:
# Explicitly allow externally triggered pipelines in every case
- if: $CI_PIPELINE_SOURCE == "pipeline" || $CI_PIPELINE_SOURCE == "api"
- if: $CI_PIPELINE_SOURCE == "api"
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "web"
# Do not run pipelines for merge requests
- if: $CI_MERGE_REQUEST_IID
when: never
......@@ -27,14 +29,36 @@ workflow:
# In all other cases, run the pipeline automatically
- when: always
.full_build_pipeline:
rules:
# Run the full build pipeline on non-master branches (i.e. in the merge request)
# or if explicitly triggered by the API or the web button.
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST
- if: $CI_PIPELINE_SOURCE == "api"
- if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "web"
.short_master_pipeline:
rules:
# The short master pipeline does not execute a full build, but only mirrors the
# build result from the merge request. Run it on the master branch per default if
# not explicitly triggered.
- if: $CI_PIPELINE_SOURCE == "api"
when: never
- if: $CI_PIPELINE_SOURCE == "pipeline"
when: never
- if: $CI_PIPELINE_SOURCE == "web"
when: never
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH_MANIFEST
# --------------------------------------------------------------------------------------
# Stage: retrigger
# --------------------------------------------------------------------------------------
retrigger:
extends: .infrastructure
extends:
- .infrastructure
- .short_master_pipeline
stage: retrigger
rules:
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH_MANIFEST && $CI_PIPELINE_SOURCE != "api"
script:
- PROJECTS=$(
.gitlab-ci/scripts/get_manifest_projects.py
......@@ -62,9 +86,9 @@ retrigger:
# Stage: infrastructure
# --------------------------------------------------------------------------------------
generate-build-jobs:
extends: .infrastructure
rules:
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
extends:
- .infrastructure
- .full_build_pipeline
script:
# The job generation script implicitly passes the OS environment to the template, so
# that the template has access to all GitLab CI variables. Hence there is no need
......@@ -78,10 +102,10 @@ generate-build-jobs:
- build-jobs.yml
trigger-build-jobs:
extends:
- .full_build_pipeline
stage: infrastructure
needs: ["generate-build-jobs"]
rules:
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
trigger:
include:
- artifact: build-jobs.yml
......@@ -89,20 +113,22 @@ trigger-build-jobs:
strategy: depend
yamllint:
extends: .yamllint
extends:
- .full_build_pipeline
- .yamllint
# --------------------------------------------------------------------------------------
# Stage: build
# --------------------------------------------------------------------------------------
build:merge_request:
extends: .infrastructure
extends:
- .infrastructure
- .short_master_pipeline
stage: build
# For some reason we cannot use a variable for the timeout, the CI linter reports
# 'jobs:build:merge_request:timeout config should be a duration' then.
# Hence we use GitLab's 'reference' syntax instead.
timeout: !reference [variables, BUILD_TIMEOUT]
rules:
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH_MANIFEST && $CI_PIPELINE_SOURCE != "api"
script:
- cd ${CI_PROJECT_DIR}
# Get pipeline for merge request
......