Skip to content

Commit cc7bafd

Browse files
Merge pull request #539 from USACE/cwbi-dev
add cwbi-test image workflows
2 parents c4c33b1 + 3e21f8c commit cc7bafd

File tree

5 files changed

+270
-0
lines changed

5 files changed

+270
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: Build Geoprocess Image, Push to Test
3+
4+
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
5+
on:
6+
push:
7+
branches: [cwbi-test]
8+
paths:
9+
- .github/workflows/cwbi-test-build-push-geoproc.yml
10+
- 'async_geoprocess/**'
11+
workflow_dispatch:
12+
13+
env:
14+
AWS_REGION: aws-us-gov #Change to reflect your Region
15+
16+
# Permission can be added at job level or workflow level
17+
permissions:
18+
id-token: write # This is required for requesting the JWT
19+
contents: read # This is required for actions/checkout
20+
jobs:
21+
Build-Push-GeoProc-to-Test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Git clone the repository
25+
uses: actions/checkout@v4
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-gov-west-1
30+
role-to-assume: arn:aws-us-gov:iam::276847049069:role/github-actions-ecr-cumulus
31+
output-credentials: true
32+
# Hello from AWS: WhoAmI
33+
- name: Sts GetCallerIdentity
34+
run: |
35+
aws sts get-caller-identity
36+
- name: Login to Amazon ECR
37+
id: login-ecr
38+
uses: aws-actions/amazon-ecr-login@v2
39+
with:
40+
mask-password: 'true'
41+
- name: Build Image; Push to ECR
42+
env:
43+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
44+
ECR_REPOSITORY: cumulus-geoprocess
45+
IMAGE_TAG: latest
46+
run: |
47+
docker build --build-arg GEOPROC_PACKAGE=main:geoproc async_geoprocess \
48+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
49+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:test
50+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:test
52+
- name: ECR Logout
53+
if: always()
54+
run: docker logout ${{ steps.login-ecr.outputs.registry }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#This is a basic workflow to help you get started with Actions
2+
name: Build Listener Image, Push to Test
3+
4+
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
5+
on:
6+
push:
7+
branches: [cwbi-test]
8+
paths:
9+
- .github/workflows/cwbi-test-build-push-listener.yml
10+
- 'async_listener/**'
11+
workflow_dispatch:
12+
13+
env:
14+
AWS_REGION: aws-us-gov #Change to reflect your Region
15+
16+
# Permission can be added at job level or workflow level
17+
permissions:
18+
id-token: write # This is required for requesting the JWT
19+
contents: read # This is required for actions/checkout
20+
jobs:
21+
Build-Push-Listener-to-Test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Git clone the repository
25+
uses: actions/checkout@v4
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-gov-west-1
30+
role-to-assume: arn:aws-us-gov:iam::276847049069:role/github-actions-ecr-cumulus
31+
output-credentials: true
32+
# Hello from AWS: WhoAmI
33+
- name: Sts GetCallerIdentity
34+
run: |
35+
aws sts get-caller-identity
36+
- name: Login to Amazon ECR
37+
id: login-ecr
38+
uses: aws-actions/amazon-ecr-login@v2
39+
with:
40+
mask-password: 'true'
41+
- name: Build Image; Push to ECR
42+
env:
43+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
44+
ECR_REPOSITORY: cumulus-listener
45+
IMAGE_TAG: latest
46+
run: |
47+
docker build async_listener \
48+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
49+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:test
50+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:test
52+
- name: ECR Logout
53+
if: always()
54+
run: docker logout ${{ steps.login-ecr.outputs.registry }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: Build Migration Image, Push to Test
3+
4+
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
5+
on:
6+
push:
7+
branches: [cwbi-test]
8+
paths:
9+
- .github/workflows/cwbi-test-build-push-migration.yml
10+
- 'sql/**'
11+
workflow_dispatch:
12+
13+
env:
14+
AWS_REGION: aws-us-gov #Change to reflect your Region
15+
16+
# Permission can be added at job level or workflow level
17+
permissions:
18+
id-token: write # This is required for requesting the JWT
19+
contents: read # This is required for actions/checkout
20+
jobs:
21+
Build-Push-Migration-to-Test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Git clone the repository
25+
uses: actions/checkout@v4
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-gov-west-1
30+
role-to-assume: arn:aws-us-gov:iam::276847049069:role/github-actions-ecr-cumulus
31+
output-credentials: true
32+
# Hello from AWS: WhoAmI
33+
- name: Sts GetCallerIdentity
34+
run: |
35+
aws sts get-caller-identity
36+
- name: Login to Amazon ECR
37+
id: login-ecr
38+
uses: aws-actions/amazon-ecr-login@v2
39+
with:
40+
mask-password: 'true'
41+
- name: Build Image; Push to ECR
42+
env:
43+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
44+
ECR_REPOSITORY: cumulus-migration
45+
IMAGE_TAG: latest
46+
run: |
47+
docker build sql \
48+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
49+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:test
50+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:test
52+
- name: ECR Logout
53+
if: always()
54+
run: docker logout ${{ steps.login-ecr.outputs.registry }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#This is a basic workflow to help you get started with Actions
2+
name: Build Packager Image, Push to Test
3+
4+
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
5+
on:
6+
push:
7+
branches: [cwbi-test]
8+
paths:
9+
- .github/workflows/cwbi-test-build-push-packager.yml
10+
- 'async_packager/**'
11+
workflow_dispatch:
12+
13+
env:
14+
AWS_REGION: aws-us-gov #Change to reflect your Region
15+
16+
# Permission can be added at job level or workflow level
17+
permissions:
18+
id-token: write # This is required for requesting the JWT
19+
contents: read # This is required for actions/checkout
20+
jobs:
21+
Build-Push-Packager-to-Test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Git clone the repository
25+
uses: actions/checkout@v4
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-gov-west-1
30+
role-to-assume: arn:aws-us-gov:iam::276847049069:role/github-actions-ecr-cumulus
31+
output-credentials: true
32+
# Hello from AWS: WhoAmI
33+
- name: Sts GetCallerIdentity
34+
run: |
35+
aws sts get-caller-identity
36+
- name: Login to Amazon ECR
37+
id: login-ecr
38+
uses: aws-actions/amazon-ecr-login@v2
39+
with:
40+
mask-password: 'true'
41+
- name: Build Image; Push to ECR
42+
env:
43+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
44+
ECR_REPOSITORY: cumulus-packager
45+
IMAGE_TAG: latest
46+
run: |
47+
docker build async_packager \
48+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
49+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:test
50+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:test
52+
- name: ECR Logout
53+
if: always()
54+
run: docker logout ${{ steps.login-ecr.outputs.registry }}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#This is a basic workflow to help you get started with Actions
2+
name: Build pg_featureserv Image, Push to Test
3+
4+
# Controls when the action will run. Invokes the workflow on push events but only for the main branch
5+
on:
6+
push:
7+
branches: [cwbi-test]
8+
paths:
9+
- .github/workflows/cwbi-test-build-push-pg_featureserv.yml
10+
- 'pg_featureserv/**'
11+
workflow_dispatch:
12+
13+
env:
14+
AWS_REGION: aws-us-gov #Change to reflect your Region
15+
16+
# Permission can be added at job level or workflow level
17+
permissions:
18+
id-token: write # This is required for requesting the JWT
19+
contents: read # This is required for actions/checkout
20+
jobs:
21+
Build-Push-pg_featureserv-to-Test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Git clone the repository
25+
uses: actions/checkout@v4
26+
- name: Configure AWS Credentials
27+
uses: aws-actions/configure-aws-credentials@v4
28+
with:
29+
aws-region: us-gov-west-1
30+
role-to-assume: arn:aws-us-gov:iam::276847049069:role/github-actions-ecr-cumulus
31+
output-credentials: true
32+
# Hello from AWS: WhoAmI
33+
- name: Sts GetCallerIdentity
34+
run: |
35+
aws sts get-caller-identity
36+
- name: Login to Amazon ECR
37+
id: login-ecr
38+
uses: aws-actions/amazon-ecr-login@v2
39+
with:
40+
mask-password: 'true'
41+
- name: Build Image; Push to ECR
42+
env:
43+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
44+
ECR_REPOSITORY: cumulus-pg_featureserv
45+
IMAGE_TAG: latest
46+
run: |
47+
docker build pg_featureserv \
48+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG \
49+
--tag $ECR_REGISTRY/$ECR_REPOSITORY:test
50+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+
docker push $ECR_REGISTRY/$ECR_REPOSITORY:test
52+
- name: ECR Logout
53+
if: always()
54+
run: docker logout ${{ steps.login-ecr.outputs.registry }}

0 commit comments

Comments
 (0)