Repository navigation
Merge pull request #598 from GSA/opensearch-fields #451
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 2 - Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| version_no: | |
| description: 'Release Version:' | |
| required: true | |
| # default minimal permissions for every job | |
| permissions: | |
| contents: read | |
| env: | |
| PY_VERSION: "3.12.12" | |
| POETRY_VERSION: "latest" | |
| jobs: | |
| create-cloudgov-services-staging: | |
| name: create services (staging) | |
| environment: staging | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: create services | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: bash create_cloudgov_services.sh | |
| cf_org: gsa-datagov | |
| cf_space: staging | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} | |
| create-cloudgov-services-prod: | |
| name: create services (prod) | |
| environment: prod | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: create services | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: bash create_cloudgov_services.sh | |
| cf_org: gsa-datagov | |
| cf_space: prod | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} | |
| deploy-staging: | |
| name: deploy (staging) | |
| needs: | |
| - create-cloudgov-services-staging | |
| permissions: | |
| actions: write | |
| contents: read | |
| uses: gsa/data.gov/.github/workflows/deploy-template.yml@main | |
| with: | |
| environ: staging | |
| app_url: https://datagov-harvest-staging.app.cloud.gov | |
| app_names: '{"include":[{"app":"datagov-harvest"},{"app":"datagov-harvest-proxy"}]}' | |
| secrets: inherit | |
| deploy-prod: | |
| name: deploy (prod) | |
| needs: | |
| - create-cloudgov-services-prod | |
| - deploy-staging | |
| permissions: | |
| actions: write | |
| contents: read | |
| uses: gsa/data.gov/.github/workflows/deploy-template.yml@main | |
| with: | |
| environ: prod | |
| app_url: https://harvest.data.gov | |
| app_names: '{"include":[{"app":"datagov-harvest"},{"app":"datagov-harvest-proxy"}]}' | |
| secrets: inherit | |
| network-policies: | |
| name: Add network-policies | |
| needs: | |
| - deploy-staging | |
| - deploy-prod | |
| runs-on: ubuntu-latest | |
| environment: ${{ matrix.environ }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| command: [ | |
| "cf add-network-policy datagov-harvest-proxy datagov-harvest --protocol tcp --port 61443", | |
| "cf add-network-policy datagov-harvest mdtranslator --protocol tcp --port 8080" | |
| ] | |
| environ: ["staging", "prod"] | |
| steps: | |
| - name: Add network policy | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: ${{ matrix.command }} | |
| cf_org: gsa-datagov | |
| cf_space: ${{ matrix.environ }} | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} |