Skip to content

Bump golang from 1.20.5 to 1.21.3 #234

Bump golang from 1.20.5 to 1.21.3

Bump golang from 1.20.5 to 1.21.3 #234

Workflow file for this run

name: Lint and Test Chart
on: pull_request
jobs:
go-test:
runs-on: ubuntu-latest
env:
IMAGE: jainishshah17/tugger
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "^1.13.0"
- name: go test
run: |
cd cmd/tugger
go test . -cover -v
lint-test:
runs-on: ubuntu-latest
env:
IMAGE: jainishshah17/tugger
strategy:
fail-fast: false
matrix:
k8sVersion:
- v1.28.0
- v1.27.3
- v1.26.6
- v1.25.11
- v1.24.15
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Helm
uses: azure/[email protected]
- name: Lint Chart
run: helm lint chart/* -f chart/*/ci/lint-values.yaml
- name: Build
run: docker build . -t $IMAGE
- name: Create kind cluster
uses: helm/[email protected]
with:
node_image: kindest/node:${{ matrix.k8sVersion }}
- name: Install
run: |
kind load docker-image $IMAGE --name=chart-testing
helm install $USER chart/tugger --debug --wait \
--set=createMutatingWebhook=true \
--set=image.tag=latest
- name: Test Mutation
timeout-minutes: 1
run: |
function test_jsonpath() {
until [ "$1" = "$(kubectl -n nginx get po -l test=tugger -o jsonpath="$2")" ]
do
echo "test failed \"$1\" = \"$2\""
sleep 1
done
}
kubectl apply -f test/nginx.yaml
test_jsonpath "jainishshah17/nginx" '{.items[0].spec.containers[0].image}'
test_jsonpath "original-secret" '{.items[0].spec.imagePullSecrets[0].name}'
test_jsonpath "regsecret" '{.items[0].spec.imagePullSecrets[1].name}'
- name: Print debug
if: ${{ always() }}
run: |
set +x
while read cmd
do
echo "::group::$cmd"
$cmd
echo "::endgroup::"
done <<< 'git diff
helm list
kubectl get po,rs,svc,ep,secrets,configmap
kubectl describe po
kubectl logs -l app=tugger'