Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LSO
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
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
LSO
Commits
ea4814b6
Verified
Commit
ea4814b6
authored
2 years ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
add CI pipeline
parent
4223e16c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!34
Feature/add linting
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+41
-0
41 additions, 0 deletions
.gitlab-ci.yml
docs/.gitlab-ci.yml
+38
-0
38 additions, 0 deletions
docs/.gitlab-ci.yml
lso/run_playbook.sh
+0
-37
0 additions, 37 deletions
lso/run_playbook.sh
with
79 additions
and
37 deletions
.gitlab-ci.yml
0 → 100644
+
41
−
0
View file @
ea4814b6
---
stages
:
-
tox
-
documentation
include
:
-
docs/.gitlab-ci.yml
#################################### tox - Testing and linting
run-tox-pipeline
:
stage
:
tox
tags
:
-
docker-executor
image
:
python:3.10
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables
:
PIP_CACHE_DIR
:
"
$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache
:
paths
:
-
.cache/pip
before_script
:
-
pip install virtualenv
-
virtualenv venv
-
. venv/bin/activate
script
:
-
pip install tox
-
tox
artifacts
:
paths
:
-
htmlcov
This diff is collapsed.
Click to expand it.
docs/.gitlab-ci.yml
0 → 100644
+
38
−
0
View file @
ea4814b6
---
##### Sphinx - Generate documentation
build-documentation
:
stage
:
documentation
tags
:
-
docker-executor
image
:
sphinxdoc/sphinx:latest
before_script
:
-
pip install sphinx_rtd_theme
script
:
-
sphinx-apidoc lso lso/app.py -o docs/source -d 2 -f
-
sphinx-build -b html docs/source docs/build
artifacts
:
paths
:
-
$CI_PROJECT_DIR/docs/build/html
##### Vale - Documentation linter
lint-documentation
:
stage
:
documentation
image
:
name
:
jdkato/vale:latest
entrypoint
:
[
"
"
]
tags
:
-
docker-executor
needs
:
-
job
:
build-documentation
# Only run when documentation has been built
artifacts
:
true
before_script
:
-
cd $CI_PROJECT_DIR/docs/vale
-
vale sync
script
:
-
vale sync
-
vale $CI_PROJECT_DIR/docs/source/*.rst $CI_PROJECT_DIR/**/*.py
This diff is collapsed.
Click to expand it.
lso/run_playbook.sh
deleted
100755 → 0
+
0
−
37
View file @
4223e16c
#!/bin/bash
usage
()
{
echo
"Usage:
$0
<lso_collection_name> <playbook-name> <remote-host> (<extra-vars> ...)"
1>&2
;
exit
2
}
if
[
$#
-lt
2
]
;
then
echo
"Illegal number of parameters"
usage
fi
VENV_PATH
=
$(
mktemp
-d
-t
larp-venv-
)
if
[[
!
-d
"
$VENV_PATH
"
]]
;
then
echo
"Unable to create temp directory for venv"
exit
1
fi
cleanup
()
{
rm
-rf
"
$VENV_PATH
"
echo
"Deleted venv in
$VENV_PATH
"
}
# Always delete old venv upon exit
trap
cleanup EXIT
###
echo
"Creating venv in
$VENV_PATH
"
python3
-m
venv
"
$VENV_PATH
"
source
"
$VENV_PATH
/bin/activate"
pip
install
-r
../requirements.txt
# FIXME
pip
install
ansible ansible_runner
ansible-galaxy collection
install
"
$1
"
EXTRA_OPTIONS
=
${
*
:4
}
ansible-playbook
"
$2
"
-i
"
$3
"
,
--connection
=
local
"
$EXTRA_OPTIONS
"
# FIXME: remove --connection=local
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