Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
procset.py
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
Model registry
Operate
Environments
Terraform modules
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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
FAURE Adrien
procset.py
Commits
5378bd3e
Verified
Commit
5378bd3e
authored
3 years ago
by
FAURE Adrien
Committed by
FAURE Adrien
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ci for debian packaging
parent
b3220808
No related branches found
No related tags found
No related merge requests found
Pipeline
#466046
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+66
-1
66 additions, 1 deletion
.gitlab-ci.yml
with
66 additions
and
1 deletion
.gitlab-ci.yml
+
66
−
1
View file @
5378bd3e
default
:
stages
:
-
test
-
debian-build
-
release
.default
:
image
:
python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION}
image
:
python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION}
before_script
:
before_script
:
-
python --version
-
python --version
...
@@ -7,6 +12,8 @@ default:
...
@@ -7,6 +12,8 @@ default:
pytest
:
pytest
:
stage
:
test
stage
:
test
image
:
!reference
[
.default
,
image
]
before_script
:
!reference
[
.default
,
before_script
]
script
:
script
:
-
pytest --cov-report=term-missing --junitxml=pytest.xml
-
pytest --cov-report=term-missing --junitxml=pytest.xml
coverage
:
'
/^TOTAL.+
([1-9]?[0-9]%|100%)$/'
coverage
:
'
/^TOTAL.+
([1-9]?[0-9]%|100%)$/'
...
@@ -21,3 +28,61 @@ pytest:
...
@@ -21,3 +28,61 @@ pytest:
DEBIAN_VERSION
:
[
'
stretch'
,
'
buster'
,
'
bullseye'
]
DEBIAN_VERSION
:
[
'
stretch'
,
'
buster'
,
'
bullseye'
]
-
PYTHON_VERSION
:
[
'
3.8'
,
'
3.9'
,
'
3.10'
]
-
PYTHON_VERSION
:
[
'
3.8'
,
'
3.9'
,
'
3.10'
]
DEBIAN_VERSION
:
[
'
buster'
,
'
bullseye'
]
DEBIAN_VERSION
:
[
'
buster'
,
'
bullseye'
]
create-debian-packages
:
image
:
debian:$DEBIAN_VERSION
stage
:
debian-build
rules
:
-
if
:
$CI_COMMIT_BRANCH =~ /^debian.*$/
-
if
:
$CI_COMMIT_TAG =~ /^debian\/.*$/
variables
:
DEBIAN_VERSION
:
"
bookworm"
DEBIAN_FRONTEND
:
"
noninteractive"
DEBIAN_PRIORITY
:
"
critical"
DEBCONF_NOWARNINGS
:
"
yes"
before_script
:
-
apt-get update
-
apt-get -y install git
-
apt-get -y install dpkg-dev fakeroot lintian python3-sphinx python-all debhelper po-debconf dh-make python3-all python3-setuptools dh-python python3-sphinx-rtd-theme tree
# Get the tag name, or the commit
-
COMMIT_OR_TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
# Remove / from the tagname as it is used in file name later
-
export COMMIT_OR_TAG=$(echo $COMMIT_OR_TAG | sed 's#/#-#g')
# Save this variable for the release job
-
echo "COMMIT_OR_TAG=$COMMIT_OR_TAG" >> job.env
script
:
# Building the debian package.
-
dpkg-buildpackage -b -rfakeroot -us -uc
-
mv ../*.deb ../*.buildinfo ../*.changes . && tar cvf procset-${COMMIT_OR_TAG}.tar.gz *.deb *.buildinfo *.changes
after_script
:
-
echo "JOB_ID=$CI_JOB_ID" >> job.env
artifacts
:
paths
:
# Since I can't use the variable create in *_script here, I use a wildcard
-
procset-*.tar.gz
expire_in
:
never
reports
:
dotenv
:
job.env
# Release job for the debian package, it relies on the artifacts of create-debian-packages.
release-for-debian
:
stage
:
release
rules
:
-
if
:
$CI_COMMIT_TAG =~ /^debian\/.*$/
needs
:
# We want the test to pass
-
job
:
pytest
-
job
:
create-debian-packages
artifacts
:
true
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
script
:
-
echo 'running release_job for $CI_COMMIT_TAG'
release
:
name
:
'
Release
$CI_COMMIT_TAG'
description
:
'
Created
using
the
release-cli'
tag_name
:
'
$CI_COMMIT_TAG'
ref
:
'
$CI_COMMIT_TAG'
assets
:
links
:
-
name
:
procset-${COMMIT_OR_TAG}.tar.gz
url
:
https://gitlab.inria.fr/adfaure/procset.py/-/jobs/${JOB_ID}/artifacts/raw/procset-${COMMIT_OR_TAG}.tar.gz
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