Bump actions/download-artifact from 2 to 5 #677
Workflow file for this run
This file contains hidden or 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
| name: Classic CI/CD | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags-ignore: | |
| - "*.*" | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ^1.14 | |
| id: go | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.8" | |
| - uses: actions/cache@v2 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install MarkdownPP mkdocs | |
| - name: Install dependencies | |
| run: | | |
| cd ./documentation && go run mage.go -v GenerateDocumation | |
| - uses: EndBug/add-and-commit@v5 # You can change this to use a specific version | |
| if: github.event_name != 'pull_request' | |
| with: | |
| add: 'docs --force --ignore-errors' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: EndBug/add-and-commit@v5 # You can change this to use a specific version | |
| if: github.event_name != 'pull_request' | |
| with: | |
| add: 'documentation/provider_doc --force --ignore-errors' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: install golangci-lint | |
| run: | | |
| curl -sSfL \ | |
| https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | |
| | sh -s -- -b $(go env GOPATH)/bin v1.30.0 | |
| - name: Generate Sources from Swagger Spec | |
| run: | | |
| make generate | |
| - name: execute the Tests | |
| run: | | |
| make test | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v2 | |
| with: | |
| version: latest | |
| args: build --rm-dist --snapshot | |
| - name: Upload terraform provider | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: provider | |
| path: dist/* | |
| acc: | |
| name: Acception Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| harbor_deployments: | |
| - helm_chart_version: 1.4.0 | |
| harbor_path: "/api/v2.0" | |
| - helm_chart_version: 1.4.1 | |
| harbor_path: "/api/v2.0" | |
| # TODO: https://github.com/nolte/terraform-provider-harbor/issues/40 | |
| #- helm_chart_version: 1.3.2 | |
| # harbor_path: "/api" | |
| env: | |
| HARBOR_HELM_CHART_VERSION: ${{ matrix.harbor_deployments.helm_chart_version }} | |
| steps: | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ^1.14 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| - name: Generate Api Client from Swagger Spac | |
| run: | | |
| make generate | |
| # https://github.com/engineerd/setup-kind | |
| - uses: engineerd/[email protected] | |
| with: | |
| skipClusterCreation: true | |
| - name: Starting the Kind Cluster | |
| run: | | |
| make e2e_prepare | |
| - name: configure kind kubeconfig | |
| run: | | |
| kind export kubeconfig | |
| kubectl cluster-info | |
| kubectl get pods -n kube-system | |
| NODEDNSNAME=$(kubectl get nodes -ojson | jq '.items[0].status.addresses[0].address' -r | sed 's/\./-/g') | |
| echo "::set-env name=INGRESS_DOMAIN::${NODEDNSNAME}.sslip.io" | |
| echo "current-context:" $(kubectl config current-context) | |
| echo "environment-kubeconfig:" ${KUBECONFIG} | |
| - name: install helm3 | |
| run: | | |
| curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
| - name: install harbor | |
| run: | | |
| cd ./tools && go run mage.go -v testArtefacts:deploy | |
| - name: Starting the Acc | |
| run: | | |
| ./scripts/tst-15-execute-go-acc.sh "${{ matrix.harbor_deployments.harbor_path }}" | |
| - name: remove the kind cluster | |
| if: ${{ always() }} | |
| run: | | |
| kind delete cluster | |
| acc_terratest: | |
| name: acc-terratest | |
| runs-on: ubuntu-latest | |
| needs: build | |
| #env: | |
| # TF_LOG: TRACE | |
| strategy: | |
| # Workarround, otherwithe the the different matrix jobs faild. | |
| # max-parallel: 1 | |
| fail-fast: false | |
| matrix: | |
| terraform_versions: | |
| # - 0.11.14 Out of Support | |
| # <0.12.29 Out of automatical test scope ... | |
| # missing helper methodes, and v0.13 provider file system Structure. | |
| #- version: 0.12.25 | |
| - version: 0.12.29 | |
| - version: 0.13.0 | |
| - version: 0.13.4 | |
| harbor_deployments: | |
| - helm_chart_version: 1.4.0 | |
| harbor_path: "/api/v2.0" | |
| - helm_chart_version: 1.4.1 | |
| harbor_path: "/api/v2.0" | |
| - helm_chart_version: 1.3.2 | |
| harbor_path: "/api" | |
| env: | |
| HARBOR_HELM_CHART_VERSION: ${{ matrix.harbor_deployments.helm_chart_version }} | |
| TF_VERSION: ${{ matrix.terraform_versions.version }} | |
| steps: | |
| - name: Set up Go 1.x | |
| uses: actions/setup-go@v2 | |
| with: | |
| go-version: ^1.14 | |
| id: go | |
| - name: Check out code into the Go module directory | |
| uses: actions/checkout@v2 | |
| - name: Download terraform provider binary | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: provider | |
| path: dist | |
| - name: Setup Terraform | |
| uses: hashicorp/[email protected] | |
| with: | |
| terraform_version: ${{ matrix.terraform_versions.version }} | |
| - name: debuggin | |
| run: | | |
| terraform version -json | |
| - name: install the provider to local terraform.d folder | |
| run: | | |
| make install | |
| # https://github.com/engineerd/setup-kind | |
| - uses: engineerd/[email protected] | |
| with: | |
| skipClusterCreation: true | |
| - name: Starting the Kind Cluster | |
| run: | | |
| make e2e_prepare | |
| - name: configure kind kubeconfig | |
| run: | | |
| kind export kubeconfig | |
| kubectl cluster-info | |
| kubectl get pods -n kube-system | |
| NODEDNSNAME=$(kubectl get nodes -ojson | jq '.items[0].status.addresses[0].address' -r | sed 's/\./-/g') | |
| echo "::set-env name=INGRESS_DOMAIN::${NODEDNSNAME}.sslip.io" | |
| echo "current-context:" $(kubectl config current-context) | |
| echo "environment-kubeconfig:" ${KUBECONFIG} | |
| - name: install helm3 | |
| run: | | |
| curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
| - name: install harbor | |
| run: | | |
| cd ./tools && go run mage.go -v testArtefacts:deploy | |
| #- name: install harbor | |
| # run: | | |
| # echo "::set-env name=INGRESS_DOMAIN::harbor.${NODEDNSNAME}.sslip.io" | |
| - name: Wait some Time | |
| run: | | |
| sleep 30 | |
| - name: Starting the Acc | |
| run: | | |
| ./scripts/tst-15-execute-classic-acc.sh "${{ matrix.harbor_deployments.harbor_path }}" | |
| - name: read harbor logs core | |
| if: ${{ failure() }} | |
| run: | | |
| kubectl logs -l component=core -n harbor --tail=-1 | |
| - name: read harbor logs jobservice | |
| if: ${{ failure() }} | |
| run: | | |
| kubectl logs -l component=jobservice -n harbor --tail=-1 | |
| - name: remove the kind cluster | |
| if: ${{ always() }} | |
| run: | | |
| kind delete cluster |