Verified Commit a0f83cbc authored by Luc Didry's avatar Luc Didry
Browse files

Add changelog + changelog publishing CI job

parent 5b4b2ac3
Pipeline #94520 passed with stage
in 34 seconds
stages:
- tags
### Toot tag
##
#
pouet-it:
image: hatsoftwares/pouet-it-from-ci:latest
stage: tags
script:
- cd /opt/pouet-it-from-ci
- export MESSAGE="Je viens de sortir une nouvelle version de ${CI_PROJECT_NAME} !\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}"
- export MESSAGE=$(echo -e "Je viens de sortir une nouvelle version de ${CI_PROJECT_NAME} !\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}")
- carton exec ./pouet-it-from-ci.pl
only:
- tags
### Publish tag changelog
##
#
publish_changelog:
image: hatsoftwares/curl-jq:latest
stage: tags
script:
- export PROJECT_API_URL="https://framagit.org/api/v4/projects/${CI_PROJECT_ID}"
- export DESCRIPTION_URL="${PROJECT_API_URL}/repository/tags/${CI_COMMIT_TAG}/release"
- 'export HEADER="Private-Token: ${GITLAB_API_TOKEN}"'
- sed -n '/^'$CI_COMMIT_TAG'[[:space:]]/,/^[^\t]/p' CHANGELOG | sed -e 's/^[^\t].*//' -e 's/\t//g' | sed '/^[[:space:]]*$/d' > /tmp/text
- if [[ ! -z $GITLAB_API_TOKEN ]]; then curl -s --request POST --data-urlencode "description@/tmp/text" --header "${HEADER}" "${DESCRIPTION_URL}"; fi
only:
- tags
Revision history for Pouet it from CI
0.0.2 2018-12-08
- Add changelog
- Add changelog publishing job in CI
0.0.1 2018-12-07
- First version
......@@ -20,7 +20,7 @@ pouet-it:
image: hatsoftwares/pouet-it-from-ci:latest
script:
- cd /opt/pouet-it-from-ci
- export MESSAGE="Je viens de sortir une nouvelle version de ${CI_PROJECT_NAME} !\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}"
- export MESSAGE=$(echo -e "I just released a new version of ${CI_PROJECT_NAME} !\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}")
- carton exec ./pouet-it-from-ci.pl
only:
- tags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment