pipeline fix v8
This commit is contained in:
25
.github/workflows/deploy-docker-to-tst.yml
vendored
25
.github/workflows/deploy-docker-to-tst.yml
vendored
@@ -112,14 +112,14 @@ jobs:
|
|||||||
password: ${{ secrets.ALPINE_PASSWORD }}
|
password: ${{ secrets.ALPINE_PASSWORD }}
|
||||||
script: |
|
script: |
|
||||||
VERSION=${{ env.VERSION }}
|
VERSION=${{ env.VERSION }}
|
||||||
echo "Gekozen versie: $VERSION-SNAPSHOT"
|
echo "Gekozen versie: $VERSION"
|
||||||
|
|
||||||
# Stop en verwijder de huidige container
|
# Stop en verwijder de huidige container
|
||||||
docker stop paypoint-backend || true
|
docker stop paypoint-backend || true
|
||||||
docker rm paypoint-backend || true
|
docker rm paypoint-backend || true
|
||||||
|
|
||||||
# Haal de nieuwste image binnen
|
# Haal de nieuwste image binnen
|
||||||
docker pull veenm/paypoint-backend-jvm:$VERSION-SNAPSHOT
|
docker pull veenm/paypoint-backend-jvm:$VERSION
|
||||||
|
|
||||||
# Start een nieuwe container
|
# Start een nieuwe container
|
||||||
docker run -d --name paypoint-backend --restart unless-stopped -p 15000:8080 \
|
docker run -d --name paypoint-backend --restart unless-stopped -p 15000:8080 \
|
||||||
@@ -135,6 +135,7 @@ jobs:
|
|||||||
-e MAILER_PASSWORD=${{ secrets.MAILER_PASSWORD }} \
|
-e MAILER_PASSWORD=${{ secrets.MAILER_PASSWORD }} \
|
||||||
veenm/paypoint-backend-jvm:$VERSION
|
veenm/paypoint-backend-jvm:$VERSION
|
||||||
|
|
||||||
|
|
||||||
# Opruimen oude images
|
# Opruimen oude images
|
||||||
docker image prune -f
|
docker image prune -f
|
||||||
|
|
||||||
@@ -150,3 +151,23 @@ jobs:
|
|||||||
"message": "@all ✅ *Build is geslaagd!* Versie '"$VERSION"' staat klaar op https://test-paypoint.melvanveen.nl"
|
"message": "@all ✅ *Build is geslaagd!* Versie '"$VERSION"' staat klaar op https://test-paypoint.melvanveen.nl"
|
||||||
}' \
|
}' \
|
||||||
https://mattermost.melvanveen.nl/api/v4/posts
|
https://mattermost.melvanveen.nl/api/v4/posts
|
||||||
|
|
||||||
|
notify-failure:
|
||||||
|
needs: [ build-and-push, deploy ]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: failure()
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Notify Mattermost via Bot on failure
|
||||||
|
env:
|
||||||
|
MATTERMOST_BOT_TOKEN: ${{ secrets.MATTERMOST_BOT_TOKEN }}
|
||||||
|
REPO: ${{ gitea.repository }}
|
||||||
|
BRANCH: ${{ gitea.ref }}
|
||||||
|
run: |
|
||||||
|
curl --fail -X POST -H "Authorization: Bearer $MATTERMOST_BOT_TOKEN" \
|
||||||
|
-H 'Content-Type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"channel_id": "9a8obynkd7rctk6qf8rfe6oppy",
|
||||||
|
"message": "@all ❌ *Build gefaald!* De pipeline is stukgelopen voor *'"$REPO"'* op branch *'"$BRANCH"'*."
|
||||||
|
}' \
|
||||||
|
https://mattermost.melvanveen.nl/api/v4/posts
|
||||||
|
|||||||
Reference in New Issue
Block a user