Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
infrastructure
gitlab-ci
Commits
26bd3edf
Commit
26bd3edf
authored
3 years ago
by
Jonas Höppner
Browse files
Options
Downloads
Patches
Plain Diff
CI: Add common.yml containing common code for manifest and integration.
parent
8bfa443a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common.yml
+45
-0
45 additions, 0 deletions
common.yml
manifest-integration.yml
+4
-30
4 additions, 30 deletions
manifest-integration.yml
manifest.yml
+14
-44
14 additions, 44 deletions
manifest.yml
with
63 additions
and
74 deletions
common.yml
0 → 100644
+
45
−
0
View file @
26bd3edf
# --------------------------------------------------------------------------------------
# Common definitions that may be used in all subprojects
# --------------------------------------------------------------------------------------
---
variables
:
# CI_IMAGES_BASEPATH: Environment variable configure in gitlab
CI_IMAGES_PATH
:
${CI_IMAGES_BASEPATH}/ci-images
CI_IMAGES_REV
:
44965ccdd847f1e077670f49d546047f8ad0110c
CI_IMAGE_PYTHON
:
"
${CI_IMAGES_PATH}/python/3.9:${CI_IMAGES_REV}"
CI_IMAGE_YOCTO
:
"
${CI_IMAGES_PATH}/yocto-build/ubuntu-20.04:${CI_IMAGES_REV}"
# Include git submodules
GIT_SUBMODULE_STRATEGY
:
recursive
# Reduced depth as checkout of larger projects (like the kernel)
# may take too long
GIT_DEPTH
:
1
# FIXME: due to a missing feature in GitLab we cannot use this variable
# in the build stage further down this file. If it ever changes, it has
# to be changed there too.
# (https://gitlab.com/gitlab-org/gitlab/-/issues/249583)
MANIFEST_PROJECT
:
${CI_PROJECT_ROOT_NAMESPACE}/yocto/manifest
MASTER_BRANCH_MANIFEST
:
dunfell
MASTER_BRANCH_PROJECT
:
dunfell
# --------------------------------------------------------------------------------------
# Common infrastructure settings
# --------------------------------------------------------------------------------------
.infrastructure
:
stage
:
infrastructure
tags
:
-
infrastructure
timeout
:
5m
image
:
"
${CI_IMAGE_PYTHON}"
needs
:
[]
variables
:
# Include git submodules
GIT_SUBMODULE_STRATEGY
:
recursive
yamllint
:
extends
:
.infrastructure
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
script
:
-
yamllint -c .gitlab-ci/.yamllint.yml .*.yml
This diff is collapsed.
Click to expand it.
manifest-integration.yml
+
4
−
30
View file @
26bd3edf
...
...
@@ -2,7 +2,9 @@
# ---------------------------------------------------------------------------------------
# Global
# ---------------------------------------------------------------------------------------
image
:
"
${CI_IMAGES}/python/3.9:99e363bc5feaa27ff18dbe7731a76ff04d7d0deb"
include
:
-
local
:
manifest-build.yml
-
local
:
common.yml
stages
:
-
infrastructure
...
...
@@ -12,17 +14,6 @@ stages:
-
check
variables
:
# CI_IMAGES_BASEPATH: Environment variable configure in gitlab
CI_IMAGES
:
${CI_IMAGES_BASEPATH}/ci-images
# Include git submodules
GIT_SUBMODULE_STRATEGY
:
recursive
# FIXME: due to a missing feature in GitLab we cannot use this variable
# in the build stage further down this file. If it ever changes, it has
# to be changed there too.
# (https://gitlab.com/gitlab-org/gitlab/-/issues/249583)
MANIFEST_PROJECT
:
${CI_PROJECT_ROOT_NAMESPACE}/yocto/manifest
MASTER_BRANCH_MANIFEST
:
dunfell
MASTER_BRANCH_PROJECT
:
dunfell
# The BB_RECIPE_NAME is used for projects referenced in the SRCREV file
# to match the repository and the bitbake recipe name.
# We set it here to none, as every project needing it
...
...
@@ -30,9 +21,6 @@ variables:
# The BB_RECIPE_NAME is passed to the python scripts below anyway, but not
# used for projects referenced in the manifest file.
BB_RECIPE_NAME
:
none
# Reduced depth as checkout of larger projects (like the kernel)
# may take too long
GIT_DEPTH
:
5
workflow
:
rules
:
...
...
@@ -56,27 +44,13 @@ workflow:
-
if
:
$CI_PROJECT_ROOT_NAMESPACE == "SECO-Northern-Europe"
&& $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_MERGE_REQUEST_PROJECT_ID
# --------------------------------------------------------------------------------------
# Common infrastructure settings
# --------------------------------------------------------------------------------------
.infrastructure
:
stage
:
infrastructure
tags
:
-
infrastructure
timeout
:
5m
image
:
"
${CI_IMAGE_PYTHON}"
needs
:
[]
variables
:
# Include git submodules
GIT_SUBMODULE_STRATEGY
:
recursive
# ---------------------------------------------------------------------------------------
# Stage: prepare
# ---------------------------------------------------------------------------------------
yamllint
:
extends
:
.infrastructure
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
_MANIFEST
script
:
-
yamllint -c .gitlab-ci/.yamllint.yml .*.yml
...
...
This diff is collapsed.
Click to expand it.
manifest.yml
+
14
−
44
View file @
26bd3edf
...
...
@@ -4,6 +4,7 @@
---
include
:
-
local
:
manifest-build.yml
-
local
:
common.yml
stages
:
-
retrigger
...
...
@@ -14,15 +15,6 @@ stages:
-
uploadftp
variables
:
# CI_IMAGES_BASEPATH: Environment variable configure in gitlab
CI_IMAGES_PATH
:
${CI_IMAGES_BASEPATH}/ci-images
CI_IMAGES_REV
:
44965ccdd847f1e077670f49d546047f8ad0110c
CI_IMAGE_PYTHON
:
"
${CI_IMAGES_PATH}/python/3.9:${CI_IMAGES_REV}"
CI_IMAGE_YOCTO
:
"
${CI_IMAGES_PATH}/yocto-build/ubuntu-20.04:${CI_IMAGES_REV}"
# The master branch is hardcoded here, because it cannot be determined
# automatically. Has to be modified for new branches, e.g. new Yocto
# versions or fix releases.
MASTER_BRANCH
:
dunfell
# Default image and distro
CI_PARAM_IMAGE
:
guf-image
CI_PARAM_DISTRO
:
guf-wayland
...
...
@@ -44,19 +36,6 @@ workflow:
# In all other cases, run the pipeline automatically
-
when
:
always
# --------------------------------------------------------------------------------------
# Common infrastructure settings
# --------------------------------------------------------------------------------------
.infrastructure
:
tags
:
-
infrastructure
timeout
:
10m
image
:
"
${CI_IMAGE_PYTHON}"
needs
:
[]
variables
:
# Include git submodules
GIT_SUBMODULE_STRATEGY
:
recursive
# --------------------------------------------------------------------------------------
# Stage: retrigger
# --------------------------------------------------------------------------------------
...
...
@@ -64,7 +43,7 @@ retrigger:
extends
:
.infrastructure
stage
:
retrigger
rules
:
-
if
:
$CI_COMMIT_REF_NAME == $MASTER_BRANCH && $CI_PIPELINE_SOURCE != "api"
-
if
:
$CI_COMMIT_REF_NAME == $MASTER_BRANCH
_MANIFEST
&& $CI_PIPELINE_SOURCE != "api"
script
:
-
PROJECTS=$(
.gitlab-ci/get_manifest_projects.py
...
...
@@ -79,7 +58,7 @@ retrigger:
--token=${GITBOT_TOKEN}
--project=${PROJECT}
--state=opened
--target-branch=${MASTER_BRANCH}
--target-branch=${MASTER_BRANCH
_MANIFEST
}
--job=check
;
done
...
...
@@ -87,20 +66,11 @@ retrigger:
# --------------------------------------------------------------------------------------
# Stage: prepare
# --------------------------------------------------------------------------------------
yamllint
:
extends
:
.infrastructure
stage
:
prepare
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
script
:
-
yamllint .*.yml
changelog
:
stage
:
prepa
re
extends
:
.infrastructu
re
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
tags
:
-
infrastructure
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
variables
:
IMAGE_PATH
:
${CI_IMAGES_BASEPATH}/changelog-generator
IMAGE_REVISION
:
2fd56690a5dabde6eda101182e8359f1c3609664
...
...
@@ -108,7 +78,7 @@ changelog:
name
:
"
${IMAGE_PATH}:${IMAGE_REVISION}"
# set entrypoint to noop to be able to run from script
entrypoint
:
[
"
"
]
script
:
"
changelog_generator.py
--branch
${MASTER_BRANCH}
>
changelog.md"
script
:
"
changelog_generator.py
--branch
${MASTER_BRANCH
_MANIFEST
}
>
changelog.md"
artifacts
:
expire_in
:
4 weeks
paths
:
...
...
@@ -141,7 +111,7 @@ changelog:
-
.buildbase
-
.build
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
_MANIFEST
|| $CI_PIPELINE_SOURCE == "api"
needs
:
[]
.buildfng
:
...
...
@@ -156,7 +126,7 @@ build:merge_request:
stage
:
build
timeout
:
1h
rules
:
-
if
:
$CI_COMMIT_REF_NAME == $MASTER_BRANCH && $CI_PIPELINE_SOURCE != "api"
-
if
:
$CI_COMMIT_REF_NAME == $MASTER_BRANCH
_MANIFEST
&& $CI_PIPELINE_SOURCE != "api"
script
:
-
cd ${CI_PROJECT_DIR}
# Get pipeline for merge request
...
...
@@ -165,7 +135,7 @@ build:merge_request:
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
--commit=${CI_COMMIT_SHA}
--ref=^${MASTER_BRANCH} ||
true
| head -1)
--ref=^${MASTER_BRANCH
_MANIFEST
} ||
true
| head -1)
# If pipeline exists, mirror its result
-
if [ ! -z "${MR_PIPELINE}" ]; then
.gitlab-ci/mirror_pipeline_result.py
...
...
@@ -179,7 +149,7 @@ build:merge_request:
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--project=${CI_PROJECT_PATH}
--ref=${MASTER_BRANCH}
--ref=${MASTER_BRANCH
_MANIFEST
}
-
fi
.buildsdk
:
...
...
@@ -188,7 +158,7 @@ build:merge_request:
-
.package
stage
:
build
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
_MANIFEST
|| $CI_PIPELINE_SOURCE == "api"
when
:
manual
allow_failure
:
true
variables
:
...
...
@@ -209,7 +179,7 @@ build:merge_request:
-
.prepare_test
timeout
:
1h
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
_MANIFEST
|| $CI_PIPELINE_SOURCE == "api"
when
:
manual
allow_failure
:
true
variables
:
...
...
@@ -238,7 +208,7 @@ build:merge_request:
"Gitlab build test ${CI_PARAM_MACHINE} ${RELEASE} ${CI_PIPELINE_ID}" \
--results-path "results" \
--test-repo ${TESTS_GIT_URL} \
--test-repo-branch ${MASTER_BRANCH} \
--test-repo-branch ${MASTER_BRANCH
_MANIFEST
} \
--test-plan ${CI_PARAM_TEST_SUITE} \
${CI_PARAM_EXTRA} \
${CI_PARAM_PLATFORMS}
...
...
@@ -251,7 +221,7 @@ build:merge_request:
-
.infrastructure
-
.package
rules
:
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH || $CI_PIPELINE_SOURCE == "api"
-
if
:
$CI_COMMIT_REF_NAME != $MASTER_BRANCH
_MANIFEST
|| $CI_PIPELINE_SOURCE == "api"
when
:
manual
allow_failure
:
true
script
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment