Browse Source

Indent

pull/336/head v0.0.2
baarkerlounger 3 years ago
parent
commit
f0bb9c50de
  1. 106
      .github/workflows/production_pipeline.yml

106
.github/workflows/production_pipeline.yml

@ -131,58 +131,58 @@ jobs:
run: | run: |
bundle exec bundler-audit bundle exec bundler-audit
deploy: deploy:
name: Deploy name: Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: 'production' environment: 'production'
needs: [lint, test, audit] needs: [lint, test, audit]
steps:
- name: Get latest release with tag
id: latestrelease
run: |
echo "::set-output name=releasetag::$(curl -s https://api.github.com/repos/communitiesuk/mhclg-data-collection-beta/releases/latest | jq '.tag_name' | sed 's/\"//g')"
- name: Confirm release tag
run: |
echo ${{ steps.latestrelease.outputs.releasetag }}
- name: Checkout tag
uses: actions/checkout@v2
with:
ref: ${{ steps.latestrelease.outputs.releasetag }}
- name: Install Cloud Foundry CLI steps:
run: | - name: Get latest release with tag
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - id: latestrelease
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list run: |
sudo apt-get update echo "::set-output name=releasetag::$(curl -s https://api.github.com/repos/communitiesuk/mhclg-data-collection-beta/releases/latest | jq '.tag_name' | sed 's/\"//g')"
sudo apt-get install cf8-cli - name: Confirm release tag
- name: Deploy run: |
env: echo ${{ steps.latestrelease.outputs.releasetag }}
CF_USERNAME: ${{ secrets.CF_USERNAME }} - name: Checkout tag
CF_PASSWORD: ${{ secrets.CF_PASSWORD }} uses: actions/checkout@v2
CF_API_ENDPOINT: ${{ secrets.CF_API_ENDPOINT }} with:
CF_SPACE: ${{ secrets.CF_SPACE }} ref: ${{ steps.latestrelease.outputs.releasetag }}
CF_ORG: ${{ secrets.CF_ORG }}
API_USER: ${{ secrets.API_USER }} - name: Install Cloud Foundry CLI
API_KEY: ${{ secrets.API_KEY }} run: |
APP_NAME: dluhc-core-staging wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }} echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
APP_HOST: ${{ secrets.APP_HOST }} sudo apt-get update
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} sudo apt-get install cf8-cli
IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }} - name: Deploy
EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }} env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} CF_USERNAME: ${{ secrets.CF_USERNAME }}
run: | CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
cf api $CF_API_ENDPOINT CF_API_ENDPOINT: ${{ secrets.CF_API_ENDPOINT }}
cf auth CF_SPACE: ${{ secrets.CF_SPACE }}
cf target -o $CF_ORG -s $CF_SPACE CF_ORG: ${{ secrets.CF_ORG }}
cf set-env $APP_NAME API_USER $API_USER API_USER: ${{ secrets.API_USER }}
cf set-env $APP_NAME API_KEY $API_KEY API_KEY: ${{ secrets.API_KEY }}
cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY APP_NAME: dluhc-core-staging
cf set-env $APP_NAME APP_HOST $APP_HOST GOVUK_NOTIFY_API_KEY: ${{ secrets.GOVUK_NOTIFY_API_KEY }}
cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY APP_HOST: ${{ secrets.APP_HOST }}
cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE IMPORT_PAAS_INSTANCE: ${{ secrets.IMPORT_PAAS_INSTANCE }}
cf set-env $APP_NAME SENTRY_DSN $SENTRY_DSN EXPORT_PAAS_INSTANCE: ${{ secrets.EXPORT_PAAS_INSTANCE }}
cf push $APP_NAME --strategy rolling SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: |
cf api $CF_API_ENDPOINT
cf auth
cf target -o $CF_ORG -s $CF_SPACE
cf set-env $APP_NAME API_USER $API_USER
cf set-env $APP_NAME API_KEY $API_KEY
cf set-env $APP_NAME GOVUK_NOTIFY_API_KEY $GOVUK_NOTIFY_API_KEY
cf set-env $APP_NAME APP_HOST $APP_HOST
cf set-env $APP_NAME RAILS_MASTER_KEY $RAILS_MASTER_KEY
cf set-env $APP_NAME IMPORT_PAAS_INSTANCE $IMPORT_PAAS_INSTANCE
cf set-env $APP_NAME EXPORT_PAAS_INSTANCE $EXPORT_PAAS_INSTANCE
cf set-env $APP_NAME SENTRY_DSN $SENTRY_DSN
cf push $APP_NAME --strategy rolling

Loading…
Cancel
Save