Skip to content

Commit 0bb38f7

Browse files
author
Christina Harlow
authored
Merge pull request #45 from mozilla/SE-2508
disable manual deploys from tagging images with full commit SHA
2 parents 7508eeb + ff462f9 commit 0bb38f7

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

.github/workflows/cd.yaml

+2-15
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ jobs:
8383
uses: aws-actions/amazon-ecr-login@v1
8484
- name: Build and Push Stage Image to ECR
8585
id: build-push
86-
if: github.ref == 'refs/heads/master'
8786
env:
8887
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
8988
ECR_REPOSITORY: discourse
@@ -101,20 +100,8 @@ jobs:
101100
./launcher bootstrap app
102101
docker tag local_discourse/app:latest $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
103102
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
104-
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA
105-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA
106-
- name: Pull Stage Image, Tag Prod, & Push Prod to ECR
107-
id: pull-tag-push
108-
if: github.event_name == 'release' && github.event.action == 'released'
109-
env:
110-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
111-
ECR_REPOSITORY: discourse
112-
ENV: ${{ needs.prepare.outputs.ENV }}
113-
TAG: ${{ needs.prepare.outputs.TAG }}
114-
run: |
115-
docker pull $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA
116-
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
117-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
103+
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$GITHUB_SHA
104+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$GITHUB_SHA
118105
- name: Logut of Amazon ECR
119106
if: always()
120107
run: docker logout ${{ steps.login-ecr.outputs.registry }}

.github/workflows/manual_delivery.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ jobs:
9898
./launcher bootstrap app
9999
docker tag local_discourse/app:latest $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
100100
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG
101-
docker tag $ECR_REGISTRY/$ECR_REPOSITORY:$ENV-$TAG $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA
102-
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$GITHUB_SHA
103101
- name: Logut of Amazon ECR
104102
if: always()
105103
run: docker logout ${{ steps.login-ecr.outputs.registry }}

discourse-prod.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ hooks:
2323
cd: $home/plugins
2424
cmd:
2525
- mkdir -p plugins
26-
- git clone https://github.com/discourse/discourse-akismet.git
27-
- git clone https://github.com/mozilla/discourse-mozilla-iam.git
28-
- git clone https://github.com/mozilla/discourse-expose-emails-in.git
29-
- git clone https://github.com/mozilla/discourse-post-read-email.git
30-
- git clone https://github.com/discourse/discourse-solved.git
31-
- git clone https://github.com/mozilla/discourse-sidekiq-monitor.git
32-
- git clone https://github.com/mozilla/discourse-mozilla-letter-avatar.git
33-
- git clone https://github.com/mozilla/discourse-auto-email-in
34-
- git clone https://github.com/mozilla/discourse-group-category-notification.git
35-
- git clone https://github.com/mozilla/discourse-mozilla-gcm
26+
- git clone https://github.com/discourse/discourse-akismet.git # 11ef295b5c65684f00ccf55cb4bef5656cd0ba9b
27+
- git clone https://github.com/mozilla/discourse-mozilla-iam.git # f66123785a02a67ca10d13649cea00c772f7e40a
28+
- git clone https://github.com/mozilla/discourse-expose-emails-in.git # e4e92b02bd150c72585eba232a27aa4bf9e7f5fb
29+
- git clone https://github.com/mozilla/discourse-post-read-email.git # 0031da69216ba759cbf5cdda4ff4ad818e4a617f
30+
- git clone https://github.com/discourse/discourse-solved.git # 02981fe1d9463cee4d8f64228a74da21fc38d90b
31+
- git clone https://github.com/mozilla/discourse-sidekiq-monitor.git # 34178b637ea508d2ef103b6d48d2e0c21af155dd
32+
- git clone https://github.com/mozilla/discourse-mozilla-letter-avatar.git # a5cc90fdafe523a21b5b54abe63d7798efe77b49
33+
- git clone https://github.com/mozilla/discourse-auto-email-in # ca205f63e8b8852154fddd30bf09c994070727e2
34+
- git clone https://github.com/mozilla/discourse-group-category-notification.git # 8be0c45e8a19c4c702a8a468e882d9968a967ee9
35+
- git clone https://github.com/mozilla/discourse-mozilla-gcm # 1d15d63e6dca4d33f1ea38c9eb2395034c467ef2
3636
run:
3737
- exec: echo "Beginning of custom commands"
3838
## If you want to set the 'From' email address for your first registration, uncomment and change:

0 commit comments

Comments
 (0)