Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API interop layer deploy actions #1897

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/deploy-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,24 @@ jobs:
- uses: actions/checkout@v4
- 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 -f manifests/manifest-${{ github.event.inputs.environment }}.yaml --var newrelic-license='${{ secrets.NEWRELIC_LICENSE }}' --var allowed-ips='${{secrets.ALLOWED_IP_ADDRESSES}}' --strategy rolling"
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
Expand Down
55 changes: 34 additions & 21 deletions .github/workflows/deploy-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,40 @@ jobs:
deploy-staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: bundle javascript
uses: ./.github/actions/javascript-bundle
- name: Deploy to cloud.gov weathergov-staging space
uses: cloud-gov/cg-cli-tools@main
env:
DEPLOY_NOW: thanks
with:
cf_username: ${{ secrets.CF_STAGING_USERNAME }}
cf_password: ${{ secrets.CF_STAGING_PASSWORD }}
cf_org: nws-weathergov
cf_space: staging
cf_command: "push -f manifests/manifest-staging.yaml --var newrelic-license=${{ secrets.NEWRELIC_LICENSE }} --strategy rolling"
- name: Run post deploy steps
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_STAGING_USERNAME }}
cf_password: ${{ secrets.CF_STAGING_PASSWORD }}
cf_org: nws-weathergov
cf_space: staging
cf_command: "run-task weathergov-staging --command './scripts/post-deploy.sh' --name 'weathergov-staging-deploy' -k '2G' -m '256M'"
- uses: actions/checkout@v4
- name: bundle javascript
uses: ./.github/actions/javascript-bundle

- name: Deploy api interop layer to cloud.gov weathergov-staging space
uses: cloud-gov/cg-cli-tools@main
env:
DEPLOY_NOW: thanks
with:
cf_username: ${{ secrets.CF_STAGING_USERNAME }}
cf_password: ${{ secrets.CF_STAGING_PASSWORD }}
cf_org: nws-weathergov
cf_space: staging
cf_command: "push api-weathergov-staging -f manifests/manifest-staging.yaml --var newrelic-license=${{ secrets.NEWRELIC_LICENSE }} --strategy rolling"

- name: Deploy application to cloud.gov weathergov-staging space
uses: cloud-gov/cg-cli-tools@main
env:
DEPLOY_NOW: thanks
with:
cf_username: ${{ secrets.CF_STAGING_USERNAME }}
cf_password: ${{ secrets.CF_STAGING_PASSWORD }}
cf_org: nws-weathergov
cf_space: staging
cf_command: "push weathergov-staging -f manifests/manifest-staging.yaml --var newrelic-license=${{ secrets.NEWRELIC_LICENSE }} --strategy rolling"

- name: Run post deploy steps
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_STAGING_USERNAME }}
cf_password: ${{ secrets.CF_STAGING_PASSWORD }}
cf_org: nws-weathergov
cf_space: staging
cf_command: "run-task weathergov-staging --command './scripts/post-deploy.sh' --name 'weathergov-staging-deploy' -k '2G' -m '256M'"

new-relic-record:
name: Record deployment to New Relic
Expand Down
27 changes: 22 additions & 5 deletions manifests/manifest-design.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,28 @@ default_config: &defaults
- secrets

applications:
- name: weathergov-design
<<: *defaults
memory: 256M
instances: 1
random-route: false
- name: weathergov-design
<<: *defaults
memory: 256M
instances: 1
random-route: false

- name: api-weathergov-design
stack: cflinuxfs4
memory: 256M
instances: 1
buildpacks:
- nodejs_buildpack
env:
NEWRELIC_LICENSE: ((newrelic-license))
API_INTEROP_PRODUCTION: true
API_INTEROP_NAME: design
API_URL: https://weathergov-api-proxy.app.cloud.gov
health-check-type: process
path: ../api-interop-layer
random-route: false
services:
- database
# - name: cronish
# <<: *defaults
# no-route: true
Expand Down
26 changes: 21 additions & 5 deletions manifests/manifest-eric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,27 @@ default_config: &defaults
- secrets

applications:
- name: weathergov-eric
<<: *defaults
memory: 256M
instances: 1
random-route: false
- name: weathergov-eric
<<: *defaults
memory: 256M
instances: 1
random-route: false

- name: api-weathergov-eric
stack: cflinuxfs4
memory: 256M
instances: 1
buildpacks:
- nodejs_buildpack
env:
NEWRELIC_LICENSE: ((newrelic-license))
API_INTEROP_PRODUCTION: true
API_INTEROP_NAME: eric
health-check-type: process
path: ../api-interop-layer
random-route: false
services:
- database
# - name: cronish
# <<: *defaults
# no-route: true
Expand Down
26 changes: 21 additions & 5 deletions manifests/manifest-greg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,27 @@ default_config: &defaults
- secrets

applications:
- name: weathergov-greg
<<: *defaults
memory: 256M
instances: 1
random-route: false
- name: weathergov-greg
<<: *defaults
memory: 256M
instances: 1
random-route: false

- name: api-weathergov-greg
stack: cflinuxfs4
memory: 256M
instances: 1
buildpacks:
- nodejs_buildpack
env:
NEWRELIC_LICENSE: ((newrelic-license))
API_INTEROP_PRODUCTION: true
API_INTEROP_NAME: greg
health-check-type: process
path: ../api-interop-layer
random-route: false
services:
- database
# - name: cronish
# <<: *defaults
# no-route: true
Expand Down
26 changes: 21 additions & 5 deletions manifests/manifest-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,27 @@ default_config: &defaults
- secrets

applications:
- name: weathergov-staging
<<: *defaults
memory: 256M
instances: 1
random-route: false
- name: weathergov-staging
<<: *defaults
memory: 256M
instances: 1
random-route: false

- name: api-weathergov-staging
stack: cflinuxfs4
memory: 256M
instances: 1
buildpacks:
- nodejs_buildpack
env:
NEWRELIC_LICENSE: ((newrelic-license))
API_INTEROP_PRODUCTION: true
API_INTEROP_NAME: staging
health-check-type: process
path: ../api-interop-layer
random-route: false
services:
- database
# - name: cronish
# <<: *defaults
# no-route: true
Expand Down
Loading