Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vigenere-API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
DAVID Axel
Vigenere-API
Commits
4bdb8e6d
Commit
4bdb8e6d
authored
2 years ago
by
DAVID Axel
Browse files
Options
Downloads
Patches
Plain Diff
ci: package: Refactor the build package to publish package
parent
4ac13e5b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+27
-14
27 additions, 14 deletions
.gitlab-ci.yml
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
28 additions
and
15 deletions
.gitlab-ci.yml
+
27
−
14
View file @
4bdb8e6d
...
...
@@ -23,12 +23,10 @@ stages:
workflow
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when
:
never
-
if
:
$CI_PIPELINE_SOURCE == "merge_request_event"
-
if
:
$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when
:
never
-
if
:
$CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_BRANCH
...
...
@@ -47,6 +45,7 @@ variables:
LM_PYTHON_VERSION
:
"
3.9"
SAFETY_POLICY_FILE
:
"
$CI_PROJECT_DIR/.safety-policy.yml"
SAFETY_COLOR
:
"
True"
CI_SERVER_URL
:
"
https://etulab.univ-amu.fr"
include
:
-
template
:
Jobs/Dependency-Scanning.gitlab-ci.yml
...
...
@@ -58,10 +57,12 @@ include:
dependency_scanning
:
cache
:
[
]
stage
:
🔒️ security 🔒️
interruptible
:
true
.secret-analyzer
:
cache
:
[
]
stage
:
🔒️ security 🔒️
interruptible
:
true
# Install dependencies
...
...
@@ -79,6 +80,7 @@ dependency_scanning:
-
${CI_PROJECT_DIR}/.cache/pip
policy
:
pull-push
stage
:
.pre
interruptible
:
true
before_script
:
-
python --version
-
pip install --upgrade pip
...
...
@@ -102,6 +104,7 @@ dependency_scanning:
# Pre script
.load_env
:
interruptible
:
true
cache
:
-
key
:
files
:
...
...
@@ -143,6 +146,7 @@ dependency_scanning:
-
$CI_PROJECT_DIR/**/*.yml
-
$CI_PROJECT_DIR/**/*.yaml
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
-
if
:
$CI_COMMIT_TAG
script
:
-
yamllint src tests
...
...
@@ -153,6 +157,7 @@ dependency_scanning:
-
changes
:
-
$CI_PROJECT_DIR/**/*.md
-
if
:
$CI_PIPELINE_SOURCE == 'merge_request_event'
-
if
:
$CI_COMMIT_TAG
stage
:
🎨 format 🎨
before_script
:
...
...
@@ -348,34 +353,42 @@ dependency_scanning:
stage
:
🚀 release 🚀
rules
:
# Run this job when a tag is created manually
-
if
:
$CI_COMMIT_TAG
&& $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_TAG
.load_env_for_release
:
🔧 publish package 🚧
:
extends
:
-
.load_env
-
.common_release
🔧 build package 🚧
:
extends
:
.load_env_for_release
needs
:
-
!reference
[
.load_env
_for_release
,
needs
]
-
!reference
[
.load_env
,
needs
]
-
🤞 coverage 🔍️
before_script
:
-
export PATH="$PATH":"$HOME/.local/bin"
-
pip install --user pipx
-
pipx ensurepath
-
pipx install poetry
script
:
-
poetry config repositories.gitlab $CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/pypi
-
poetry build
-
poetry publish -r gitlab --username=ci_cd --password=$PUBLISHER_PASSWORD
artifacts
:
when
:
on_success
paths
:
-
dist
🔖 release
package
🚧
:
🔖 release
version
🚧
:
cache
:
[]
extends
:
.common_release
needs
:
-
🔧
build
package 🚧
-
🔧
publish
package 🚧
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
script
:
-
echo "R
unning the release job.
"
-
echo "R
elease created
"
release
:
tag_name
:
$CI_COMMIT_TAG
name
:
'
Release
$CI_COMMIT_TAG'
name
:
'
Release
$
{
CI_COMMIT_TAG
}
'
description
:
'
Release
created
using
the
release-cli.'
assets
:
links
:
-
name
:
'
${CI_PROJECT_NAME}
PyPi
package'
url
:
'
${CI_SERVER_URL}/${CI_PROJECT_PATH}/-/packages'
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
4bdb8e6d
...
...
@@ -8,7 +8,7 @@ The Caesar algorithm is provided for the cipher method and decipher method.\
authors
=
[
"Axel DAVID <axel.david@etu.univ-amu.fr>"
]
readme
=
"README.md"
license
=
"GPL-3.0-or-later"
packages
=
[
{
include
=
"src"
}
]
packages
=
[
{
include
=
"vigenere_api"
,
from
=
"src"
}
]
homepage
=
"https://etulab.univ-amu.fr/d19006523/vigenere-api"
repository
=
"https://etulab.univ-amu.fr/d19006523/vigenere-api"
keywords
=
[
"vigenere"
,
"caesar"
,
"API"
,
"Python"
]
...
...
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