-
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.
Merge pull request #7 from philiplee13/kind
testing gh action
- Loading branch information
Showing
7 changed files
with
62 additions
and
5 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,28 @@ | ||
name: Integration tests | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
branches: | ||
- "main" | ||
- "**" # every single branch | ||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install tools | ||
run: | | ||
chmod +x ./scripts/install.sh | ||
./scripts/install.sh | ||
- name: apply resources and verify | ||
run: | | ||
chmod +x ./scripts/set-env-vars.sh | ||
. ./scripts/set-env-vars.sh | ||
echo $NAMESPACE | ||
chmod +x ./scripts/verify.sh | ||
./scripts/verify.sh |
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,14 @@ | ||
#!/bin/sh | ||
|
||
|
||
set -e # exit on any error | ||
|
||
echo "Installing k3s and kubectl" | ||
curl -sfL https://get.k3s.io | sh - | ||
sudo chmod -R a+rw /etc/rancher/k3s | ||
sudo mkdir -p $HOME/.kube && sudo chown -R runner $HOME/.kube | ||
sudo k3s kubectl config view --raw > $HOME/.kube/config | ||
sudo chown runner $HOME/.kube/config | ||
sudo chmod go-r $HOME/.kube/config | ||
kubectl version | ||
|
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 @@ | ||
#!/bin/sh | ||
|
||
export NAMESPACE=dev-ns-set-in-env-vars |
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 @@ | ||
#!/bin/sh | ||
|
||
set -e # exit on any error | ||
cd tekton/kind/dev | ||
|
||
kubectl get ns | ||
kustomize build . | envsubst '$NAMESPACE' | kubectl apply -f- | ||
|
||
kubectl get ns | ||
kubectl get pods -n $NAMESPACE |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: dev-ns | ||
name: $NAMESPACE |
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