Skip to content

#10 Remove logging

#10 Remove logging #8

Workflow file for this run

name: 'CD'
on:
workflow_dispatch:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
prepare:
name: 'Prepare'
uses: rfcx/cicd/.github/workflows/notify-prepare.yaml@master
with:
repo: arbimon-soundscapes
workflow-id: cd.yaml
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
configure:
name: 'Configure'
runs-on: ubuntu-latest
needs: [prepare]
outputs:
namespace: ${{ steps.configuration.outputs.namespace }}
steps:
- name: 'Conditional environment'
id: configuration
run: |
if [[ "${{ needs.prepare.outputs.branch-name }}" == "master" ]]; then
echo "::set-output name=namespace::production"
elif [[ "${{ needs.prepare.outputs.branch-name }}" == "staging" ]]; then
echo "::set-output name=namespace::staging"
else
echo "::set-output name=namespace::testing"
fi
build:
name: 'Build'
needs: [prepare, configure]
uses: rfcx/cicd/.github/workflows/ecr-build-push.yaml@master
with:
dockerfile: build/Dockerfile
targets: "[\"arbimon-soundscapes\"]"
tag-environment: ${{ needs.configure.outputs.namespace }}
tag-latest: ${{ needs.configure.outputs.namespace == 'production' }}
secrets:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
deploy:
name: 'Deploy'
needs: [build, configure]
uses: rfcx/cicd/.github/workflows/k8s-deploy.yaml@master
with:
tag: ${{ needs.build.outputs.unique-tag }}
namespace: ${{ needs.configure.outputs.namespace }}
secrets:
kube-config: ${{ secrets.KUBE_CONFIG_SUPER }}
notify:
name: 'Notify'
if: ${{ always() }}
needs: [prepare, build, deploy]
uses: rfcx/cicd/.github/workflows/notify-send.yaml@master
with:
repo: arbimon-soundscapes
branch-name: ${{ needs.prepare.outputs.branch-name }}
workflow-id: cd.yaml
previous-run-id: ${{ needs.prepare.outputs.previous-run-id }}
status: ${{ needs.build.result }}
always: true
notification-title: 'CD: Arbimon Soundscapes'
notification-footer: "Build: ${{ needs.build.result || 'n/a' }}"
notification-success-statement: '{0} pushed the build!'
secrets:
slack-webhook: ${{ secrets.SLACK_ALERT_COREDT_WEBHOOK }}
github-token: ${{ secrets.GITHUB_TOKEN }}