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

Add yocto version job

parent 1860ca8e
No related branches found
No related tags found
No related merge requests found
Pipeline #78238 passed with warnings with stages
in 9 minutes and 22 seconds
...@@ -33,6 +33,12 @@ variables: ...@@ -33,6 +33,12 @@ variables:
changelog: changelog:
extends: .changelog extends: .changelog
build-version:
extends: .build_version
variables:
# We have to set a machine, even if it is not actually needed for what the job does,
# so we just choose the first.
MACHINE: {{ MACHINES.split(' ')[0] }}
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Generated jobs # Generated jobs
......
...@@ -96,8 +96,7 @@ workflow: ...@@ -96,8 +96,7 @@ workflow:
fi fi
fi fi
.build_script: &build_script .setup_build: &setup_build
# setup build environment
- echo "Build configuration MACHINE=${MACHINE} - echo "Build configuration MACHINE=${MACHINE}
DISTRO=${YOCTO_DISTRO} IMAGE=${YOCTO_IMAGE}" DISTRO=${YOCTO_DISTRO} IMAGE=${YOCTO_IMAGE}"
- echo "Using build dir ${BUILD_PATH}" - echo "Using build dir ${BUILD_PATH}"
...@@ -105,7 +104,8 @@ workflow: ...@@ -105,7 +104,8 @@ workflow:
- export DISTRO="${YOCTO_DISTRO}" - export DISTRO="${YOCTO_DISTRO}"
- export EULA="1" - export EULA="1"
- source ./"${SETUP_SCRIPT}" "${BUILD_PATH}" - source ./"${SETUP_SCRIPT}" "${BUILD_PATH}"
# start build
.run_build: &run_build
- echo -e "section_start:`date +%s`:bitbake_run\r\e[0KBitbake Log" - echo -e "section_start:`date +%s`:bitbake_run\r\e[0KBitbake Log"
- echo "bitbake ${YOCTO_IMAGE} -c ${BITBAKE_TASK}" - echo "bitbake ${YOCTO_IMAGE} -c ${BITBAKE_TASK}"
- bitbake "${YOCTO_IMAGE}" -c "${BITBAKE_TASK}" - bitbake "${YOCTO_IMAGE}" -c "${BITBAKE_TASK}"
...@@ -140,6 +140,32 @@ workflow: ...@@ -140,6 +140,32 @@ workflow:
paths: paths:
- "changelog.md" - "changelog.md"
.build_version:
extends:
- .build_yocto
stage: Infrastructure
tags:
- infrastructure
needs: []
variables:
BITBAKE_ENV_COMMAND: eval $(bitbake "${YOCTO_IMAGE}" -e)
# RELEASE_VERSION and RELEASE_NAME get eval'ed before saving them to version.env,
# so we can use deferred variable expansion or even command execution to construct
# their values.
RELEASE_VERSION: \${DISTRO_VERSION}
RELEASE_NAME: Yocto-${RELEASE_VERSION}
script:
- ${BITBAKE_ENV_COMMAND}
- RELEASE_VERSION=$(eval echo "${RELEASE_VERSION}")
- RELEASE_NAME=$(eval echo "${RELEASE_NAME}")
- echo "RELEASE_VERSION=${RELEASE_VERSION}" >> version.env
- echo "RELEASE_NAME=${RELEASE_NAME}" >> version.env
- cat version.env
artifacts:
expire_in: 1 week
reports:
dotenv: version.env
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Stage: build # Stage: build
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
...@@ -220,9 +246,10 @@ workflow: ...@@ -220,9 +246,10 @@ workflow:
- *docker_check - *docker_check
- *setup_ssh - *setup_ssh
- *repo_checkout - *repo_checkout
- *setup_build
script: script:
- *run_build
- *save_build_env - *save_build_env
- *build_script
- *collect_srcrevs - *collect_srcrevs
- *dump_install_command - *dump_install_command
......
...@@ -68,6 +68,7 @@ yocto-simulation-pipeline: ...@@ -68,6 +68,7 @@ yocto-simulation-pipeline:
- .build-pipeline - .build-pipeline
- .yocto-deploy - .yocto-deploy
variables: variables:
BITBAKE_ENV_COMMAND: "DISTRO_VERSION=kirkstone-7.0"
BUILD_ARTIFACTS_PREFIX: >- BUILD_ARTIFACTS_PREFIX: >-
https://git.seco.com/seco-ne/yocto/manifest/-/jobs/artifacts/kirkstone/7.0/download?job=build https://git.seco.com/seco-ne/yocto/manifest/-/jobs/artifacts/kirkstone/7.0/download?job=build
YOCTO_IMAGE: seconorth-image YOCTO_IMAGE: seconorth-image
......
...@@ -96,6 +96,8 @@ fngsystem-pipeline: ...@@ -96,6 +96,8 @@ fngsystem-pipeline:
YOCTO_IMAGE: fngsystem-image YOCTO_IMAGE: fngsystem-image
YOCTO_DISTRO: guf-fngsystem YOCTO_DISTRO: guf-fngsystem
INSTALL_SCRIPT: fngsystem-self-update.sh INSTALL_SCRIPT: fngsystem-self-update.sh
RELEASE_VERSION: \$(echo \$DISTRO_VERSION | sed "s/fngsystem//")
RELEASE_NAME: FNGSystem-\${RELEASE_VERSION}
ARTIFACTS_PATH: build-*/tmp/deploy/images/**/* ARTIFACTS_PATH: build-*/tmp/deploy/images/**/*
PACKAGE_TYPE: image PACKAGE_TYPE: image
ALPHAPLAN_STAGE: "true" ALPHAPLAN_STAGE: "true"
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