diff --git a/.github/workflows/cd-internal-testnet.yml b/.github/workflows/cd-internal-testnet.yml index 1b54bf40..973b84ec 100644 --- a/.github/workflows/cd-internal-testnet.yml +++ b/.github/workflows/cd-internal-testnet.yml @@ -47,3 +47,12 @@ jobs: erc20-deployer-network-name: internal_testnet secrets: inherit needs: [start-chain-api] + post-pipeline-metrics: + uses: ./.github/workflows/metric-pipeline.yml + if: always() # always run so we metric failures and successes + with: + aws-region: us-east-1 + metric-name: kava.deploys.testnet.internal + namespace: Kava/ContinuousDeployment + secrets: inherit + needs: [seed-chain-state] diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index d3f36753..8dd2e397 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -39,3 +39,12 @@ jobs: AWS_REGION: us-east-1 AWS_ACCESS_KEY_ID: ${{ secrets.CI_AWS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_AWS_KEY_SECRET }} + post-pipeline-metrics: + uses: ./.github/workflows/metric-pipeline.yml + if: always() # always run so we metric failures and successes + with: + aws-region: us-east-1 + metric-name: kava.releases.merge + namespace: Kava/ContinuousIntegration + secrets: inherit + needs: [publish-internal] diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index 3727fd94..62d937e1 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -14,4 +14,7 @@ jobs: if: always() # always run so we metric failures and successes with: aws-region: us-east-1 + metric-name: kava.releases.pr + namespace: Kava/ContinuousIntegration secrets: inherit + needs: [default] diff --git a/.github/workflows/metric-pipeline.yml b/.github/workflows/metric-pipeline.yml index b982c4c8..92eb6822 100644 --- a/.github/workflows/metric-pipeline.yml +++ b/.github/workflows/metric-pipeline.yml @@ -6,6 +6,12 @@ on: aws-region: required: true type: string + metric-name: + required: true + type: string + namespace: + required: true + type: string secrets: CI_AWS_KEY_ID: required: true @@ -24,7 +30,10 @@ jobs: aws-secret-access-key: ${{ secrets.CI_AWS_KEY_SECRET }} aws-region: ${{ inputs.aws-region }} if: always() # Setup credentials even if the workflow failed - - name: Log Build + - name: Metric Pipleline Success # replace TAG by the latest tag in the repository uses: ros-tooling/action-cloudwatch-metrics@0.0.5 if: always() # Need to run to log the workflow failure + with: + metric-name: ${{ inputs.metric-name }} + namespace: ${{ inputs.namespace }}