Skip to content
Snippets Groups Projects
Commit e68ac7fc authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[CICD] Include 'gitlab-ci' repo jobs to the automation steps

Every time a MR is opened in this repo, the corresponding SHA of the
submodule in the ‘seco-base’ repository must be updated.
For this reason, additional stages and jobs are added to the pipeline
from the main repository of ‘gitlab-ci’ which enable this automatism.
Already existing ‘update version’ and ‘pages’ jobs are
added to those already defined within the ‘gitlab-ci’ repository.
Other significant changes made to existing jobs:
* Renamed variable ‘TARGET_BRANCH’ to ‘MAIN_BRANCH’ to
avoid conflicts with jobs within ‘gitlab-ci’.
* Replaced ‘only’ with ‘rules’ as it is no longer supported
 in the current version of GitLab (17.5.1).
parent 70ca497a
No related branches found
No related tags found
1 merge request!34[CICD] Include 'gitlab-ci' repo jobs to the automation steps
Pipeline #217577 failed with stages
in 1 minute and 23 seconds
Subproject commit a8b93ddb9a6c456e15dd6eab8a46d5706c60e5dc
Subproject commit 7b608ad118cee3d9d2cf57f5a0be866e40081c0f
# The Docker image that will be used to build your app
image: alpine
# Functions that should be executed before the build script is run
before_script: []
stages:
- update_version
- pages
---
# ---------------------------------------------------------------------------------------
# Include the default CI steps from the gitlab-ci repo
# ---------------------------------------------------------------------------------------
include:
- project: '${CI_PROJECT_ROOT_NAMESPACE}/infrastructure/gitlab-ci'
ref: 7b608ad118cee3d9d2cf57f5a0be866e40081c0f
file: 'tools-integration.yml'
variables:
GITLAB_CI_REVISION: 7b608ad118cee3d9d2cf57f5a0be866e40081c0f
SUBMODULE_NAME: seco-build-configurator
VERSION_FILE: "src/version.py"
# TARGET_BRANCH must be "scarthgap" once the initial development is completed
TARGET_BRANCH: "scarthgap-dev"
# MAIN_BRANCH must be set to "scarthgap" once the initial development is completed
MAIN_BRANCH: "scarthgap-dev"
# Jobs specific for the 'seco-build-configurator' repo
# that are not defined in the 'gitlab-ci' one
update_version:
stage: update_version
stage: tools-integration
image: alpine
before_script:
- apk update && apk add --no-cache python3 py3-pip gcc musl-dev libffi-dev openssl-dev git
- git submodule update --init --recursive
......@@ -26,15 +31,16 @@ update_version:
- |
python3 scripts-ci/version_manager.py --token $GITBOT_TOKEN \
--project $CI_PROJECT_PATH \
--target-branch-name $TARGET_BRANCH \
--target-branch-name $MAIN_BRANCH \
--version-file $VERSION_FILE
rules:
rules: &update_version_rules
# Pipeline triggered when pushing to the default branch.
# Avoid loop skipping the pipeline if the commit message contains "Bummp to version".
- if: $CI_COMMIT_BRANCH == $TARGET_BRANCH && $CI_COMMIT_MESSAGE !~ "/Bump to version/"
- if: $CI_COMMIT_BRANCH == $MAIN_BRANCH && $CI_COMMIT_MESSAGE !~ "/Bump to version/"
pages:
stage: pages
stage: tools-integration
image: alpine
script:
- apk update && apk add doxygen && apk add graphviz
- doxygen doxygen/Doxyfile
......@@ -44,5 +50,5 @@ pages:
paths:
# The folder that contains the files to be exposed at the Page URL
- public
only:
- scarthgap-dev
\ No newline at end of file
rules:
*update_version_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