stages: - build - deploy include: - local: .gitlab-ci.d/app-client-docker.yml - local: .gitlab-ci.d/app-client-cf-pages.yml - local: .gitlab-ci.d/app-pay-cf-pages.yml report-deploy-client-success: ¬ificationJob image: alpine:latest stage: .post when: on_success needs: - deploy-app-client-docker rules: - if: $CI_COMMIT_BRANCH == "main" - if: $CI_COMMIT_BRANCH == "ci/pay" before_script: - apk add curl variables: NOTIFICATION_TEXT: "Frontend successfully deployed, check at https://app.prgms.io" script: - >- curl -s -S -X POST "https://api.telegram.org/bot${TELEGRAM_DEPLOY_NOTIFY_TOKEN}/sendMessage" -d "chat_id=${TELEGRAM_DEPLOY_NOTIFY_CHAT_ID}" -d text="$NOTIFICATION_TEXT" report-deploy-client-failure: <<: *notificationJob when: on_failure needs: - deploy-app-client-docker variables: NOTIFICATION_TEXT: "Frontend deployment failed, check pipeline at ${CI_PIPELINE_URL}" report-deploy-pay-success: <<: *notificationJob when: on_success needs: - deploy-app-pay-cf-pages variables: NOTIFICATION_TEXT: "Payment page successfully deployed, check at https://pay.prgms.io" report-deploy-pay-failure: <<: *notificationJob when: on_failure needs: - deploy-app-pay-cf-pages variables: NOTIFICATION_TEXT: "Payment page deployment failed, check pipeline at ${CI_PIPELINE_URL}"