-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from globaldatanet/4.1.3
4.1.3
- Loading branch information
Showing
21 changed files
with
2,413 additions
and
286 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 |
---|---|---|
|
@@ -8,7 +8,6 @@ on: | |
branches: | ||
- master | ||
- linting | ||
workflow_dispatch: | ||
|
||
jobs: | ||
nodejs-test: | ||
|
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,76 @@ | ||
name: IpSet-Firewall | ||
|
||
env: | ||
AWS_REGION: eu-central-1 | ||
AWS_ROLE: FirewallFactoryGithubPipelineRole | ||
AWS_ACCOUNT: 859220371210 | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
concurrency: ci-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
jobs: | ||
deploy_production_main: | ||
name: Test and deploy IpSet Firewall | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v3 | ||
- name: 📁 Install Taskfile | ||
run: | | ||
npm install -g @go-task/cli | ||
- name: ☊ Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: 💾 Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: 🌐 Install CDK and typescript globally | ||
run: | | ||
npm i -g aws-cdk typescript ts-node @types/node | ||
npm link typescript | ||
- name: 📦 Install Packages | ||
run: | | ||
npm install | ||
- name: 🔑 Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
env: | ||
ACCOUNT_ID: ${{ env.AWS_ACCOUNT }} | ||
with: | ||
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.AWS_ROLE }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
role-session-name: GitHubActionsSession | ||
mask-aws-account-id: false | ||
- name: 🚀 Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: 🫙 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: 🔥 Deploy Firewall to AWS | ||
run: | | ||
task deploy config=ipSetsTests | ||
- name: 🗑️ Remove Firewall from AWS | ||
run: | | ||
task destroy config=ipSetsTests |
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,76 @@ | ||
name: ManagedRuleGroups-Firewall | ||
|
||
env: | ||
AWS_REGION: eu-central-1 | ||
AWS_ROLE: FirewallFactoryGithubPipelineRole | ||
AWS_ACCOUNT: 859220371210 | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
concurrency: ci-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
jobs: | ||
deploy_production_main: | ||
name: Test and deploy OnlyManagedRuleGroups Firewall | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v3 | ||
- name: 📁 Install Taskfile | ||
run: | | ||
npm install -g @go-task/cli | ||
- name: ☊ Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: 💾 Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: 🌐 Install CDK and typescript globally | ||
run: | | ||
npm i -g aws-cdk typescript ts-node @types/node | ||
npm link typescript | ||
- name: 📦 Install Packages | ||
run: | | ||
npm install | ||
- name: 🔑 Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
env: | ||
ACCOUNT_ID: ${{ env.AWS_ACCOUNT }} | ||
with: | ||
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.AWS_ROLE }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
role-session-name: GitHubActionsSession | ||
mask-aws-account-id: false | ||
- name: 🚀 Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: 🫙 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: 🔥 Deploy Firewall to AWS | ||
run: | | ||
task deploy config=onlyManagedRuleGroupsTests | ||
- name: 🗑️ Remove Firewall from AWS | ||
run: | | ||
task destroy config=onlyManagedRuleGroupsTests |
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,77 @@ | ||
name: RegexPatternSets-Firewall | ||
|
||
env: | ||
AWS_REGION: eu-central-1 | ||
AWS_ROLE: FirewallFactoryGithubPipelineRole | ||
AWS_ACCOUNT: 859220371210 | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
concurrency: ci-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- 'bin/**/*' | ||
- 'lib/**/*' | ||
- 'package*.json' | ||
|
||
jobs: | ||
deploy_production_main: | ||
name: Test and deploy RegexPatternSets Firewall | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⬇️ Checkout | ||
uses: actions/checkout@v3 | ||
- name: 📁 Install Taskfile | ||
run: | | ||
npm install -g @go-task/cli | ||
- name: ☊ Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '18.x' | ||
- name: 💾 Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: 🌐 Install CDK and typescript globally | ||
run: | | ||
npm i -g aws-cdk typescript ts-node @types/node | ||
npm link typescript | ||
- name: 📦 Install Packages | ||
run: | | ||
npm install | ||
- name: 🔑 Configure AWS credentials | ||
uses: aws-actions/[email protected] | ||
env: | ||
ACCOUNT_ID: ${{ env.AWS_ACCOUNT }} | ||
with: | ||
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.AWS_ROLE }} | ||
aws-region: ${{ env.AWS_REGION }} | ||
role-session-name: GitHubActionsSession | ||
mask-aws-account-id: false | ||
- name: 🚀 Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: 🫙 Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: 🔥 Deploy Firewall to AWS | ||
run: | | ||
task deploy config=regexPatternSetsTests | ||
- name: 🗑️ Remove Firewall from AWS | ||
run: | | ||
task destroy config=regexPatternSetsTests |
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
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
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
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,13 @@ | ||
import * as values from "../values"; | ||
|
||
/** | ||
* relative path to config file imported from the env PROCESS_PARAMETERS | ||
*/ | ||
const CONFIG_OBJECT_NAME = process.env.PROCESS_PARAMETERS; | ||
|
||
if(!CONFIG_OBJECT_NAME || (values.configs[CONFIG_OBJECT_NAME] === undefined && values.prereq[CONFIG_OBJECT_NAME] === undefined)) { | ||
console.log("Configuration ", CONFIG_OBJECT_NAME, " not found."); | ||
process.exit(1); | ||
} | ||
|
||
console.log(JSON.stringify(values.configs[CONFIG_OBJECT_NAME])); |
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
Oops, something went wrong.