Skip to content

Use managed identity for the clusters and remove az capi #193

Use managed identity for the clusters and remove az capi

Use managed identity for the clusters and remove az capi #193

Workflow file for this run

name: capz
on:
pull_request:
branches: [ "master" ]
paths:
- 'capz/**'
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
# https://github.com/github/super-linter
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_BASH: true
VALIDATE_YAML: true
VALIDATE_MARKDOWN: true
DEFAULT_BRANCH: "master"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# using golangci-linter directly becuase of issues with go modules in super-linter
golangci:
name: lint go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
cache: false # workaround for golangci-lint caching issues https://github.com/golangci/golangci-lint-action/pull/704
# run mod download prior to running linter to avoid timeouts while running linter
- name: build go
run: |
pushd $GITHUB_WORKSPACE/capz/gmsa/configuration
go mod tidy
popd
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: capz/gmsa/configuration
args: --build-tags=e2e --timeout=10m
build-gmsa-configuration:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: build-gmsa-configuration
run: |
pushd capz/gmsa/configuration
go build -tags e2e .
popd
capz-templates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: generate templates
run: |
cd capz
make generate-templates
- name: verify-diff
run: |
if !(git diff --quiet HEAD); then
git diff; echo "gmsa files are out of date, run kustomize against the template"; exit 1; \
fi