mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
added environment argument for golang version
This commit is contained in:
+4
-1
@@ -1,4 +1,7 @@
|
|||||||
FROM golang:1.12
|
ARG GOLANG_VERSION=latest
|
||||||
|
FROM golang:$GOLANG_VERSION
|
||||||
|
|
||||||
|
RUN echo $GOLANG_VERSION
|
||||||
|
|
||||||
RUN mkdir -p /athens/tests
|
RUN mkdir -p /athens/tests
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
VERSION = "unset"
|
VERSION = "unset"
|
||||||
DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z)
|
DATE=$(shell date -u +%Y-%m-%d-%H:%M:%S-%Z)
|
||||||
|
|
||||||
|
ifndef GOLANG_VERSION
|
||||||
|
override GOLANG_VERSION = latest
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## build the athens proxy
|
build: ## build the athens proxy
|
||||||
cd cmd/proxy && go build
|
cd cmd/proxy && go build
|
||||||
@@ -47,7 +52,8 @@ test-unit: ## run unit tests with race detector and code coverage enabled
|
|||||||
|
|
||||||
.PHONY: test-unit-docker
|
.PHONY: test-unit-docker
|
||||||
test-unit-docker: ## run unit tests with docker
|
test-unit-docker: ## run unit tests with docker
|
||||||
docker-compose -p athensunit up --exit-code-from=testunit --build testunit
|
docker-compose -p athensunit build --build-arg GOLANG_VERSION=${GOLANG_VERSION} testunit
|
||||||
|
docker-compose -p athensunit up --exit-code-from=testunit testunit
|
||||||
docker-compose -p athensunit down
|
docker-compose -p athensunit down
|
||||||
|
|
||||||
.PHONY: test-e2e
|
.PHONY: test-e2e
|
||||||
@@ -56,7 +62,8 @@ test-e2e:
|
|||||||
|
|
||||||
.PHONY: test-e2e-docker
|
.PHONY: test-e2e-docker
|
||||||
test-e2e-docker:
|
test-e2e-docker:
|
||||||
docker-compose -p athense2e up --build --exit-code-from=teste2e teste2e
|
docker-compose -p athense2e build --build-arg GOLANG_VERSION=${GOLANG_VERSION} teste2e
|
||||||
|
docker-compose -p athense2e up --exit-code-from=teste2e teste2e
|
||||||
docker-compose -p athense2e down
|
docker-compose -p athense2e down
|
||||||
|
|
||||||
.PHONY: docker
|
.PHONY: docker
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.test
|
dockerfile: Dockerfile.test
|
||||||
|
args:
|
||||||
|
GOLANG_VERSION: latest
|
||||||
command: ["./scripts/test_unit.sh"]
|
command: ["./scripts/test_unit.sh"]
|
||||||
environment:
|
environment:
|
||||||
- GO_ENV=test
|
- GO_ENV=test
|
||||||
@@ -31,6 +33,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.test
|
dockerfile: Dockerfile.test
|
||||||
|
args:
|
||||||
|
GOLANG_VERSION: latest
|
||||||
command: ["./scripts/test_e2e.sh"]
|
command: ["./scripts/test_e2e.sh"]
|
||||||
azurite:
|
azurite:
|
||||||
image: arafato/azurite:2.6.5
|
image: arafato/azurite:2.6.5
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999 h1:OR8VhtwhcAI3U48/
|
|||||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||||
github.com/Azure/azure-pipeline-go v0.1.8 h1:KmVRa8oFMaargVesEuuEoiLCQ4zCCwQ8QX/xg++KS20=
|
github.com/Azure/azure-pipeline-go v0.1.8 h1:KmVRa8oFMaargVesEuuEoiLCQ4zCCwQ8QX/xg++KS20=
|
||||||
github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg=
|
github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg=
|
||||||
|
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
|
||||||
github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c h1:Y5ueznoCekgCWBytF1Q9lTpZ3tJeX37dQtCcGjMCLYI=
|
github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c h1:Y5ueznoCekgCWBytF1Q9lTpZ3tJeX37dQtCcGjMCLYI=
|
||||||
github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y=
|
github.com/Azure/azure-storage-blob-go v0.0.0-20181022225951-5152f14ace1c/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y=
|
||||||
|
github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=
|
||||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 h1:dmc/C8bpE5VkQn65PNbbyACDC8xw8Hpp/NEurdPmQDQ=
|
github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 h1:dmc/C8bpE5VkQn65PNbbyACDC8xw8Hpp/NEurdPmQDQ=
|
||||||
@@ -144,6 +146,7 @@ github.com/markbates/hmax v1.0.0 h1:yo2N0gBoCnUMKhV/VRLHomT6Y9wUm+oQQENuWJqCdlM=
|
|||||||
github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
|
github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
|
||||||
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
|
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
|
||||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||||
|
github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=
|
||||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
|
||||||
|
|||||||
Reference in New Issue
Block a user