Skip to content

Commit

Permalink
Deploy staging thumbnails along with staging API (#2455)
Browse files Browse the repository at this point in the history
* Deploy staging thumbnails along with staging API

* Update ci/cd workflow docs
  • Loading branch information
sarayourfriend authored Jun 22, 2023
1 parent cdaa236 commit ae8267e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,22 @@ jobs:
wait_time: 60 # check every minute
max_time: 1800 # allow up to 30 minutes for a deployment

- name: Deploy staging thumbnails
uses: felixp8/dispatch-and-wait@v0.1.0
with:
owner: WordPress
repo: openverse-infrastructure
token: ${{ secrets.ACCESS_TOKEN }}
event_type: deploy_staging_api_thumbnails
client_payload: |
{
"actor": "${{ github.actor }}",
"tag": "${{ needs.get-image-tag.outputs.image_tag }}",
"run_name": "${{ steps.commit.outputs.commit_message }}"
}
wait_time: 60 # check every minute
max_time: 1800 # allow up to 30 minutes for a deployment

################
# Notification #
################
Expand Down
7 changes: 4 additions & 3 deletions documentation/meta/ci_cd/jobs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

## `deploy-api`

Triggers a separate workflow using `workflow_dispatch` that deploys the staging
environment of the API service to AWS ECS. That workflow is given two inputs.
Triggers two separate workflows using `workflow_dispatch` that deploys the
staging environment of the API service and the thumbnails-specific API
deployment to AWS ECS. That workflows are given two inputs.

- the tag of the image that was published by the
[`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job, which is
the output of the
[`get-image-tag`](/meta/ci_cd/jobs/preparation.md#get-image-tag) job
- the actor of the CI + CD workflow, for tagging them in Slack messages

This deployment is only triggered if all the following conditions are met.
The deployments are only triggered if all the following conditions are met.

- the API codebase has changed
- the [`publish-images`](/meta/ci_cd/jobs/docker.md#publish-images) job has
Expand Down

0 comments on commit ae8267e

Please sign in to comment.