Merge pull request #8408 from travisn/git-build-version
build: Detect git version instead of setting to 0
This commit is contained in:
21 files changed
+77
-14
No files matched your search
@@ -13,6 +13,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
@@ -24,8 +26,7 @@ jobs:
|
||||
- name: build rook
|
||||
working-directory: /Users/runner/go/src/github.com/rook/rook
|
||||
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_CONTAINER_IMAGE=false build
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' BUILD_CONTAINER_IMAGE=false build
|
||||
|
||||
- name: run codegen
|
||||
working-directory: /Users/runner/go/src/github.com/rook/rook
|
||||
@@ -59,6 +60,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -18,6 +18,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -23,6 +23,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -100,6 +102,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -178,6 +182,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -243,6 +249,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -312,6 +320,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -380,6 +390,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -448,6 +460,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -518,6 +532,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -605,6 +621,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -668,6 +686,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -26,6 +26,8 @@ jobs:
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: copy working directory to GOPATH
|
||||
run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/
|
||||
|
||||
@@ -17,6 +17,8 @@ jobs:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: codespell
|
||||
uses: codespell-project/actions-codespell@master
|
||||
with:
|
||||
|
||||
@@ -26,6 +26,8 @@ jobs:
|
||||
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: copy working directory to GOPATH
|
||||
run: sudo mkdir -p /home/runner/go/src/github.com && sudo cp -a /home/runner/work/rook /home/runner/go/src/github.com/
|
||||
|
||||
@@ -20,6 +20,8 @@ jobs:
|
||||
with:
|
||||
go-version: 1.16
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -40,8 +42,7 @@ jobs:
|
||||
|
||||
- name: build rook
|
||||
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='cassandra' VERSION=0 build
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='cassandra' build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/cassandra:master
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -18,6 +18,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -40,8 +42,7 @@ jobs:
|
||||
|
||||
- name: build rook
|
||||
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='nfs' VERSION=0 build
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='nfs' build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/nfs:master
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -21,6 +21,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
|
||||
@@ -22,6 +22,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -71,6 +73,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -125,6 +129,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -175,6 +181,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -224,6 +232,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -273,6 +283,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -292,8 +304,7 @@ jobs:
|
||||
|
||||
- name: build rook
|
||||
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='cassandra' VERSION=0 build
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='cassandra' build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/cassandra:master
|
||||
|
||||
@@ -323,6 +334,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: setup golang
|
||||
uses: actions/setup-go@v2
|
||||
@@ -342,8 +355,7 @@ jobs:
|
||||
|
||||
- name: build rook
|
||||
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='nfs' VERSION=0 build
|
||||
GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='nfs' build
|
||||
docker images
|
||||
docker tag $(docker images|awk '/build-/ {print $1}') rook/nfs:master
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
|
||||
@@ -22,6 +22,8 @@ jobs:
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
|
||||
@@ -16,6 +16,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
|
||||
@@ -6,8 +6,7 @@ set -ex
|
||||
#############
|
||||
|
||||
function build() {
|
||||
# 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"
|
||||
build/run make VERSION=0 build.all
|
||||
build/run make build.all
|
||||
# quick check that go modules are tidied
|
||||
build/run make mod.check
|
||||
}
|
||||
|
||||
@@ -94,9 +94,8 @@ function build_rook() {
|
||||
build_type=$1
|
||||
fi
|
||||
GOPATH=$(go env GOPATH) make clean
|
||||
# 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"
|
||||
for _ in $(seq 1 3); do
|
||||
if ! o=$(make -j"$(nproc)" IMAGES='ceph' VERSION=0 "$build_type"); then
|
||||
if ! o=$(make -j"$(nproc)" IMAGES='ceph' "$build_type"); then
|
||||
case "$o" in
|
||||
*"$NETWORK_ERROR"*)
|
||||
echo "network failure occurred, retrying..."
|
||||
|
||||
Reference in new issue
Block a user