Skip to content
Snippets Groups Projects
Commit 2afa16dd authored by Totara-thib's avatar Totara-thib
Browse files

ci(conf): restore discord_notifier job

parent c65c8af6
No related branches found
No related tags found
1 merge request!479Resolve "Restore discord_notifier job"
Pipeline #1206703380 passed
......@@ -209,32 +209,32 @@ template_release:
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH_SLUG == "r2devops-hub"'
# discord_notifier:
# image:
# name: alpine/httpie:${IMAGE_TAG_HTTPIE_ALPINE}
# entrypoint: [""]
# stage: .after-deploy
# dependencies:
# - template_release
# variables:
# RELEASE_PATH: "${CI_PROJECT_DIR}/releases"
# PIPENV_PIPFILE: tools/notify/Pipfile
# before_script:
# - apk update && apk add --no-cache bash
# - pip install --ignore-installed distlib pipenv
# - pipenv install
# script:
# - RELEASES=$(ls "$RELEASE_PATH")
# - |
# for release in $RELEASES; do
# JOB="$(echo "$release" | cut -d'@' -f1 | sed -e 's/|/\//g')"
# VERSION="$(echo "$release" | sed -E 's/.*@([0-9]+\.[0-9]+\.[0-9]+)\..*$/\1/')"
# CHANGELOG=$(cat "$RELEASE_PATH/$release")
# echo "New version detected for $JOB@$VERSION, sending notification to discord"
# pipenv run python tools/notify/discord_release_notify.py -n ${JOB} -v ${VERSION} -c "${CHANGELOG}"
# done
# rules:
# - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH_SLUG == "r2devops-hub"'
discord_notifier:
image:
name: alpine/httpie:${IMAGE_TAG_HTTPIE_ALPINE}
entrypoint: [""]
stage: .after-deploy
dependencies:
- template_release
variables:
RELEASE_PATH: "${CI_PROJECT_DIR}/releases"
PIPENV_PIPFILE: tools/notify/Pipfile
before_script:
- apk update && apk add --no-cache bash
- pip install --ignore-installed distlib pipenv
- pipenv install
script:
- RELEASES=$(ls "$RELEASE_PATH")
- |
for release in $RELEASES; do
JOB="$(echo "$release" | cut -d'@' -f1 | sed -e 's/|/\//g')"
VERSION="$(echo "$release" | sed -E 's/.*@([0-9]+\.[0-9]+\.[0-9]+)\..*$/\1/')"
CHANGELOG=$(cat "$RELEASE_PATH/$release")
echo "New version detected for $JOB@$VERSION, sending notification to discord"
pipenv run python tools/notify/discord_release_notify.py -n ${JOB} -v ${VERSION} -c "${CHANGELOG}"
done
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_PATH_SLUG == "r2devops-hub"'
refresh_job_av_database:
image: python:${IMAGE_TAG_PYTHON_ALPINE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment