-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (59 loc) · 2.73 KB
/
deploy-sandbox.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow can be run with local CF commands or from the CLI
# gh workflow run deploy-sandbox.yaml -f environment=<your environment>
name: Deploy sandbox
run-name: Deploy sandbox in ${{ github.event.inputs.environment }}
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Which environment should we deploy to?
options:
- design
- eric
- greg
- james
jobs:
deploy-sandbox:
runs-on: ubuntu-latest
env:
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
steps:
- uses: actions/checkout@v4
- name: set library versions
uses: ./.github/actions/set-library-versions
- name: bundle javascript
uses: ./.github/actions/javascript-bundle
- name: Deploy api interop layer in ${{ github.event.inputs.environment }} space
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: nws-weathergov
cf_space: ${{ github.event.inputs.environment }}
cf_command: "push api-weathergov-${{ github.event.inputs.environment }} -f manifests/manifest-${{ github.event.inputs.environment }}.yaml --var newrelic-license='${{ secrets.NEWRELIC_LICENSE }}' --strategy rolling"
- name: Deploy application in ${{ github.event.inputs.environment }} space
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: nws-weathergov
cf_space: ${{ github.event.inputs.environment }}
cf_command: "push weathergov-${{ github.event.inputs.environment }} -f manifests/manifest-${{ github.event.inputs.environment }}.yaml --var newrelic-license='${{ secrets.NEWRELIC_LICENSE }}' --strategy rolling"
- name: Run post-deploy steps in ${{ github.event.inputs.environment }} space
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: nws-weathergov
cf_space: ${{ github.event.inputs.environment }}
cf_command: "run-task weathergov-${{ github.event.inputs.environment }} --command './scripts/post-deploy.sh' --name 'weathergov-${{ github.event.inputs.environment }}-deploy' -k '2G' -m '256M'"
new-relic-record:
name: Record deployment to New Relic
needs:
- deploy-sandbox
uses: ./.github/workflows/new-relic-deployment.yaml
with:
environment: ${{ github.event.inputs.environment }}
secrets: inherit