-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
80 lines (75 loc) · 2.67 KB
/
Copy pathaction.yml
File metadata and controls
80 lines (75 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Deploy ITS_LIVE Monitoring
description: Deploy the ITS_LIVE Monitoring system
inputs:
STACK_NAME:
required: true
CF_TEMPLATE_BUCKET:
required: true
LANDSAT_TOPIC_ARN:
required: true
NISAR_TOPIC_ARN:
required: true
SENTINEL1_TOPIC_ARN:
required: true
SENTINEL2_TOPIC_ARN:
required: true
HYP3_API:
required: true
HYP3_JOBS_TABLE:
required: true
LAMBDA_LOGGING_LEVEL:
required: true
EARTHDATA_USERNAME:
required: true
EARTHDATA_PASSWORD:
required: true
PUBLISH_BUCKET:
required: true
ECR_IMAGE_URI:
required: true
STAC_ITEMS_ENDPOINT:
required: true
STAC_EXISTS_OK:
required: true
runs:
using: composite
steps:
- name: Package and deploy
shell: bash
run: |
aws cloudformation package \
--template-file cloudformation.yml \
--s3-bucket=${{ inputs.CF_TEMPLATE_BUCKET }} \
--output-template-file packaged.yml
aws cloudformation deploy \
--template-file packaged.yml \
--stack-name=${{ inputs.STACK_NAME }} \
--capabilities CAPABILITY_IAM \
--parameter-overrides \
LandsatTopicArn=${{ inputs.LANDSAT_TOPIC_ARN }} \
NisarTopicArn=${{ inputs.NISAR_TOPIC_ARN }} \
Sentinel1TopicArn=${{ inputs.SENTINEL1_TOPIC_ARN }} \
Sentinel2TopicArn=${{ inputs.SENTINEL2_TOPIC_ARN }} \
Hyp3Api=${{ inputs.HYP3_API }} \
Hyp3JobsTable=${{ inputs.HYP3_JOBS_TABLE }} \
LambdaLoggingLevel=${{ inputs.LAMBDA_LOGGING_LEVEL }} \
EarthdataUsername=${{ inputs.EARTHDATA_USERNAME }} \
EarthdataPassword=${{ inputs.EARTHDATA_PASSWORD }} \
PublishBucket=${{ inputs.PUBLISH_BUCKET }} \
EcrImageUri=${{ inputs.ECR_IMAGE_URI }} \
StacItemsEndpoint=${{ inputs.STAC_ITEMS_ENDPOINT }} \
StacExistsOk=${{ inputs.STAC_EXISTS_OK }}
export CF_TEMPLATE_BUCKET=${{ inputs.CF_TEMPLATE_BUCKET }}
export ITS_LIVE_MONITORING_QUEUE_ARN=$( \
aws cloudformation describe-stacks \
--query "Stacks[?StackName=='${{ inputs.STACK_NAME }}'][].Outputs[?OutputKey=='ItsLiveMonitoringQueueArn'].OutputValue" \
--output text \
)
aws cloudformation deploy \
--template-file its_live_monitoring/cloudformation-subscribe-in-eu.yml \
--region=eu-west-1 \
--stack-name=${{ inputs.STACK_NAME }} \
--s3-bucket=${CF_TEMPLATE_BUCKET/us-west-2/eu-west-1} \
--parameter-overrides \
Sentinel2TopicArn=${{ inputs.SENTINEL2_TOPIC_ARN }} \
ItsLiveMonitoringQueueArn=${ITS_LIVE_MONITORING_QUEUE_ARN}