ci: make build not failing
currently, the build action is not failing if there is/are any modified files after the build. this commit will validate build with `git status` after `make build` command will fail if any changed file found. Signed-off-by: subhamkrai <srai@redhat.com>
This commit is contained in:
1 parent
ec9f1b57b4
commit
9305f12ecf
2 files changed
+14
-1
No files matched your search
@@ -54,6 +54,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -168,6 +169,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -275,6 +277,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -369,6 +372,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -457,6 +461,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -552,6 +557,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -646,6 +652,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -734,6 +741,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
@@ -833,6 +841,7 @@ jobs:
|
||||
run: |
|
||||
# set VERSION to a dummy value since Jenkins normally sets it for us. Do this to make Helm happy and not fail with "Error: Invalid Semantic Version"
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' VERSION=0 build
|
||||
tests/scripts/validate_modified_files.sh build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/ceph:master
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ set -ex
|
||||
CODEGEN_ERR="found codegen files! please run 'make codegen' and update your PR"
|
||||
MOD_ERR="changes found by mod.check. You may need to run make clean"
|
||||
CRD_ERR="changes found by 'make crds'. please run 'make crds' locally and update your PR"
|
||||
BUILD_ERR="changes found by make build', please commit your go.sum or other changed files"
|
||||
|
||||
#############
|
||||
# FUNCTIONS #
|
||||
@@ -36,7 +37,10 @@ case "$1" in
|
||||
crd)
|
||||
validate "$CRD_ERR"
|
||||
;;
|
||||
build)
|
||||
validate "$BUILD_ERR"
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {codegen|modcheck|crd}"
|
||||
echo $"Usage: $0 {codegen|modcheck|crd|build}"
|
||||
exit 1
|
||||
esac
|
||||
Reference in new issue
Block a user