diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index bf73c82..c092c53 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -35,43 +35,35 @@ jobs: echo "::set-output name=namespace::testing" fi - build: - name: 'Build' + deploy-rfcx-local: + name: 'Deploy: rfcx-local' needs: [prepare, configure] - uses: rfcx/cicd/.github/workflows/ecr-build-push.yaml@master + if: ${{ needs.configure.outputs.namespace == 'production' }} + uses: rfcx/cicd/.github/workflows/rfcx-local-cd.yaml@master with: + repo: device-api dockerfile: build/Dockerfile - targets: "[\"device-api\"]" - 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 }} + targets: '["device-api"]' + deployments: | + [ + {"name": "device-api", "image": "device-api"} + ] - 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] + needs: [prepare, deploy-rfcx-local] uses: rfcx/cicd/.github/workflows/notify-send.yaml@master with: repo: device-api branch-name: ${{ needs.prepare.outputs.branch-name }} workflow-id: cd.yaml previous-run-id: ${{ needs.prepare.outputs.previous-run-id }} - status: ${{ needs.deploy.result }} + status: ${{ needs.deploy-rfcx-local.result }} always: true notification-title: 'CD: Device API' - notification-footer: "Build: ${{ needs.build.result || 'n/a' }} | Deploy: ${{ needs.deploy.result || 'n/a' }}" + notification-footer: "Deploy (rfcx-local): ${{ needs.deploy-rfcx-local.result || 'n/a' }}" notification-success-statement: '{0} deployed the build!' secrets: slack-webhook: ${{ secrets.SLACK_ALERT_COREDT_WEBHOOK }}