Skip to content

Commit

Permalink
{Docker,Jenkins}file: update go version 1.13.4
Browse files Browse the repository at this point in the history
When go modules enabled user code is not intended be in GOROOT(/go) hence
placing source code in /src. Otherwise we hit with below error:

go: inconsistent vendoring in /go/src/github.com/intel/pmem-csi:
        go.mod requires github.com/intel/pmem-csi  but vendor/modules.txt does not include it.
        run 'go mod tidy; go mod vendor' to sync
make: *** [Makefile:70: pmem-csi-driver] Error 1

Ref: golang/go#34657

Jenkinsfile: Place the pmem-csi source out of GOPATH
  • Loading branch information
avalluri committed Nov 13, 2019
1 parent 30dbd78 commit 4fc2eca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
! test/test-config.d/**
! test/test-config.sh
! vendor/**
! go.mod
! go.sum
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARG SWUPD_UPDATE_ARG
ARG NDCTL_VERSION="67"
ARG NDCTL_CONFIGFLAGS="--disable-docs --without-systemd --without-bash"
ARG NDCTL_BUILD_DEPS="os-core-dev devpkg-util-linux devpkg-kmod devpkg-json-c"
ARG GO_VERSION="1.12.9"
ARG GO_VERSION="1.13.4"

#pull dependencies required for downloading and building libndctl
ARG CACHEBUST
Expand Down Expand Up @@ -78,10 +78,9 @@ FROM build as binaries

# build pmem-csi-driver
ARG VERSION="unknown"
ADD . /go/src/github.com/intel/pmem-csi
ENV GOPATH=/go
ADD . /src/pmem-csi
ENV PKG_CONFIG_PATH=/usr/lib/pkgconfig/
WORKDIR /go/src/github.com/intel/pmem-csi
WORKDIR /src/pmem-csi
ARG BIN_SUFFIX
# Here we choose explicitly which binaries we want in the image and in
# which flavor (production or testing). The actual binary name in the
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pipeline {
/* last version before the 1.14 update in 28630 */
CLEAR_LINUX_VERSION_1_13 = "28620"

PMEM_PATH = "/go/src/github.com/intel/pmem-csi"
PMEM_PATH = "/src/pmem-csi"
REGISTRY_NAME = "cloud-native-image-registry.westus.cloudapp.azure.com"

// Per-branch build environment, marked as "do not promote to public registry".
Expand Down

0 comments on commit 4fc2eca

Please sign in to comment.