Update harbor #176
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
integration-test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run conftest | |
uses: stefanprodan/kube-tools@v1 | |
with: | |
kubectl: 1.23.4 | |
kustomize: 4.5.2 | |
helmv3: 3.8.1 | |
command: | | |
set -x | |
set +e | |
kustomize build envs/dev | conftest test --update github.com/instrumenta/policies.git//kubernetes - -o json > result.json || echo "conftest failed!" | |
set -e | |
cat result.json | jq -r '(.[0].failures // []) | "::warning::\(.[].msg)\n"' | |
- uses: engineerd/setup-kind@v0.5.0 | |
with: | |
version: v0.15.0 | |
- name: Install flux cli and do setup | |
run: | | |
set -e | |
curl -s https://fluxcd.io/install.sh | sudo FLUX_VERSION=2.2.3 bash | |
set -x | |
flux install --components=source-controller,kustomize-controller,helm-controller | |
- name: Setup GitRepository/Kustomization | |
run: | | |
set -ex | |
if test -n "${GITHUB_HEAD_REF#refs/heads/}"; then flux create source git repo --url=https://github.com/$GITHUB_REPOSITORY.git --branch=${GITHUB_HEAD_REF#refs/heads/}; else flux create source git repo --url=https://github.com/$GITHUB_REPOSITORY.git --branch=${GITHUB_REF_NAME}; fi | |
flux create kustomization deployment --source=repo --path=envs/dev --prune --target-namespace default | |
- name: Wait for service to be Ready | |
run: ./test/wait | |
- name: Check if service is working as expected | |
run: ./test/test | |
- name: Fetch fluxcd logs | |
if: ${{ always() }} | |
run: | | |
set -x | |
kubectl logs -n flux-system deploy/source-controller | |
kubectl logs -n flux-system deploy/kustomize-controller | |
kubectl logs -n flux-system deploy/helm-controller |