Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vision_utils
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
Model registry
Operate
Environments
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
labrobotica
algorithms
vision_utils
Merge requests
!6
Resolve "license headers"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "license headers"
8-license-headers
into
master
Overview
0
Commits
9
Pipelines
13
Changes
3
Merged
Joan Vallvé Navarro
requested to merge
8-license-headers
into
master
3 years ago
Overview
0
Commits
9
Pipelines
13
Changes
1
Expand
Closes
#8 (closed)
Edited
3 years ago
by
Joan Vallvé Navarro
0
0
Merge request reports
Compare
version 6
version 8
7fa1d510
3 years ago
version 7
c742dc8c
3 years ago
version 6
347d3b35
3 years ago
version 5
81e44c28
3 years ago
version 4
7f4ecc83
3 years ago
version 3
2a2f10b7
3 years ago
version 2
17893807
3 years ago
version 1
4345634c
3 years ago
master (base)
and
version 7
latest version
ce3b7787
9 commits,
3 years ago
version 8
7fa1d510
8 commits,
3 years ago
version 7
c742dc8c
7 commits,
3 years ago
version 6
347d3b35
6 commits,
3 years ago
version 5
81e44c28
5 commits,
3 years ago
version 4
7f4ecc83
4 commits,
3 years ago
version 3
2a2f10b7
3 commits,
3 years ago
version 2
17893807
2 commits,
3 years ago
version 1
4345634c
1 commit,
3 years ago
Show latest version
1 file
+
76
−
2
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
76
−
2
Options
stages
:
-
license
-
build_and_test
############ YAML ANCHORS ############
############ YAML ANCHORS ############
.preliminaries_template
:
&preliminaries_definition
## Install ssh-agent if not already installed, it is required by Docker.
## (change apt-get to yum if you use an RPM-based image)
-
'
which
ssh-agent
||
(
apt-get
update
-y
&&
apt-get
install
openssh-client
-y
)'
## Run ssh-agent (inside the build environment)
-
eval $(ssh-agent -s)
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
## We're using tr to fix line endings which makes ed25519 keys work
## without extra base64 encoding.
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
-
mkdir -p ~/.ssh
-
chmod 700 ~/.ssh
-
echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
-
ssh-keyscan -H -p 2202 gitlab.iri.upc.edu >> $HOME/.ssh/known_hosts
# update apt
-
apt-get update
.license_header_template
:
&license_header_definition
-
cd $CI_PROJECT_DIR
# configure git
-
export CI_NEW_BRANCH=ci_processing$RANDOM
-
echo creating new temporary branch... $CI_NEW_BRANCH
#- export CI_NEW_BRANCH=ci_processing$CI_COMMIT_SHORT_SHA
-
git config --global user.email "${CI_EMAIL}"
-
git config --global user.name "${CI_USERNAME}"
-
git checkout -b $CI_NEW_BRANCH
# temporary branch
# license headers
-
export CURRENT_YEAR=$( date +'%Y' )
-
echo "current year:" ${CURRENT_YEAR}
-
cd scripts
-
if [ -f license_header_${CURRENT_YEAR}.txt ]; then
# add license headers to new files
-
echo "File license_header_${CURRENT_YEAR}.txt already exists. License headers are assumed to be updated. Adding headers to new files..."
-
./license_manager.sh --add --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt
-
else
# update license headers of all files
-
export PREV_YEAR=$(( CURRENT_YEAR-1 ))
-
echo "Creating new file license_header_${CURRENT_YEAR}.txt..."
-
git mv license_header_${PREV_YEAR}.txt license_header_${CURRENT_YEAR}.txt
-
sed -i "s/${PREV_YEAR}/${PREV_YEAR},${CURRENT_YEAR}/g" license_header_${CURRENT_YEAR}.txt
-
./license_manager.sh --update --path=${CI_PROJECT_DIR} --license-header=license_header_${CURRENT_YEAR}.txt
-
fi
-
cd ..
# push changes (if any)
-
if git commit -a -m "[skip ci] license headers added or modified" ; then
-
git remote set-url --push origin "ssh://git@gitlab.iri.upc.edu:2202/${CI_PROJECT_PATH}.git"
-
git push origin $CI_NEW_BRANCH:${CI_COMMIT_REF_NAME}
-
else
-
echo "No changes, nothing to commit!"
-
fi
.build_and_test_template
:
&build_and_test_definition
.build_and_test_template
:
&build_and_test_definition
-
cd $CI_PROJECT_DIR
-
mkdir -pv build
-
mkdir -pv build
-
cd build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON ..
@@ -7,18 +70,29 @@
@@ -7,18 +70,29 @@
-
ctest -j2
-
ctest -j2
-
make install
-
make install
############ LICENSE HEADERS ############
license_headers
:
stage
:
license
image
:
labrobotica/wolf_deps:16.04
before_script
:
-
*preliminaries_definition
script
:
-
*license_header_definition
############ UBUNTU 16.04 TESTS ############
############ UBUNTU 16.04 TESTS ############
build_and_test_none:xenial
:
build_and_test_none:xenial
:
stage
:
build_and_test
image
:
labrobotica/wolf_vision_deps:16.04
image
:
labrobotica/wolf_vision_deps:16.04
before_script
:
before_script
:
-
apt-get update
-
*preliminaries_definition
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
############ UBUNTU 18.04 TESTS ############
############ UBUNTU 18.04 TESTS ############
build_and_test_none:bionic
:
build_and_test_none:bionic
:
stage
:
build_and_test
image
:
labrobotica/wolf_vision_deps:18.04
image
:
labrobotica/wolf_vision_deps:18.04
before_script
:
before_script
:
-
apt-get update
-
*preliminaries_definition
script
:
script
:
-
*build_and_test_definition
-
*build_and_test_definition
\ No newline at end of file
Loading