mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
build: move GOLANGCI_VERSION to build.env
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
33dc861f23
commit
bc2ac1ccac
@ -19,7 +19,6 @@ branches:
|
||||
|
||||
env:
|
||||
global:
|
||||
- GOLANGCI_VERSION=v1.21.0
|
||||
- GO111MODULE=on
|
||||
- GOSEC_VERSION=2.0.0
|
||||
- TEST_COVERAGE=stdout
|
||||
@ -66,6 +65,7 @@ jobs:
|
||||
- pip install --user --upgrade pip
|
||||
- pip install --user yamllint
|
||||
# install golangci-lint
|
||||
- export GOLANGCI_VERSION=$(source build.env ; echo ${GOLANGCI_VERSION})
|
||||
- curl -sf
|
||||
"https://install.goreleaser.com/github.com/golangci/golangci-lint.sh"
|
||||
| bash -s -- -b $GOPATH/bin "${GOLANGCI_VERSION}"
|
||||
|
4
Makefile
4
Makefile
@ -137,13 +137,13 @@ containerized-test: .test-container-id
|
||||
$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CSI_IMAGE_NAME):devel > .devel-container-id
|
||||
|
||||
# create a (cached) container image with dependencied for testing cephcsi
|
||||
.test-container-id: scripts/Dockerfile.test
|
||||
.test-container-id: build.env scripts/Dockerfile.test
|
||||
[ ! -f .test-container-id ] || $(CONTAINER_CMD) rmi $(CSI_IMAGE_NAME):test
|
||||
$(CONTAINER_CMD) build $(CPUSET) -t $(CSI_IMAGE_NAME):test -f ./scripts/Dockerfile.test .
|
||||
$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CSI_IMAGE_NAME):test > .test-container-id
|
||||
|
||||
image-cephcsi:
|
||||
$(CONTAINER_CMD) build $(CPUSET) -t $(CSI_IMAGE) -f deploy/cephcsi/image/Dockerfile . --build-arg CSI_IMAGE_NAME=$(CSI_IMAGE_NAME) --build-arg CSI_IMAGE_VERSION=$(CSI_IMAGE_VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) --build-arg --build-arg GO_ARCH=$(GOARCH) $(BASE_IMAGE_ARG)
|
||||
$(CONTAINER_CMD) build $(CPUSET) -t $(CSI_IMAGE) -f deploy/cephcsi/image/Dockerfile . --build-arg CSI_IMAGE_NAME=$(CSI_IMAGE_NAME) --build-arg CSI_IMAGE_VERSION=$(CSI_IMAGE_VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) --build-arg GO_ARCH=$(GOARCH) $(BASE_IMAGE_ARG)
|
||||
|
||||
push-image-cephcsi: image-cephcsi
|
||||
$(CONTAINER_CMD) tag $(CSI_IMAGE) $(CSI_IMAGE)-$(GOARCH)
|
||||
|
@ -12,3 +12,6 @@
|
||||
# standard Golang options
|
||||
GOLANG_VERSION=1.13.9
|
||||
GO111MODULE=on
|
||||
|
||||
# static checks and linters
|
||||
GOLANGCI_VERSION=v1.21.0
|
||||
|
@ -10,7 +10,6 @@
|
||||
|
||||
FROM fedora:latest
|
||||
|
||||
ARG GOLANGCI_VERSION=v1.21.0
|
||||
ARG GOSEC_VERSION=2.0.0
|
||||
ARG GOPATH=/go
|
||||
|
||||
@ -19,7 +18,10 @@ ENV \
|
||||
GO111MODULE=on \
|
||||
PATH="${GOPATH}/bin:/opt/commitlint/node_modules/.bin:${PATH}"
|
||||
|
||||
RUN dnf -y install \
|
||||
COPY build.env /
|
||||
|
||||
RUN source /build.env \
|
||||
&& dnf -y install \
|
||||
git \
|
||||
make \
|
||||
golang \
|
||||
|
Loading…
Reference in New Issue
Block a user