mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
Added e2e test in release (#1042)
* e2e test added in release * added steps * dirty added in hash * new make command added * dirty remove from make
This commit is contained in:
parent
41667038e0
commit
c236a3a48a
3 changed files with 37 additions and 35 deletions
7
.github/workflows/build.yaml
vendored
7
.github/workflows/build.yaml
vendored
|
@ -23,9 +23,14 @@ jobs:
|
|||
with:
|
||||
go-version: 1.14
|
||||
|
||||
- name : binary build & kustomize
|
||||
- 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"
|
||||
|
|
57
.github/workflows/release.yaml
vendored
57
.github/workflows/release.yaml
vendored
|
@ -20,6 +20,31 @@ jobs:
|
|||
with:
|
||||
go-version: 1.14
|
||||
- uses: creekorful/goreportcard-action@v1.0
|
||||
|
||||
- name: login to docker hub
|
||||
run: echo "${{ secrets.DOCKERIO_PASSWORD }}" | docker login -u "${{ secrets.DOCKERIO_USERNAME }}" --password-stdin
|
||||
|
||||
- name : docker images publish
|
||||
run: |
|
||||
make docker-publish-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
|
||||
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
|
@ -29,38 +54,6 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name : binary build & kustomize
|
||||
run: |
|
||||
make kyverno
|
||||
make initContainer
|
||||
|
||||
- name: Get latest release version number
|
||||
id: get_version
|
||||
uses: battila7/get-version-action@v2
|
||||
|
||||
-
|
||||
uses: docker/build-push-action@v1
|
||||
name: kyverno docker build and publish
|
||||
with:
|
||||
username: ${{ secrets.DOCKERIO_USERNAME }}
|
||||
password: ${{ secrets.DOCKERIO_PASSWORD }}
|
||||
repository: "nirmata/kyverno"
|
||||
push: true
|
||||
path: cmd/kyverno/
|
||||
dockerfile: cmd/kyverno/Dockerfile
|
||||
tags: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
-
|
||||
uses: docker/build-push-action@v1
|
||||
name: kyvernopre docker build and publish
|
||||
with:
|
||||
username: ${{ secrets.DOCKERIO_USERNAME }}
|
||||
password: ${{ secrets.DOCKERIO_PASSWORD }}
|
||||
repository: "nirmata/kyvernopre"
|
||||
push: true
|
||||
path: cmd/initContainer/
|
||||
dockerfile: cmd/initContainer/Dockerfile
|
||||
tags: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
- uses: J12934/helm-gh-pages-action@master
|
||||
name: Run Helm Publish
|
||||
|
|
8
Makefile
8
Makefile
|
@ -3,7 +3,7 @@
|
|||
##################################
|
||||
# DEFAULTS
|
||||
##################################
|
||||
GIT_VERSION := $(shell git describe --dirty --always --tags)
|
||||
GIT_VERSION := $(shell git describe --always --tags)
|
||||
GIT_BRANCH := $(shell git branch | grep \* | cut -d ' ' -f2)
|
||||
GIT_HASH := $(GIT_BRANCH)/$(shell git log -1 --pretty=format:"%H")
|
||||
TIMESTAMP := $(shell date '+%Y-%m-%d_%I:%M:%S%p')
|
||||
|
@ -93,7 +93,11 @@ cli:
|
|||
|
||||
|
||||
##################################
|
||||
ci: docker-build-kyverno docker-build-initContainer
|
||||
docker-publish-all: docker-publish-initContainer docker-publish-kyverno
|
||||
|
||||
docker-build-all: docker-build-initContainer docker-build-kyverno
|
||||
|
||||
ci:
|
||||
echo "kustomize input"
|
||||
chmod a+x $(PWD)/scripts/ci.sh
|
||||
$(PWD)/scripts/ci.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue