Skip to content

Commit 9ff230f

Browse files
authored
Merge pull request mozilla-iam#937 from bheesham/allow-manual-override-of-deploy
Disabled webhook builds, so we need a manual trigger
2 parents 0aecb12 + dfbf32b commit 9ff230f

2 files changed

Lines changed: 25 additions & 12 deletions

File tree

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,21 @@ make test
144144

145145
# CI Pipeline
146146

147-
This GitHub repo has a webhook configured which triggers the `apps_yml` AWS
148-
CodeBuild job in the `mozilla-iam` AWS account in `us-west-2`. This CodeBuild
149-
job follows the [`buildspec.yml`](buildspec.yml) which calls [`deploy.sh`](deploy.sh)
150-
to deploy the change.
147+
The CI Pipeline has been disabled for now, until we can revive it. Deploys will
148+
need to be manual.
149+
150+
To deploy the `master` branch, run:
151+
152+
```
153+
AWS_PROFILE=iam-admin aws codebuild start-build \
154+
--project-name apps_yml \
155+
--environment-variables-override 'name=MANUAL_DEPLOY_TRIGGER,value=branch/master'
156+
```
157+
158+
To deploy a release, run:
159+
160+
```
161+
AWS_PROFILE=iam-admin aws codebuild start-build \
162+
--project-name apps_yml \
163+
--environment-variables-override 'name=MANUAL_DEPLOY_TRIGGER,value=tags/<tag>'
164+
```

deploy.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
#!/bin/bash
22

3-
echo "Begin deploy of the apps.yml file."
4-
echo "$CODEBUILD_WEBHOOK_TRIGGER"
3+
TRIGGER=${CODEBUILD_WEBHOOK_TRIGGER:-${MANUAL_DEPLOY_TRIGGER:-}}
54

5+
echo "Begin deploy of the apps.yml file."
6+
echo "Webhook trigger: ${CODEBUILD_WEBHOOK_TRIGGER:-None}"
7+
echo "Manual deploy trigger: ${MANUAL_DEPLOY_TRIGGER:-None}"
8+
echo "Effective trigger: $TRIGGER"
69

7-
if [[ "branch/master" == "$CODEBUILD_WEBHOOK_TRIGGER" ]]
8-
then
10+
if [[ "$TRIGGER" == "branch/master" ]]; then
911
echo "Deploying to the development CDN cdn.sso.allizom.org"
1012
make deploy S3_BUCKET=sso-dashboard.configuration
11-
elif [[ "$CODEBUILD_WEBHOOK_TRIGGER" =~ ^tag\/[0-9]+\.[0-9]+\.[0-9]+(\-(prod))?$ ]]
12-
then
13+
elif [[ "$TRIGGER" =~ ^tag\/[0-9]+\.[0-9]+\.[0-9]+(\-(prod))?$ ]]; then
1314
echo "Deploying to the production CDN cdn.sso.mozilla.com"
1415
make deploy S3_BUCKET=sso-dashboard.configuration-prod
1516
fi
1617

17-
18-
echo "$CODEBUILD_WEBHOOK_TRIGGER"
1918
echo "End deploy of the apps.yml."

0 commit comments

Comments
 (0)