Skip to content

Commit c5aac5d

Browse files
authored
Merge pull request #87 from commjoen/minikube-test
Minikube test
2 parents 54a0cf0 + 25efcd5 commit c5aac5d

File tree

18 files changed

+118
-648
lines changed

18 files changed

+118
-648
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
custom: https://owasp.org/donate/?reponame=www-project-wrongsecrets&title=OWASP+wrongsecrets
1+
custom: ["https://owasp.org/donate/?reponame=www-project-wrongsecrets&title=OWASP+wrongsecrets", "https://www.icrc.org/en/donate/ukraine"]
22
github: OWASP
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Test minikube script (k8s)
4+
5+
# Controls when the workflow will run
6+
on:
7+
pull_request:
8+
branches: [ main ]
9+
push:
10+
branches: [ main ]
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
16+
jobs:
17+
test-minikube:
18+
name: Test with minikube
19+
runs-on: ubuntu-latest
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Start minikube
24+
uses: medyagh/setup-minikube@master
25+
with:
26+
minikube-version: 1.27.0
27+
driver: docker
28+
kubernetes-version: v1.23.12
29+
- name: test script
30+
run: |
31+
eval $(minikube docker-env)
32+
./build-an-deploy.sh
33+
while [[ $(kubectl get pods -l app=wrongsecrets-balancer -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do echo "waiting for wrongsecrets-balancer" && sleep 2; done
34+
kubectl logs deployments/wrongsecrets-balancer -f >> pod.log &
35+
echo "port forwarding"
36+
kubectl port-forward service/wrongsecrets-balancer 3000:3000 &
37+
echo "Awaiting the first forward to be ready"
38+
sleep 10
39+
curl http://localhost:3000/balancer/
40+
echo "logs from pod to make sure:"
41+
cat pod.log

.github/workflows/pre-commit.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Pre-commit check
2+
3+
# Controls when the workflow will run
4+
on:
5+
pull_request:
6+
branches: [master]
7+
workflow_dispatch:
8+
9+
env:
10+
TF_DOCS_VERSION: v0.16.0
11+
TFSEC_VERSION: v1.27.6
12+
TFLINT_VERSION: v0.41.0
13+
permissions:
14+
contents: read
15+
jobs:
16+
pre-commit:
17+
name: Pre-commit check
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout git repository
21+
uses: actions/checkout@v3
22+
- name: Setup python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.9"
26+
- uses: actions/cache@v3
27+
name: Cache plugin dir
28+
with:
29+
path: ~/.tflint.d/plugins
30+
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
31+
- name: Setup Terraform
32+
uses: hashicorp/setup-terraform@v2
33+
with:
34+
terraform_version: 1.1.7
35+
- name: Setup TFLint
36+
uses: terraform-linters/setup-tflint@v2
37+
with:
38+
tflint_version: ${{env.TFLINT_VERSION}}
39+
- name: Setup Terraform docs
40+
run: |
41+
wget https://github.com/terraform-docs/terraform-docs/releases/download/${{env.TF_DOCS_VERSION}}/terraform-docs-${{env.TF_DOCS_VERSION}}-linux-amd64.tar.gz -O terraform_docs.tar.gz
42+
tar -zxvf terraform_docs.tar.gz terraform-docs
43+
chmod +x terraform-docs
44+
mv terraform-docs /usr/local/bin/
45+
- name: Setup tfsec
46+
run: |
47+
curl --output tfsec https://github.com/aquasecurity/tfsec/releases/download/${{env.TFSEC_VERSION}}/tfsec-linux-amd64
48+
chmod +x tfsec
49+
mv tfsec /usr/local/bin/
50+
- name: Pre-commit checks
51+
uses: pre-commit/[email protected]

guides-archived-use-readme-only/aws/aws.md

Lines changed: 0 additions & 120 deletions
This file was deleted.

guides-archived-use-readme-only/aws/loadbalancer.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

guides-archived-use-readme-only/azure/azure.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)