-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f995314
Showing
8 changed files
with
392 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Main | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Setup job workspace | ||
uses: ServerlessOpsIO/gha-setup-workspace@v1 | ||
|
||
- name: Assume AWS Credentials | ||
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1 | ||
with: | ||
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }} | ||
|
||
- name: Install AWS SAM | ||
uses: aws-actions/setup-sam@v2 | ||
|
||
|
||
- name: Validate template | ||
run: sam validate --lint | ||
|
||
- name: Build artifact | ||
run: sam build --parallel --template template.yaml | ||
|
||
- name: Store Artifacts | ||
uses: ServerlessOpsIO/gha-store-artifacts@v1 | ||
with: | ||
use_aws_sam: true | ||
|
||
deploy: | ||
needs: | ||
- build | ||
|
||
environment: sandbox | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Setup job workspace | ||
uses: ServerlessOpsIO/gha-setup-workspace@v1 | ||
with: | ||
checkout_artifact: true | ||
|
||
- name: Assume AWS Credentials | ||
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1 | ||
with: | ||
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }} | ||
deploy_aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }} | ||
|
||
- name: Deploy via AWS SAM | ||
uses: ServerlessOpsIO/gha-deploy-aws-sam@v1 | ||
with: | ||
aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }} | ||
env_json: ${{ toJson(env) }} | ||
secrets_json: ${{ toJson(secrets) }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Dev | ||
.mypy_cache/ | ||
|
||
# pyenv / environments | ||
.python-version | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# IDE | ||
.settings/ | ||
.project | ||
.pydevproject | ||
.vscode/ | ||
*.code-workspace | ||
|
||
# Mac Cruft | ||
.DS_Store | ||
|
||
# Deploy | ||
codepipeline-config-*.yaml | ||
|
||
|
||
# AWS SAM | ||
.aws-sam/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Backstage Cluster | ||
|
||
ECS Cluster for Backstage |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: ${{ values.component_name }} | ||
description: ${{ values.component_description }} | ||
namespace: ${{ values.component_namespace }} | ||
annotations: | ||
github.com/project-slug: NBCUniversal/${{ values.component_name }} | ||
backstage.io/techdocs-ref: dir:. | ||
spec: | ||
type: aws_ecs_cluster | ||
lifecycle: production | ||
owner: ${{ values.owner }} | ||
system: ${{ values.system_entity }} | ||
domain: ${{ values.domain_entity }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"Domain": "Infrastructure", | ||
"System": "Backstage", | ||
"Component": $env.GITHUB_REPOSITORY_NAME_PART_SLUG_CS, | ||
"CodeBranch": $env.GITHUB_REF_SLUG_CS, | ||
"VpcId": "/org/networking/VpcId", | ||
"VpcSubnets": "/org/networking/VpcPublicSubnets", | ||
"Hostname": "backstage.serverlessops.io", | ||
"DnsZoneId": "/org/dns/ZoneId" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"org:domain": "Infrastructure", | ||
"org:system": "Backstage", | ||
"org:component": $env.GITHUB_REPOSITORY_NAME_PART_SLUG_CS | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# More information about the configuration file can be found here: | ||
# https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html | ||
version = 0.1 | ||
|
||
[default] | ||
[default.global.parameters] | ||
stack_name = "backstage-cluster" | ||
|
||
[default.build.parameters] | ||
cached = true | ||
parallel = true | ||
|
||
[default.validate.parameters] | ||
lint = true | ||
|
||
[default.deploy.parameters] | ||
capabilities = "CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND" | ||
confirm_changeset = false | ||
#resolve_s3 = true | ||
|
||
[default.package.parameters] | ||
#resolve_s3 = true | ||
|
||
[default.sync.parameters] | ||
watch = true | ||
|
||
[default.local_start_api.parameters] | ||
warm_containers = "EAGER" | ||
|
||
[default.local_start_lambda.parameters] | ||
warm_containers = "EAGER" |
Oops, something went wrong.