Skip to content

Commit 2c7233a

Browse files
committed
Initial commit via Backstage
0 parents  commit 2c7233a

File tree

10 files changed

+284
-0
lines changed

10 files changed

+284
-0
lines changed

.cfnlintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore_checks:
2+
- E3034 # Template too short

.github/workflows/branch.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Branches
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches-ignore:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
14+
15+
steps:
16+
- name: Setup job workspace
17+
uses: ServerlessOpsIO/gha-setup-workspace@v1
18+
19+
- name: Assume AWS credentials
20+
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
21+
with:
22+
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
23+
24+
- name: Install AWS SAM
25+
uses: aws-actions/setup-sam@v2
26+
27+
- name: Validate template
28+
run: sam validate --lint
29+
30+
- name: Build deployment artifact
31+
run: sam build
32+
33+
- name: Store artifacts
34+
uses: ServerlessOpsIO/gha-store-artifacts@v1
35+
with:
36+
use_aws_sam: true
37+
38+
deploy:
39+
needs:
40+
- build
41+
42+
environment: production
43+
runs-on: ubuntu-latest
44+
permissions:
45+
id-token: write
46+
contents: read
47+
48+
steps:
49+
- name: Setup job workspace
50+
uses: ServerlessOpsIO/gha-setup-workspace@v1
51+
with:
52+
checkout_artifact: true
53+
54+
- name: Assume AWS credentials
55+
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
56+
with:
57+
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
58+
deploy_aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }}
59+
60+
- name: Deploy via AWS SAM
61+
uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
62+
with:
63+
aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }}
64+
env_json: ${{ toJson(env) }}
65+
vars_json: ${{ toJson(vars) }}
66+
secrets_json: ${{ toJson(secrets) }}

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Main
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: read
15+
16+
steps:
17+
- name: Setup job workspace
18+
uses: ServerlessOpsIO/gha-setup-workspace@v1
19+
20+
- name: Assume AWS credentials
21+
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
22+
with:
23+
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
24+
25+
- name: Install AWS SAM
26+
uses: aws-actions/setup-sam@v2
27+
28+
- name: Validate template
29+
run: sam validate --lint
30+
31+
- name: Build deployment artifact
32+
run: sam build
33+
34+
- name: Store artifacts
35+
uses: ServerlessOpsIO/gha-store-artifacts@v1
36+
with:
37+
use_aws_sam: true
38+
39+
deploy:
40+
needs:
41+
- build
42+
43+
environment: production
44+
runs-on: ubuntu-latest
45+
permissions:
46+
id-token: write
47+
contents: read
48+
49+
steps:
50+
- name: Setup job workspace
51+
uses: ServerlessOpsIO/gha-setup-workspace@v1
52+
with:
53+
checkout_artifact: true
54+
55+
- name: Assume AWS credentials
56+
uses: ServerlessOpsIO/gha-assume-aws-credentials@v1
57+
with:
58+
build_aws_account_id: ${{ secrets.AWS_CICD_ACCOUNT_ID }}
59+
deploy_aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }}
60+
61+
- name: Deploy via AWS SAM
62+
uses: ServerlessOpsIO/gha-deploy-aws-sam@v1
63+
with:
64+
aws_account_id: ${{ secrets.DEPLOYMENT_ACCOUNT_ID }}
65+
env_json: ${{ toJson(env) }}
66+
vars_json: ${{ toJson(vars) }}
67+
secrets_json: ${{ toJson(secrets) }}

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Dev
51+
.mypy_cache/
52+
53+
# pyenv / environments
54+
.python-version
55+
.env
56+
.venv
57+
env/
58+
venv/
59+
ENV/
60+
env.bak/
61+
venv.bak/
62+
63+
# IDE
64+
.settings/
65+
.project
66+
.pydevproject
67+
.vscode/
68+
*.code-workspace
69+
.idea/
70+
71+
# Mac Cruft
72+
.DS_Store
73+
Thumbs.db
74+
75+
# IDE
76+
.vscode
77+
!.vscode/launch.json
78+
!.vscode/tasks.json
79+
80+
# AWS SAM
81+
.aws-sam/

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Versant / aws-cli-container
2+
3+
custom version of AWS CLI container
4+
5+
6+
## New Project Getting Started
7+
This repository was generated from a template intended to get a new RDS database up running quickly. It uses the [AWS Serverless Application Model (SAM)](https://aws.amazon.com/serverless/sam/) to define the infrastructure as code.
8+
9+
###

catalog-info.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: backstage.io/v1alpha1
3+
kind: Component
4+
metadata:
5+
name: aws-cli-container
6+
description: custom version of AWS CLI container
7+
annotations:
8+
github.com/project-slug: ServerlessOpsIO/aws-cli-container
9+
spec:
10+
type: iac
11+
lifecycle: production
12+
owner: group:Developers
13+
system: system:Versant

cfn-parameters.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Domain": "Development",
3+
"System": "Versant",
4+
"Component": $env.GITHUB_REPOSITORY_NAME_PART_SLUG_CS,
5+
"CodeBranch": $env.GITHUB_REF_SLUG_CS
6+
}

cfn-tags.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"org:domain": "Development",
3+
"org:system": "Versant",
4+
"org:component": $env.GITHUB_REPOSITORY_NAME_PART_SLUG_CS
5+
}

samconfig.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version = 0.1
2+
[default]
3+
4+
[default.deploy]
5+
6+
[default.deploy.parameters]
7+
stack_name = "aws-cli-container-db"
8+
confirm_changeset = false
9+
capabilities = "CAPABILITY_NAMED_IAM"

template.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
AWSTemplateFormatVersion: '2010-09-09'
2+
Transform: AWS::Serverless-2016-10-31
3+
Description: >
4+
aws-cli-container
5+
6+
custom version of AWS CLI container
7+
8+
9+
Parameters:
10+
Domain:
11+
Type: String
12+
Description: 'Name of Domain'
13+
14+
System:
15+
Type: String
16+
Description: "Name of System"
17+
18+
Component:
19+
Type: String
20+
Description: "Name of Component"
21+
22+
CodeBranch:
23+
Type: String
24+
Description: "Name of GitHub Branch"
25+
26+
Resources: {}

0 commit comments

Comments
 (0)