Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
e3c28015
Commit
e3c28015
authored
1 year ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
25d3ed66
No related branches found
No related tags found
3 merge requests
!476
spdlog version upgrade
,
!473
Rerefactor
,
!472
Merge ProcessorLandmarkExternal
Pipeline
#17060
canceled
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.ci_templates/.yaml_schema_cpp.yml
+78
-0
78 additions, 0 deletions
.ci_templates/.yaml_schema_cpp.yml
with
78 additions
and
0 deletions
.ci_templates/.yaml_schema_cpp.yml
0 → 100644
+
78
−
0
View file @
e3c28015
.install_yamlschemacpp_script
:
-
cd ${CI_PROJECT_DIR}
# create 'ci_deps' folder (if not exists)
-
mkdir -pv ci_deps
-
cd ${CI_PROJECT_DIR}/ci_deps
# clone or pull
-
if [ -d yaml-schema-cpp ]; then
-
echo "directory yaml-schema-cpp exists"
-
cd yaml-schema-cpp
-
git checkout main
-
git pull
-
else
-
git clone -b main ssh://git@gitlab.iri.upc.edu:2202/labrobotica/algorithms/yaml-schema-cpp.git
-
cd yaml-schema-cpp
-
fi
# build and install
-
mkdir -pv build
-
cd build
-
cmake -DCMAKE_BUILD_TYPE=release -DBUILD_TESTS=OFF ..
-
make -j$(nproc)
-
make install
-
ldconfig
.generate_yaml_templates_script
:
-
cd ${CI_PROJECT_DIR}
# create ci_deps if not created yet
-
mkdir -pv ci_deps
# configure git
-
git remote set-url origin "ssh://git@gitlab.iri.upc.edu:2202/${CI_PROJECT_PATH}.git"
-
git pull origin ${CI_COMMIT_REF_NAME}
-
git config --global user.email "${CI_EMAIL}"
-
git config --global user.name "${CI_USERNAME}"
# create temporary branch
-
if [ `git rev-parse --verify ci_yamlschemacpp 2>/dev/null` ]; then
-
git branch --delete ci_yamlschemacpp
-
fi
-
export CI_NEW_BRANCH_YAML=ci_yamlschemacpp
-
echo creating new temporary branch... $CI_NEW_BRANCH_YAML
-
git checkout -b $CI_NEW_BRANCH_YAML
# remove all existing yaml templates
-
cd ${CI_PROJECT_DIR}
-
rm -rf yaml_templates
# go to schema folder
-
cd ${CI_PROJECT_DIR}/schema
# list all schema files
-
find . -iname "*.schema" > schemas.txt
# generate yaml template for each schema file in yaml_templates folder
-
while read p; do
-
echo "Generating template for schema $p"
-
folder=${p%/*}
-
folder_length=${#folder}
-
tmp=${p%.*}
-
name=${tmp:$folder_length+1}
-
mkdir -p ${CI_PROJECT_DIR}/yaml_templates/$folder
-
yaml_template_generator $name "[${CI_PROJECT_DIR}/schema ${CI_PROJECT_DIR}/ci_deps]" ${CI_PROJECT_DIR}/yaml_templates/$folder/$name.yaml
-
done <schemas.txt
# remove list of all schema files
-
rm schemas.txt
# push changes (if any)
-
git add ../yaml_templates
-
if git commit -a -m "[skip ci] yaml templates added or modified" ; then
-
git push origin $CI_NEW_BRANCH_YAML:${CI_COMMIT_REF_NAME}
-
else
-
echo "No changes, nothing to commit!"
-
fi
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