Skip to content
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
98 changes: 49 additions & 49 deletions .github/workflows/deploy-prod-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,59 @@ on:

jobs:
# Deploy Staging
deploy-edc-prod-staging:
runs-on: ubuntu-latest
environment: edc-prod
permissions:
id-token: write
contents: read
# deploy-edc-prod-staging:
# runs-on: ubuntu-latest
# environment: edc-prod
# permissions:
# id-token: write
# contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
# steps:
# - name: Checkout
# uses: actions/checkout@v4

- name: build
uses: ./.github/workflows/search-api-composite
with:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
vpc-id: ${{ secrets.VPC_ID }}
subnet-ids: ${{ secrets.SUBNET_IDS }}
security-group: ${{ secrets.SECURITY_GROUP }}
staging: true
# - name: build
# uses: ./.github/workflows/search-api-composite
# with:
# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
# vpc-id: ${{ secrets.VPC_ID }}
# subnet-ids: ${{ secrets.SUBNET_IDS }}
# security-group: ${{ secrets.SECURITY_GROUP }}
# staging: true

run-edc-prod-staging-integration-tests:
needs: [deploy-edc-prod-staging]
runs-on: ubuntu-latest
environment: edc-prod
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS OIDC credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
aws-region: us-west-2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
# run-edc-prod-staging-integration-tests:
# needs: [deploy-edc-prod-staging]
# runs-on: ubuntu-latest
# environment: edc-prod
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Configure AWS OIDC credentials
# uses: aws-actions/configure-aws-credentials@v3
# with:
# role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
# aws-region: us-east-1
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.11"

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r tests/requirements.txt
python -m pip install .
# - name: Install dependencies
# shell: bash
# run: |
# python -m pip install --upgrade pip
# python -m pip install -r requirements.txt
# python -m pip install -r tests/requirements.txt
# python -m pip install .

- name: run tests
shell: bash
run: |
pytest tests/integration/test_stack.py \
--reruns 3 --reruns-delay 10
# - name: run tests
# shell: bash
# run: |
# pytest tests/integration/test_stack.py \
# --reruns 3 --reruns-delay 10

deploy-prod-staging:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
aws-region: us-west-2
aws-region: us-east-1

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:
- prod

jobs:
deploy-edc-prod:
runs-on: ubuntu-latest
environment: edc-prod
permissions:
id-token: write
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4

- name: build
uses: ./.github/workflows/search-api-composite
with:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
vpc-id: ${{ secrets.VPC_ID }}
subnet-ids: ${{ secrets.SUBNET_IDS }}
security-group: ${{ secrets.SECURITY_GROUP }}
# deploy-edc-prod:
# runs-on: ubuntu-latest
# environment: edc-prod
# permissions:
# id-token: write
# contents: read

# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: build
# uses: ./.github/workflows/search-api-composite
# with:
# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
# vpc-id: ${{ secrets.VPC_ID }}
# subnet-ids: ${{ secrets.SUBNET_IDS }}
# security-group: ${{ secrets.SECURITY_GROUP }}

deploy-prod:
runs-on: ubuntu-latest
Expand Down
98 changes: 49 additions & 49 deletions .github/workflows/deploy-test-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,59 @@ on:

jobs:
# Deploy Staging
deploy-edc-test-staging:
runs-on: ubuntu-latest
environment: edc-test
permissions:
id-token: write
contents: read
# deploy-edc-test-staging:
# runs-on: ubuntu-latest
# environment: edc-test
# permissions:
# id-token: write
# contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
# steps:
# - name: Checkout
# uses: actions/checkout@v4

- name: build
uses: ./.github/workflows/search-api-composite
with:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
vpc-id: ${{ secrets.VPC_ID }}
subnet-ids: ${{ secrets.SUBNET_IDS }}
security-group: ${{ secrets.SECURITY_GROUP }}
staging: true
# - name: build
# uses: ./.github/workflows/search-api-composite
# with:
# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
# vpc-id: ${{ secrets.VPC_ID }}
# subnet-ids: ${{ secrets.SUBNET_IDS }}
# security-group: ${{ secrets.SECURITY_GROUP }}
# staging: true

run-edc-test-staging-integration-tests:
needs: [deploy-edc-test-staging]
runs-on: ubuntu-latest
environment: edc-test
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS OIDC credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
aws-region: us-west-2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
# run-edc-test-staging-integration-tests:
# needs: [deploy-edc-test-staging]
# runs-on: ubuntu-latest
# environment: edc-test
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Configure AWS OIDC credentials
# uses: aws-actions/configure-aws-credentials@v3
# with:
# role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
# aws-region: us-east-1
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.11"

- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -r tests/requirements.txt
python -m pip install .
# - name: Install dependencies
# shell: bash
# run: |
# python -m pip install --upgrade pip
# python -m pip install -r requirements.txt
# python -m pip install -r tests/requirements.txt
# python -m pip install .

- name: run tests
shell: bash
run: |
pytest tests/integration/test_stack.py \
--reruns 3 --reruns-delay 10
# - name: run tests
# shell: bash
# run: |
# pytest tests/integration/test_stack.py \
# --reruns 3 --reruns-delay 10

deploy-test-staging:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole
aws-region: us-west-2
aws-region: us-east-1

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:
- test

jobs:
deploy-edc-test:
runs-on: ubuntu-latest
environment: edc-test
permissions:
id-token: write
contents: read
# deploy-edc-test:
# runs-on: ubuntu-latest
# environment: edc-test
# permissions:
# id-token: write
# contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
# steps:
# - name: Checkout
# uses: actions/checkout@v4

- name: build
uses: ./.github/workflows/search-api-composite
with:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
vpc-id: ${{ secrets.VPC_ID }}
subnet-ids: ${{ secrets.SUBNET_IDS }}
security-group: ${{ secrets.SECURITY_GROUP }}
# - name: build
# uses: ./.github/workflows/search-api-composite
# with:
# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
# vpc-id: ${{ secrets.VPC_ID }}
# subnet-ids: ${{ secrets.SUBNET_IDS }}
# security-group: ${{ secrets.SECURITY_GROUP }}

deploy-test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/search-api-composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: arn:aws:iam::${{ inputs.aws-account-id }}:role/SearchAPIActionsOIDCRole
aws-region: us-west-2
aws-region: us-east-1

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-

-->
------
## [1.0.3](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.2...v1.0.3)
### Changed
- Swap deployment region from us-west-2 to us-east-1

------
## [1.0.2](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.1...v1.0.2)

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import asf_search as asf
import os

cf_client = boto3.client('cloudformation', region_name=os.getenv('CDK_DEFAULT_REGION', 'us-west-2'))
cf_client = boto3.client('cloudformation', region_name=os.getenv('CDK_DEFAULT_REGION', 'us-east-1'))
cf_response = cf_client.describe_stacks(StackName='SearchAPI-V3-Stack-Staging')
rest_api_url = cf_response['Stacks'][0]['Outputs'][0]['OutputValue']
session = asf.ASFSession()
Expand Down