Skip to content
Snippets Groups Projects
Commit c227e053 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Yocto build: use common artifact pathspec for image and SDK builds

This is the first step on the way to a common pipeline for all build
configurations.
parent fa2766e6
No related branches found
No related tags found
1 merge request!273Yocto build: use common artifact pathspec for image and SDK builds
Pipeline #70895 passed with stage
in 18 minutes and 34 seconds
......@@ -98,29 +98,20 @@ workflow:
expire_in: 1 week
reports:
dotenv: build.env
.build_image:
artifacts:
paths: &build_image_artifacts_paths
paths: &artifacts_paths
# List of all potential artifact paths. Not all of them are present in each build
# configuration, e.g. the SDK path exists in SDK builds only. We still specify all
# of them here in order to have a generic build class for all builds. Pathsspecs
# which do not exist in a specific configuration are simply ignored by GitLab.
- build-*/tmp/deploy/images/**/*
- build-*/tmp/deploy/licenses/**/license.manifest
- build.env
cache:
# Cache the build artifacts for subsequent stages in the same pipeline
- key: ${CI_PIPELINE_ID}-${CI_JOB_NAME}
policy: push
paths: *build_image_artifacts_paths
.build_sdk:
artifacts:
paths: &build_sdk_artifacts_paths
- build-*/tmp/deploy/sdk/*
- build.env
cache:
# Cache the build artifacts for subsequent stages in the same pipeline
- key: ${CI_PIPELINE_ID}-${CI_JOB_NAME}
policy: push
paths: *build_sdk_artifacts_paths
paths: *artifacts_paths
# --------------------------------------------------------------------------------------
# Stage: test
......@@ -218,7 +209,7 @@ workflow:
--release-suffix="${RELEASE_SUFFIX}"
cache:
- <<: *pull_build_cache
paths: *build_image_artifacts_paths
paths: *artifacts_paths
- *push_package_cache
.package_sdk:
......@@ -232,7 +223,7 @@ workflow:
--release-suffix="${RELEASE_SUFFIX}"
cache:
- <<: *pull_build_cache
paths: *build_sdk_artifacts_paths
paths: *artifacts_paths
- *push_package_cache
# --------------------------------------------------------------------------------------
......
......@@ -114,32 +114,32 @@ build:check-foo-branch:
simulate-build-seco-mx6:
extends:
- .simulate_build
- .build_image
- .buildbase
variables:
# We have to specify a tag here instead of getting the artifacts from a master
# branch, because we don't always execute the full pipeline on the master branches.
# In those cases the actual build job does not exist, which results in a 404 error.
BUILD_ARTIFACTS: https://git.seco.com/seco-ne/yocto/manifest/-/jobs/artifacts/kirkstone/3.0/download?job=build-seco-mx6
cache:
- !reference [.build_image, cache]
- !reference [.buildbase, cache]
# Additionally cache the build artifacts for re-runs of this job in other pipelines
- key: ${CI_JOB_NAME}-${BUILD_ARTIFACTS}
paths: !reference [.build_image, artifacts, paths]
paths: !reference [.buildbase, artifacts, paths]
simulate-buildsdk-seco-mx6:
extends:
- .simulate_build
- .build_sdk
- .buildbase
rules:
- when: manual
allow_failure: true
variables:
BUILD_ARTIFACTS: https://git.seco.com/seco-ne/yocto/manifest/-/jobs/artifacts/kirkstone/3.0/download?job=buildsdk-seco-mx6
cache:
- !reference [.build_sdk, cache]
- !reference [.buildbase, cache]
# Additionally cache the build artifacts for re-runs of this job in other pipelines
- key: ${CI_JOB_NAME}-${BUILD_ARTIFACTS}
paths: !reference [.build_sdk, artifacts, paths]
paths: !reference [.buildbase, artifacts, paths]
# --------------------------------------------------------------------------------------
# Stage: Test
......
......@@ -92,7 +92,6 @@
.build_yocto_image:
extends:
- .build_yocto
- .build_image
variables:
BITBAKE_TASK: "build"
script:
......@@ -104,7 +103,6 @@
.build_yocto_sdk:
extends:
- .build_yocto
- .build_sdk
variables:
BITBAKE_TASK: "populate_sdk"
rules:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment