Skip to content

Deploy sandbox in greg #234

Deploy sandbox in greg

Deploy sandbox in greg #234

Workflow file for this run

# 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