File tree 3 files changed +16
-17
lines changed
3 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -37,21 +37,18 @@ CMD ["--help"]
37
37
# by far, most of the compilation time is building vendor packages
38
38
# build the vendor dependencies as a separate docker caching layer
39
39
COPY ./vendor/ /go/src/github.com/contiv/netplugin/vendor/
40
- # there is a bug in go-winio, remote the grep -v after this merges:
41
- # https://github.com/contiv/netplugin/pull/999
42
- RUN GOGC=1500 \
43
- go install -ldflags "-s -w" \
44
- $(go list ./vendor/... | grep -v go-winio)
40
+
41
+ RUN GOGC=1500 go install -ldflags "-s -w" $(go list ./vendor/...)
45
42
46
43
# build the netplugin binaries
47
44
COPY ./ /go/src/github.com/contiv/netplugin/
48
45
49
46
ARG BUILD_VERSION=""
50
- ARG USE_RELEASE =""
47
+ ARG NIGHTLY_RELEASE =""
51
48
52
49
RUN GOPATH=/go/ \
53
50
BUILD_VERSION="${BUILD_VERSION}" \
54
- USE_RELEASE ="${USE_RELEASE }" \
51
+ NIGHTLY_RELEASE ="${NIGHTLY_RELEASE }" \
55
52
make compile \
56
- && cp scripts/contrib/completion/bash/netctl /etc/bash_completion.d/netctl \
57
- && netplugin -version
53
+ && cp scripts/contrib/completion/bash/netctl /etc/bash_completion.d/netctl \
54
+ && netplugin -version
Original file line number Diff line number Diff line change @@ -97,9 +97,10 @@ compile:
97
97
run-build : deps checks clean compile
98
98
99
99
compile-with-docker :
100
- docker build --build-arg USE_RELEASE=${USE_RELEASE} \
101
- --build-arg BUILD_VERSION=${BUILD_VERSION} \
102
- -t netplugin:$$ {BUILD_VERSION:-devBuild}-$$(./scripts/getGitCommit.sh ) .
100
+ docker build \
101
+ --build-arg NIGHTLY_RELEASE=${NIGHTLY_RELEASE} \
102
+ --build-arg BUILD_VERSION=${BUILD_VERSION} \
103
+ -t netplugin:$$ {BUILD_VERSION:-devBuild}-$$(./scripts/getGitCommit.sh ) .
103
104
104
105
build-docker-image : start
105
106
vagrant ssh netplugin-node1 -c ' bash -lc "source /etc/profile.d/envvar.sh && cd /opt/gopath/src/github.com/contiv/netplugin && make host-build-docker-image"'
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -euo pipefail
4
+
3
5
if command -v git & > /dev/null && git rev-parse & > /dev/null; then
4
- GIT_COMMIT=$( git rev-parse --short HEAD)
5
- if [ -n " $( git status --porcelain --untracked-files=no) " ]; then
6
- GIT_COMMIT=" $GIT_COMMIT -unsupported"
7
- fi
6
+ GIT_COMMIT=$( git rev-parse --short HEAD)
7
+ if [ -n " $( git status --porcelain --untracked-files=no) " ]; then
8
+ GIT_COMMIT=" $GIT_COMMIT -unsupported"
9
+ fi
8
10
echo $GIT_COMMIT
9
11
exit 0
10
12
fi
11
13
echo >&2 ' error: unable to determine the git revision'
12
14
exit 1
13
-
You can’t perform that action at this time.
0 commit comments