Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jupyterhub-outpostspawner
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jupyterjsc
packages
jupyterhub-outpostspawner
Commits
f215e9c2
Commit
f215e9c2
authored
1 year ago
by
Tim Kreuzer
Browse files
Options
Downloads
Plain Diff
Resolve "add changelog + releases in ci cd pipeline"
Closes
#1
See merge request
!3
Changelog: added
parents
0004f118
45769d3b
Branches
main
No related tags found
1 merge request
!3
Resolve "add changelog + releases in ci cd pipeline"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+63
-4
63 additions, 4 deletions
.gitlab-ci.yml
CHANGELOG.md
+0
-0
0 additions, 0 deletions
CHANGELOG.md
with
63 additions
and
4 deletions
.gitlab-ci.yml
+
63
−
4
View file @
f215e9c2
stages
:
stages
:
-
pypi
-
prepare-release
-
release
workflow
:
workflow
:
rules
:
rules
:
...
@@ -7,13 +8,71 @@ workflow:
...
@@ -7,13 +8,71 @@ workflow:
-
when
:
never
-
when
:
never
pypi
:
pypi
:
stage
:
pypi
stage
:
release
image
:
image
:
name
:
python:
3.11-
alpine
3.18
name
:
python:alpine
before_script
:
before_script
:
-
pip install twine build
-
pip install twine build
script
:
script
:
-
python -m build
-
python -m build
-
twine upload -u __token__ -p ${PYPI_JUPYTERJSC_TOKEN} dist/*
-
twine upload -u __token__ -p ${PYPI_JUPYTERJSC_TOKEN} dist/*
rules
:
rules
:
-
if
:
$CI_COMMIT_TAG
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+$/'
testpypi
:
stage
:
release
image
:
name
:
python:alpine
before_script
:
-
pip install twine build
script
:
-
python -m build
-
twine upload --repository testpypi -u __token__ -p ${TESTPYPI_JUPYTERJSC_TOKEN} dist/*
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+(-.+)$/'
###
#
# Prepare release notes
#
###
prepare_job
:
stage
:
prepare-release
image
:
alpine:latest
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+$/'
script
:
-
apk add curl jq
-
'
curl
-H
"PRIVATE-TOKEN:
$CI_API_TOKEN"
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog?version=$CI_COMMIT_TAG"
|
jq
-r
.notes
>
release_notes.md'
-
'
curl
-H
"PRIVATE-TOKEN:
$CI_API_TOKEN"
-X
POST
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog?version=$CI_COMMIT_TAG"'
artifacts
:
paths
:
-
release_notes.md
###
#
# Create release
#
###
release_job
:
stage
:
release
image
:
registry.gitlab.com/gitlab-org/release-cli:latest
needs
:
-
job
:
prepare_job
artifacts
:
true
rules
:
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+\.\d+$/'
script
:
-
echo "Creating release"
release
:
name
:
'
Release
$CI_COMMIT_TAG'
description
:
release_notes.md
tag_name
:
'
$CI_COMMIT_TAG'
ref
:
'
$CI_COMMIT_SHA'
assets
:
links
:
-
name
:
'
jupyterhub-outpostspawner
python
package
$CI_COMMIT_TAG'
url
:
"
https://pypi.org/project/jupyterhub-outpostspawner/${CI_COMMIT_TAG}/"
This diff is collapsed.
Click to expand it.
CHANGELOG.md
0 → 100644
+
0
−
0
View file @
f215e9c2
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