Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Accelerators
CICD
GENERIC
Protocols
Serial
Commits
6951e780
Commit
6951e780
authored
Mar 29, 2022
by
Arnaud Le Meillour
Browse files
Merge branch 'develop' into 'release'
Test merg dev to rel See merge request
!4
parents
c1040af5
a6294647
Pipeline
#70793
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
6951e780
.project-build
:
after_script
:
-
"
##
End
of
script."
.project-test
:
after_script
:
-
"
##
End
of
script."
.project-deploy
:
after_script
:
-
"
##
End
of
script."
# include:
# - project: 'accelerators/cicd/ci-cd/ds-project-template'
# ref: rev1
# file: '/build_project.yml'
################################################################################################
################################################################################################
################################################################################################
variables
:
VERSION
:
2.1.0
DS_NAME
:
'
Serial'
REPO_DOCKER_IMG
:
gitlab-registry.esrf.fr/accelerators/cicd/ci-cd/tango-img
REPO_FS
:
segsrv.esrf.fr:/segfs/tango/release_gitlab/os/${OS_FS}
REPO_FS_PATH
:
/opt/os_dev
stages
:
-
build
-
test
-
deploy
###############################################################################
# To specifiy Gitlab unner which have docker engine available
.common-job
:
image
:
name
:
${REPO_DOCKER_IMG}/${OS_IMG}:9.3.5
tags
:
-
docker
###############################################################################
# Give target folder en CMake var depending Debug or Release version
.common-debug
:
variables
:
BUILD_TYPE
:
Debug
INSTALL_DIR
:
${REPO_FS_PATH}/debug
.common-release
:
variables
:
BUILD_TYPE
:
RelWithDebInfo
INSTALL_DIR
:
${REPO_FS_PATH}/release
###############################################################################
.common-build
:
stage
:
build
only
:
-
branches
-
merge_requests
-
tags
script
:
-
mkdir build && cd build
-
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
-
make -j
artifacts
:
paths
:
-
build
expire_in
:
1 day
-
env
#- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
#- make -j
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"push"'
when
:
manual
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
when
:
always
###############################################################################
.common-test
:
stage
:
test
only
:
-
branches
-
merge_requests
script
:
-
cd build
-
mkdir $CI_PROJECT_DIR/test
-
make DESTDIR=$CI_PROJECT_DIR/test install
-
tree -Ca $CI_PROJECT_DIR/test
-
env
#- sudo mkdir -p ${REPO_FS_PATH}
#- sudo chmod 777 ${REPO_FS_PATH}
#- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
#- make -j
#- make install
#- tree -Ca ${REPO_FS_PATH}
rules
:
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"'
when
:
always
###############################################################################
.common-deploy
:
stage
:
deploy
only
:
-
tags
script
:
-
cd build
-
'
[[
-d
${INSTALL_DIR}/lib/classes
]]'
-
make install
-
env
-
sudo apt install nfs-common
-
sudo mount ${REPO_FS} ${REPO_FS_PATH}
-
ls -la ${REPO_FS_PATH}/
# - '[[ -d ${INSTALL_DIR}/lib/classes ]]
#- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} ..
#- make -j
#- make install
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"release"
&&
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.x$/'
when
:
manual
# release:
# name: 'Release $CI_COMMIT_TAG'
# description: 'Release created using the release-cli.'
################################################################################################
################################################################################################
################################################################################################
.common-debian9
:
variables
:
OS_IMG
:
debian9
OS_FS
:
debian9
# DEBUG ################
debian9:debug:build:
extends
:
-
.common-job
-
.common-debian9
-
.common-debug
-
.common-build
-
.project-build
debian9:debug:test:
extends
:
-
.common-job
-
.common-debian9
-
.common-debug
-
.common-test
-
.project-test
needs
:
-
job
:
debian9:debug:build
artifacts
:
true
debian9:debug:deploy:
extends
:
-
.common-job
-
.common-debian9
-
.common-debug
-
.common-deploy
-
.project-deploy
needs
:
-
job
:
debian9:debug:build
artifacts
:
true
# RELEASE ################
debian9:release:build:
extends
:
-
.common-job
-
.common-debian9
-
.common-release
-
.common-build
-
.project-build
debian9:release:test:
extends
:
-
.common-job
-
.common-debian9
-
.common-release
-
.common-test
-
.project-test
needs
:
-
job
:
debian9:release:build
artifacts
:
true
debian9:release:deploy:
extends
:
-
.common-job
-
.common-debian9
-
.common-release
-
.common-deploy
-
.project-deploy
needs
:
-
job
:
debian9:release:build
artifacts
:
true
################################################################################################
################################################################################################
################################################################################################
.common-ubuntu20
:
variables
:
OS_IMG
:
ubuntu20
OS_FS
:
ubuntu20.04
# DEBUG ################
ubuntu20:debug:build:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-debug
-
.common-build
-
.project-build
ubuntu20:debug:test:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-debug
-
.common-test
-
.project-test
needs
:
-
job
:
ubuntu20:debug:build
artifacts
:
true
ubuntu20:debug:deploy:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-debug
-
.common-deploy
-
.project-deploy
needs
:
-
job
:
ubuntu20:debug:build
artifacts
:
true
# RELEASE ################
ubuntu20:release:build:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-release
-
.common-build
-
.project-build
ubuntu20:release:test:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-release
-
.common-test
-
.project-test
needs
:
-
job
:
ubuntu20:release:build
artifacts
:
true
ubuntu20:release:deploy:
extends
:
-
.common-job
-
.common-ubuntu20
-
.common-release
-
.common-deploy
-
.project-deploy
needs
:
-
job
:
ubuntu20:release:build
artifacts
:
true
include
:
-
project
:
'
accelerators/cicd/templates_cicd/template-rev1'
ref
:
main
file
:
'
/build_project.yml'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment