Skip to content

Commit

Permalink
Merge pull request #26 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release 0.0.1
  • Loading branch information
asjohnston-asf authored Mar 12, 2024
2 parents aebfdfd + c90e6f7 commit 9d122c6
Show file tree
Hide file tree
Showing 28 changed files with 1,235 additions and 107 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# These owners will be requested for review when someone opens a pull request.
* @ASFHyP3/platform
58 changes: 58 additions & 0 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Deploy ITS_LIVE Monitoring
description: Deploy the ITS_LIVE Monitoring system

inputs:
STACK_NAME:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
CF_TEMPLATE_BUCKET:
required: true
LANDSAT_TOPIC_ARN:
required: true
HYP3_API:
required: true
LAMBDA_LOGGING_LEVEL:
required: true
EARTHDATA_USERNAME:
required: true
EARTHDATA_PASSWORD:
required: true

runs:
using: composite
steps:
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ inputs.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- uses: actions/setup-python@v3
with:
python-version: 3.12

- name: Install
shell: bash
run: make install-lambda-deps

- name: Package and deploy
shell: bash
run: |
aws cloudformation package \
--template-file landsat/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 }} \
Hyp3Api=${{ inputs.HYP3_API }} \
LambdaLoggingLevel=${{ inputs.LAMBDA_LOGGING_LEVEL }} \
EarthdataUsername=${{ inputs.EARTHDATA_USERNAME }} \
EarthdataPassword=${{ inputs.EARTHDATA_PASSWORD }}
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
labels:
- "bumpless"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "bumpless"
18 changes: 18 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Changelog updated?

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
branches:
- main
- develop

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy ITS_LIVE Monitoring Production

on:
push:
branches:
- main

concurrency: deploy-prod

jobs:
deploy:
environment: prod
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/deploy
with:
STACK_NAME: its-live-monitoring-prod
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
CF_TEMPLATE_BUCKET: cf-templates-3o5lnspmwmzg-us-west-2
LANDSAT_TOPIC_ARN: arn:aws:sns:us-west-2:673253540267:public-c2-notify-v2
HYP3_API: https://hyp3-its-live.asf.alaska.edu
LAMBDA_LOGGING_LEVEL: INFO


call-bump-version-workflow:
needs: deploy
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
27 changes: 27 additions & 0 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy ITS_LIVE Monitoring Test

on:
push:
branches:
- develop

concurrency: deploy-test

jobs:
deploy:
environment: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/deploy
with:
STACK_NAME: its-live-monitoring-test
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASSWORD }}
CF_TEMPLATE_BUCKET: cf-templates-3o5lnspmwmzg-us-west-2
LANDSAT_TOPIC_ARN: arn:aws:sns:us-west-2:986442313181:its-live-notify-test
HYP3_API: https://hyp3-its-live.asf.alaska.edu
LAMBDA_LOGGING_LEVEL: DEBUG
15 changes: 15 additions & 0 deletions .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Is PR labeled?

on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
branches:
- main

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
16 changes: 16 additions & 0 deletions .github/workflows/release-checklist-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create Release Comment

on:
pull_request:
types:
- opened
branches:
- main

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
permissions:
pull-requests: write
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
release_prefix: its-live-monitoring
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
17 changes: 17 additions & 0 deletions .github/workflows/static-anaysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Static analysis

on: push

jobs:
call-ruff-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected]

cfn-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: make install
- run: make cfn-lint
Loading

0 comments on commit 9d122c6

Please sign in to comment.