Pipeline updates
This commit is contained in:
+87
@@ -0,0 +1,87 @@
|
|||||||
|
### macOS
|
||||||
|
# Finder metadata
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Custom folder icons
|
||||||
|
Icon␍
|
||||||
|
|
||||||
|
# Volume root files
|
||||||
|
.DocumentRevisions-V100
|
||||||
|
.fseventsd
|
||||||
|
.Spotlight-V100
|
||||||
|
.TemporaryItems
|
||||||
|
.Trashes
|
||||||
|
.VolumeIcon.icns
|
||||||
|
.com.apple.timemachine.donotpresent
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
# Windows thumbnail cache files
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
[Dd]esktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
# Backup files
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Temporary files from deleted open files
|
||||||
|
.fuse_hidden*
|
||||||
|
|
||||||
|
# KDE directory preferences
|
||||||
|
.directory
|
||||||
|
|
||||||
|
# Linux trash folder
|
||||||
|
.Trash-*
|
||||||
|
|
||||||
|
# NFS temporary files
|
||||||
|
.nfs*
|
||||||
|
|
||||||
|
### Python
|
||||||
|
# Byte-compiled files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
*.egg-info/
|
||||||
|
*.egg
|
||||||
|
|
||||||
|
# dotenv environment variable files
|
||||||
|
.env
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Type checkers
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
# .python-version
|
||||||
+36
-24
@@ -22,19 +22,23 @@ steps:
|
|||||||
--label "git.branch=${CI_COMMIT_BRANCH}" \
|
--label "git.branch=${CI_COMMIT_BRANCH}" \
|
||||||
.
|
.
|
||||||
|
|
||||||
- name: Send Build Status Notification (failure)
|
- name: Send Docker Image Build Status Notification (failure)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
MATTERMOST_BOT_ACCESS_TOKEN:
|
||||||
from_secret: discord_webhook_url
|
from_secret: mattermost_bot_access_token
|
||||||
|
MATTERMOST_CHANNEL_ID:
|
||||||
|
from_secret: mattermost_pushes_channel_id
|
||||||
|
MATTERMOST_POST_API_URL:
|
||||||
|
from_secret: mattermost_post_api_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Build failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Docker image build failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
|
||||||
depends_on:
|
depends_on:
|
||||||
- Docker image build
|
- Docker image build
|
||||||
when:
|
when:
|
||||||
- status: [ failure ]
|
- status: [failure]
|
||||||
|
|
||||||
- name: Push to registry
|
- name: Push to registry
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
@@ -57,30 +61,38 @@ steps:
|
|||||||
- docker push $REGISTRY_REPO:latest
|
- docker push $REGISTRY_REPO:latest
|
||||||
- echo "✓ Images pushed successfully"
|
- echo "✓ Images pushed successfully"
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (success)
|
- name: Send Push to Registry Status Notification (success)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
MATTERMOST_BOT_ACCESS_TOKEN:
|
||||||
from_secret: discord_webhook_url
|
from_secret: mattermost_bot_access_token
|
||||||
|
MATTERMOST_CHANNEL_ID:
|
||||||
|
from_secret: mattermost_pushes_channel_id
|
||||||
|
MATTERMOST_POST_API_URL:
|
||||||
|
from_secret: mattermost_post_api_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Push to registry success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
|
||||||
depends_on:
|
depends_on:
|
||||||
- Push to registry
|
- Push to registry
|
||||||
when:
|
when:
|
||||||
- status: [ success ]
|
- status: [success]
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (failure)
|
- name: Send Push to Registry Status Notification (failure)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
MATTERMOST_BOT_ACCESS_TOKEN:
|
||||||
from_secret: discord_webhook_url
|
from_secret: mattermost_bot_access_token
|
||||||
|
MATTERMOST_CHANNEL_ID:
|
||||||
|
from_secret: mattermost_pushes_channel_id
|
||||||
|
MATTERMOST_POST_API_URL:
|
||||||
|
from_secret: mattermost_post_api_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Publish failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Push to registry failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
|
||||||
depends_on:
|
depends_on:
|
||||||
- Push to registry
|
- Push to registry
|
||||||
when:
|
when:
|
||||||
- status: [ failure ]
|
- status: [failure]
|
||||||
|
|||||||
+25
-17
@@ -16,35 +16,43 @@ steps:
|
|||||||
- name: Deploy to Production
|
- name: Deploy to Production
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
PORTAINER_WEBHOOK_URL:
|
WEBHOOK_URL:
|
||||||
from_secret: portainer_webhook_url
|
from_secret: dockhand_webhook_url
|
||||||
commands:
|
commands:
|
||||||
- curl -sS -X POST "$PORTAINER_WEBHOOK_URL"
|
- curl -sS -X POST "$WEBHOOK_URL"
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (success)
|
- name: Send Deploy Status Notification (success)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
MATTERMOST_BOT_ACCESS_TOKEN:
|
||||||
from_secret: discord_webhook_url
|
from_secret: mattermost_bot_access_token
|
||||||
|
MATTERMOST_CHANNEL_ID:
|
||||||
|
from_secret: mattermost_pushes_channel_id
|
||||||
|
MATTERMOST_POST_API_URL:
|
||||||
|
from_secret: mattermost_post_api_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy success 🎉"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
|
||||||
depends_on:
|
depends_on:
|
||||||
- Deploy to Production
|
- Deploy to Production
|
||||||
when:
|
when:
|
||||||
- status: [ success ]
|
- status: [success]
|
||||||
|
|
||||||
- name: Send Deploy Status Notification (failure)
|
- name: Send Deploy Status Notification (failure)
|
||||||
image: curlimages/curl
|
image: curlimages/curl
|
||||||
environment:
|
environment:
|
||||||
DISCORD_WEBHOOK_URL:
|
MATTERMOST_BOT_ACCESS_TOKEN:
|
||||||
from_secret: discord_webhook_url
|
from_secret: mattermost_bot_access_token
|
||||||
|
MATTERMOST_CHANNEL_ID:
|
||||||
|
from_secret: mattermost_pushes_channel_id
|
||||||
|
MATTERMOST_POST_API_URL:
|
||||||
|
from_secret: mattermost_post_api_url
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
BODY=$(printf '{"channel_id":"%s","message":"[%s - Build #%s] Production Deploy failure 💩"}' "$MATTERMOST_CHANNEL_ID" "$CI_REPO" "$CI_PIPELINE_NUMBER")
|
||||||
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL"
|
curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" -H "Authorization: Bearer $MATTERMOST_BOT_ACCESS_TOKEN" $MATTERMOST_POST_API_URL
|
||||||
depends_on:
|
depends_on:
|
||||||
- Deploy to Production
|
- Deploy to Production
|
||||||
when:
|
when:
|
||||||
- status: [ failure ]
|
- status: [failure]
|
||||||
|
|||||||
Reference in New Issue
Block a user