Skip to content

Commit 3be45e2

Browse files
authored
Merge pull request #4 from Intelliflo/rebase-origin
feat: rebase from origin
2 parents 1f1f16c + e465436 commit 3be45e2

File tree

372 files changed

+45290
-13487
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+45290
-13487
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#syntax=docker/dockerfile:1.2
2-
FROM node:18 as build
2+
FROM node:20 as build
33
WORKDIR /lambdas
44
RUN apt-get update \
55
&& apt-get install -y zip \

.ci/terraform-init-all.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
# This script will run terraform init in all subdirectories of the examples directory
4+
# required to run tflint via pre-commit
5+
6+
# only run the script if a uniique pid file exits if not creat it or --force flag is passed
7+
pid="/tmp/philips-labs-terraform-aws-github-runner.pid"
8+
if [ "$1" == "--force" ]; then
9+
rm -f /tmp/philips-labs-terraform-aws-github-runner.pid
10+
fi
11+
12+
if [ ! -f $pid ]; then
13+
echo $$ > $pid
14+
else
15+
echo "Init all terraform directories will be skipped. To run the script remove the file $pid or run with --force"
16+
exit 0
17+
fi
18+
19+
# Change to the examples directory
20+
example_dirs=$(find examples -mindepth 1 -maxdepth 2 -type d | grep -v "templates")
21+
module_dirs=$(find modules -mindepth 1 -maxdepth 2 -type d | grep -v "templates")
22+
23+
# merge example_dirs and module_dirs in terraform_dirs
24+
terraform_dirs=$(echo $example_dirs $module_dirs "modules/runners/pool" | tr " " "\n" | sort -u | tr "\n" " ")
25+
26+
for dir in $terraform_dirs; do
27+
# Check if the subdirectory exists in Git
28+
if git rev-parse --is-inside-work-tree &>/dev/null && git ls-files --error-unmatch "$dir" &>/dev/null; then
29+
echo "Running terraform init in ${dir} - supressing output"
30+
pushd "$dir" >/dev/null
31+
terraform init -lockfile=readonly -backend=false &>/dev/null || true
32+
popd >/dev/null
33+
fi
34+
done

.devcontainer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ARG VARIANT="20-bullseye"
2+
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

.devcontainer/bashrc.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
open_workspace() {
2+
local workspace_file=$WORKSPACE/.vscode/gh-runners.code-workspace
3+
4+
if ! [ -f "$workspace_file" ]; then
5+
echo "🔴 Missing workspace file"
6+
return 1
7+
fi
8+
9+
echo "🟡 Opening workspace"
10+
if code "$workspace_file"; then
11+
echo "🟢 Workspace opened"
12+
return 0
13+
else
14+
echo "🔴 Failed to open workspace"
15+
return 1
16+
fi
17+
}

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "GitHub Runners AWS",
3+
"build": { "dockerfile": "Dockerfile" },
4+
"features": {
5+
"ghcr.io/devcontainers/features/github-cli:1": {},
6+
"ghcr.io/devcontainers/features/terraform:1": {}
7+
},
8+
9+
"containerEnv": {
10+
"WORKSPACE": "${containerWorkspaceFolder}" // e.g. /workspaces/my-project
11+
},
12+
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"dbaeumer.vscode-eslint",
17+
"editorconfig.editorconfig",
18+
"esbenp.prettier-vscode",
19+
"firsttris.vscode-jest-runner",
20+
"hashicorp.hcl",
21+
"hashicorp.terraform",
22+
"hashicorp.terraform",
23+
"orta.vscode-jest",
24+
"yzhang.markdown-all-in-one"
25+
]
26+
}
27+
},
28+
"postCreateCommand": {
29+
"bash_command": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateScript.sh",
30+
"welcome": "sudo cp -v .devcontainer/welcome.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt || true && sudo cp -v .devcontainer/welcome.txt /workspaces/.codespaces/shared/first-run-notice.txt || true"
31+
}
32+
}

.devcontainer/postCreateScript.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
printf "source \$WORKSPACE/.devcontainer/bashrc.sh\n" >> ~/.bashrc

.devcontainer/welcome.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
Welcome to the AWS GitHub runners:
44+
45+
Load the vscode workspace to get started
46+
47+
Option 1: run `open_workspace`
48+
Option 2: open the workspace file `.vscoe/gh-runners.code-workspace` and load the workspace
49+
50+
Build the lambda:
51+
- cd lambdas
52+
- yarn instal & yarn run dist
53+

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ updates:
2020
directory: "/lambdas"
2121
schedule:
2222
interval: "weekly"
23+
groups:
24+
aws:
25+
patterns:
26+
- "@aws-sdk/*"
27+
octokit:
28+
patterns:
29+
- "@octokit/*"
30+
aws-powertools:
31+
patterns:
32+
- "@aws-lambda-powertools/*"
33+
34+
ignore:
35+
- dependency-name: "@middy/core"
36+
update-types: ["version-update:semver-major"]
37+
- dependency-name: "@octokit/*"
38+
update-types: ["version-update:semver-major"]
39+
- dependency-name: "eslint"
40+
update-types: ["version-update:semver-major"]
2341
commit-message:
2442
prefix: "fix(lambda)"
2543
prefix-development: "chore(lambda)"

.github/lint/tflint.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aws_region = null
1+
aws_region = "eu-west-1"
22
github_app = {
33
id = "0"
44
key_base64 = "0"

.github/matchers.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "tflint-compact",
5+
"pattern": [
6+
{
7+
"regexp": "^(.+):(\\d+):(\\d+):\\s(Error|Warning|Notice)\\s-\\s(.+)\\s\\((.+)\\)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"severity": 4,
12+
"message": 5,
13+
"code": 6
14+
}
15+
]
16+
}
17+
]
18+
}

0 commit comments

Comments
 (0)