1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-07 00:17:13 +00:00
kyverno/.github/workflows/build.yaml
shuting e5f408742f
Publish test image (#1183)
* push image on PR

* add docker login in CI

* publish image once PR is merged

* update order

* change condition when publish image

* add image publish as a separate github action
2020-10-09 19:16:28 -07:00

45 lines
1.1 KiB
YAML

name: build
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
releaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Unshallow
run: git fetch --prune --unshallow
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: docker images build
run: |
make docker-build-all
- name : Create Kind Cluster and setup kustomize
run: |
make ci
- name: e2e testing
run: |
echo ">>> Install Kyverno"
sed 's/imagePullPolicy:.*$/imagePullPolicy: IfNotPresent/g' ${GITHUB_WORKSPACE}/definitions/install.yaml | kubectl apply -f -
kubectl apply -f ${GITHUB_WORKSPACE}/definitions/github/rbac.yaml
chmod a+x ${GITHUB_WORKSPACE}/scripts/verify-deployment.sh
sleep 50
echo ">>> Check kyverno"
kubectl get pods -n kyverno
${GITHUB_WORKSPACE}/scripts/verify-deployment.sh -n kyverno kyverno
echo ">>> Run Kyverno e2e test"
make test-e2e