Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test_ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Alejandro Lopez Gestoso
test_ci
Commits
38aaf964
Commit
38aaf964
authored
2 years ago
by
Alejandro Lopez Gestoso
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
831cb379
No related branches found
No related tags found
No related merge requests found
Pipeline
#13049
failed
2 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+41
-125
41 additions, 125 deletions
.gitlab-ci.yml
with
41 additions
and
125 deletions
.gitlab-ci.yml
+
41
−
125
View file @
38aaf964
image
:
docker.io/labrobotica/labrobotica:latest
variables
:
GIT_SUBMODULE_STRATEGY
:
recursive
FROM_RDEPENDS_CI
:
"
false"
stages
:
-
build
-
update_package
-
update_reverse_dependencies
.build-package
:
stage
:
build
rules
:
-
if
:
$CI_COMMIT_TAG =~ /\d+\.[^a-zA-Z_\s]*\d+/
script
:
#- git submodule sync --recursive
#- git submodule update --init --recursive
-
apt update || apt -y install ca-certificates && apt update
##Install dependencies
#- apt -y install iri-dep1-dev iri-dep2-dev
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG ..
-
make package -j $(nproc)
artifacts
:
paths
:
-
build/*.deb
expire_in
:
2 weeks
-
rdepends
.update_repo
:
stage
:
update_package
rules
:
-
if
:
$CI_COMMIT_TAG =~ /\d+\.[^a-zA-Z_\s]*\d+/
iri-dummyutils-dev
:
stage
:
rdepends
script
:
-
cd build
-
"
scp
-i
/root/.ssh/iriLabKeyNopwd
-r
*dummyutils*.deb
irilabo@labrepo.iri.upc.edu:packages/"
-
"
ssh
irilabo@labrepo.iri.upc.edu
-i
/root/.ssh/iriLabKeyNopwd
-tt
/home/irilabo/repo_scripts/update_repo.sh
dummyutils
$(lsb_release
-cs)"
-
echo "Done."
modify_rdepends_ci
:
stage
:
update_reverse_dependencies
rules
:
-
if
:
$FROM_RDEPENDS_CI == "false" && $CI_COMMIT_TAG =~ /\d+\.[^a-zA-Z_\s]*\d+/
script
:
# Modify child pipeline
-
apt update || apt -y install ca-certificates && apt update
-
"
scp
-i
/root/.ssh/iriLabKeyNopwd
irilabo@labrepo.iri.upc.edu:repo_scripts/reverse_dependency.sh
."
-
"
scp
-i
/root/.ssh/iriLabKeyNopwd
irilabo@labrepo.iri.upc.edu:repo_scripts/generate_rdepends_ci.sh
."
-
./reverse_dependency.sh dummyutils
# git configuration & push
-
git config user.email labrobotica@iri.upc.edu
-
git config user.name labrobotica
-
if git checkout -b update_rdepends ; then
-
echo "Branch update_rdepends ok."
-
else
-
git branch -D update_rdepends
-
git checkout -b update_rdepends
-
echo "Re-created branch update_rdepends ok."
-
fi
-
git add .rdepends_ci/rdepends_ci.yml
-
git commit -m "Updated rdepends_ci.yml"
-
git remote set-url --push origin https://rdepends_token:$ACCESS_TOKEN@gitlab.iri.upc.edu/alopez/test_ci.git || echo "Origin already exists"
-
git remote show origin
-
git push --set-upstream origin update_rdepends
.trigger_rdepends_ci
:
stage
:
update_reverse_dependencies
rules
:
-
if
:
$CI_COMMIT_BRANCH == "update_rdepends"
iri-dummyasterx-dev
:
stage
:
rdepends
variables
:
FROM_RDEPENDS_CI
:
"
true"
trigger
:
include
:
.rdepends_ci/rdepends_ci.yml
strategy
:
depend
project
:
alopez/dummyasterx"
branch
:
"
1.0.1"
needs
:
[
iri-dummyutils-dev
,
iri-dummycomm-dev
]
iri-dummytrajectory-dev
:
stage
:
rdepends
variables
:
FROM_RDEPENDS_CI
:
"
true"
trigger
:
strategy
:
depend
project
:
alopez/dummytrajectory"
branch
:
"
1.0.0"
needs
:
[
iri-dummyutils-dev
]
iri-dummydynamixel-dev
:
stage
:
rdepends
variables
:
FROM_RDEPENDS_CI
:
"
true"
trigger
:
strategy
:
depend
project
:
alopez/dummydynamixel"
branch
:
"
1.0.0"
needs
:
[
iri-dummyutils-dev
,
iri-dummycomm-dev
]
iri-dummycomm-dev
:
stage
:
rdepends
variables
:
FROM_RDEPENDS_CI
:
"
true"
trigger
:
strategy
:
depend
project
:
alopez/dummycomm"
branch
:
"
1.0.0"
needs
:
[
iri-dummyutils-dev
]
cleanup_branch
:
stage
:
update_reverse_dependencies
rules
:
-
if
:
$CI_COMMIT_BRANCH == "update_rdepends"
script
:
# delete .rdepends_ci/rdepends_ci.yml, merge to master and delete branch
-
git config user.email labrobotica@iri.upc.edu
-
git config user.name labrobotica
-
git branch -D update_rdepends
#- git branch -D update_rdepends_tag
-
git push origin --delete update_rdepends || echo "Update_depends branch already deleted"
#- git push origin --delete update_rdepends_tag || echo "Update_depends_tag branch already deleted"
needs
:
[
generate_new_tag
]
generate_new_tag
:
stage
:
update_reverse_dependencies
rules
:
-
if
:
$CI_COMMIT_BRANCH == "update_rdepends"
script
:
# Read package version and increment patch version
-
apt update || apt -y install ca-certificates && apt update
-
VER=( $(apt-cache show iri-dummyutils-dev | grep Version) )
-
declare -a VER
-
if [ ${#VER[@]} -eq 2 ]
-
then
-
echo "${VER[1]}"
-
tmp=${VER[1]%.*}
-
MAJOR=${tmp%.*}
-
tmp=${VER[1]#*.}
-
MINOR=${tmp%.*}
-
REV=${tmp#*.}
-
NEW_REV=$((${REV}+1))
-
NEW_VER="${MAJOR}.${MINOR}.${NEW_REV}"
-
echo "${NEW_VER}"
-
else
-
echo "No version found for iri-dummyutils-dev"
-
exit
1
-
fi
# git configuration & tag
-
git config user.email labrobotica@iri.upc.edu
-
git config user.name labrobotica
#- if git checkout -b update_rdepends_tag ; then
#- echo "Branch update_rdepends_tag ok."
#- else
#- git branch -D update_rdepends_tag
#- git checkout -b update_rdepends_tag
#- echo "Re-created branch update_rdepends_tag ok."
#- fi
-
git tag -a 1.4.8 -m "New tag by reverse dependency pipeline"
-
git remote set-url --push origin https://rdepends_token:$ACCESS_TOKEN@gitlab.iri.upc.edu/alopez/test_ci.git || echo "Origin already exists"
-
git remote show origin
#- git push --set-upstream origin update_rdepends_tag
-
git push origin 1.4.8
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