Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Axii
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Show more breadcrumbs
Software
ArmarX
Meta
Axii
Commits
a7f646b7
Verified
Commit
a7f646b7
authored
2 years ago
by
Christian Dreher
Browse files
Options
Downloads
Patches
Plain Diff
chore: Frist draft for cache-optimized pipelines (cleaned up as well for pylint)
parent
de3d4c7d
No related branches found
Branches containing commit
No related tags found
1 merge request
!484
Enable apt caching, clean up pylint job
Pipeline
#7714
failed
2 years ago
Stage: lint
Stage: test
Stage: deploy
Stage: post-deploy-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+22
-20
22 additions, 20 deletions
.gitlab-ci.yml
with
22 additions
and
20 deletions
.gitlab-ci.yml
+
22
−
20
View file @
a7f646b7
...
...
@@ -5,29 +5,34 @@ stages:
-
post-deploy-test
default
:
.bootstrap-axii
:
cache
:
key
:
general-apt-cache
paths
:
-
.apt
before_script
:
-
export LC_ALL=C.UTF-8
-
export LANG=C.UTF-8
-
apt-get update
# Apt cache configuration.
-
rm -rf /var/cache/apt/archives ||
true
-
rm -f /etc/apt/apt.conf.d/docker-clean
# Remove docker-clean script to avoid cache deletion.
-
mkdir .apt ||
true
-
ln -s "$CI_PROJECT_DIR/.apt" /var/cache/apt/archives
-
apt-get install sudo -y
# Bootstrap Axii.
-
./bootstrap.sh --apt --dev --yes
-
source scripts/install_axii.sh
pylint
:
image
:
ubuntu:18.04
image
:
python:3.8-bullseye
stage
:
lint
before_script
:
-
export LC_ALL=C.UTF-8
-
export LANG=C.UTF-8
-
apt-get update
-
apt-get install sudo -y
-
./bootstrap.sh --apt --dev --yes
-
source .venv/bin/activate
-
mkdir -p public/badges public/lint
-
echo undefined > public/badges/$CI_JOB_NAME.score
script
:
-
pip install pylint pylint-pytest pylint-gitlab anybadge
-
pylint --exit-zero --output-format=text $(find -type f -name "*.py" ! -path "**/.venv/**") | tee /tmp/pylint.txt
-
sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint.txt > public/badges/$CI_JOB_NAME.score
-
pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $(find -type f -name "*.py" ! -path "**/.venv/**") > code_climate.json
...
...
@@ -48,7 +53,6 @@ pylint:
markdown-lint
:
image
:
python:3.8-bullseye
stage
:
lint
before_script
:
[]
script
:
-
pip install pymarkdownlnt
-
pymarkdown --config data/tools/pymarkdownlint.json scan -r docs *.md .gitlab > pymarkdown_report.txt ||
true
...
...
@@ -62,6 +66,7 @@ markdown-lint:
module-lint
:
image
:
ubuntu:22.04
stage
:
lint
extends
:
.bootstrap-axii
script
:
-
source .venv/bin/activate
-
python -m armarx_setup.app.lint_modules > axii_module_quality.json
...
...
@@ -74,6 +79,7 @@ module-lint:
unit-bionic
:
image
:
ubuntu:18.04
stage
:
test
extends
:
.bootstrap-axii
script
:
-
source .venv/bin/activate
-
coverage run -m pytest --junitxml=report.xml tests/unit
...
...
@@ -91,6 +97,7 @@ unit-bionic:
unit-jammy
:
image
:
ubuntu:22.04
stage
:
test
extends
:
.bootstrap-axii
script
:
-
source .venv/bin/activate
-
coverage run -m pytest --junitxml=report.xml tests/unit
...
...
@@ -108,6 +115,7 @@ unit-jammy:
e2e-bionic
:
image
:
ubuntu:18.04
stage
:
test
extends
:
.bootstrap-axii
script
:
-
source .venv/bin/activate
-
pytest --junitxml=report.xml tests/e2e
...
...
@@ -119,6 +127,7 @@ e2e-bionic:
e2e-jammy
:
image
:
ubuntu:22.04
stage
:
test
extends
:
.bootstrap-axii
script
:
-
source .venv/bin/activate
-
pytest --junitxml=report.xml tests/e2e
...
...
@@ -132,7 +141,6 @@ docker-bionic-dev:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -148,7 +156,6 @@ docker-jammy-dev:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -163,7 +170,6 @@ docker-bionic-ci-dev:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -179,7 +185,6 @@ docker-jammy-ci-dev:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -194,7 +199,6 @@ docker-bionic:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -212,7 +216,6 @@ docker-jammy:
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
before_script
:
[]
script
:
-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
...
...
@@ -238,7 +241,6 @@ pages:
.test-docker-image-common
:
# Overwrite the default before_script.
before_script
:
-
source ~/.bashrc
-
source /axii/scripts/install_axii.sh
...
...
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