Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Python Binary Wheel Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASTRON Templates
Python Binary Wheel Package
Merge requests
!10
Add pre commit improve tox setup
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Add pre commit improve tox setup
add-pre-commit-improve-tox-setup-2
into
main
Overview
57
Commits
36
Pipelines
21
Changes
2
Merged
Corné Lukken
requested to merge
add-pre-commit-improve-tox-setup-2
into
main
4 months ago
Overview
23
Commits
36
Pipelines
21
Changes
2
0
0
Merge request reports
Viewing commit
46787a73
Prev
Next
Show latest version
2 files
+
159
−
49
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
46787a73
update
· 46787a73
Hannes Feldt
authored
4 months ago
.gitlab-ci.yml
+
37
−
49
View file @ 46787a73
Edit in single-file editor
Open in Web IDE
Show full file
include
:
stages
:
-
local
:
"
{{cookiecutter.project_slug}}/.gitlab-ci.yml"
-
prepare
-
build
variables
:
-
test
GIT_SUBMODULE_STRATEGY
:
recursive
trigger_prepare
:
trigger_prepare
:
stage
:
prepare
stage
:
prepare
@@ -10,53 +9,42 @@ trigger_prepare:
@@ -10,53 +9,42 @@ trigger_prepare:
strategy
:
depend
strategy
:
depend
include
:
"
{{cookiecutter.project_slug}}/.prepare.gitlab-ci.yml"
include
:
"
{{cookiecutter.project_slug}}/.prepare.gitlab-ci.yml"
default
:
# Generate template instance in my_awesome_app directory
build-template
:
stage
:
build
image
:
$CI_REGISTRY_IMAGE/ci-build-runner:$CI_COMMIT_REF_SLUG
# Bootstrap Cookiecutter template to test provided ci pipeline template
# Bootstrap Cookiecutter template to test provided ci pipeline template
before_
script
:
script
:
-
python --version
# For debugging
-
python --version
# For debugging
-
git config --global user.name "unit test"
-
git config --global user.email "info@astron.nl"
-
cookiecutter --no-input --overwrite-if-exists --output-dir . .
-
cookiecutter --no-input --overwrite-if-exists --output-dir . .
-
cd my_awesome_app
-
cd my_awesome_app
-
git init
# Override semgrep-sast before script
-
git config user.email "ci-runner@example.com"
sast
:
-
git config user.name "CI Runner"
before_script
:
-
source ./setup.sh
-
python --version
# For debugging
-
ls -lah
-
tox --version
# Override unit test before script
-
pip install --upgrade tox
.run_unit_test_version_base
:
-
tox -e fix
before_script
:
-
rm -r .venv
-
pip install cookiecutter
-
rm -r .tox
-
!reference
[
default
,
before_script
]
# cannot use needs, for artifacts on child pipeline so must regenerate template!
-
python --version
# For debugging
-
python -m pip install --upgrade pip
-
pip install --upgrade tox twine
# Override artifact directories
package_docs
:
stage
:
package
artifacts
:
expire_in
:
1w
paths
:
-
my_awesome_app/docs/build/*
# override package files before script
package_files
:
before_script
:
-
pip install cookiecutter
-
!reference
[
default
,
before_script
]
artifacts
:
artifacts
:
expire_in
:
1w
paths
:
paths
:
-
my_awesome_app/dist/*
-
my_awesome_app/*
-
project.gitlab-ci.yml
# Override artifact directories
run_unit_tests_coverage
:
# Spawn pipeline using the gitlab-ci.yml from generated template instance
artifacts
:
# use project.gitlab.ci.yml for necessary job overrides from this template instance
reports
:
# (due to changes in directories and paths etc)
coverage_report
:
project-pipeline
:
coverage_format
:
cobertura
stage
:
test
path
:
my_awesome_app/coverage.xml
trigger
:
paths
:
strategy
:
depend
-
my_awesome_app/htmlcov/*
include
:
-
artifact
:
my_awesome_app/.gitlab-ci.yml
job
:
build-template
-
artifact
:
project.gitlab-ci.yml
job
:
build-template
variables
:
PARENT_PIPELINE_ID
:
$CI_PIPELINE_ID
Loading