Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
R2Devops
Hub
Commits
2afa16dd
Commit
2afa16dd
authored
11 months ago
by
Totara-thib
Browse files
Options
Downloads
Patches
Plain Diff
ci(conf): restore discord_notifier job
parent
c65c8af6
No related branches found
No related tags found
1 merge request
!479
Resolve "Restore discord_notifier job"
Pipeline
#1206703380
passed
11 months ago
Stage: static_tests
Stage: deploy
Stage: .after-deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-26
26 additions, 26 deletions
.gitlab-ci.yml
with
26 additions
and
26 deletions
.gitlab-ci.yml
+
26
−
26
View file @
2afa16dd
...
...
@@ -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}
...
...
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