From c0c74010e764d7aed3734a9da105d3b133f70044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 18 Aug 2023 14:24:07 +0200 Subject: [PATCH] ci: set GOCACHE to ws tmp to avoid cache poisoning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- _assets/ci/Jenkinsfile.android | 1 + _assets/ci/Jenkinsfile.docker | 9 +++++---- _assets/ci/Jenkinsfile.ios | 1 + _assets/ci/Jenkinsfile.linux | 1 + _assets/ci/Jenkinsfile.tests | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/_assets/ci/Jenkinsfile.android b/_assets/ci/Jenkinsfile.android index 081ed911a..8412e2e07 100644 --- a/_assets/ci/Jenkinsfile.android +++ b/_assets/ci/Jenkinsfile.android @@ -32,6 +32,7 @@ pipeline { TARGET = 'android' TMPDIR = "${WORKSPACE_TMP}" GOPATH = "${WORKSPACE_TMP}/go" + GOCACHE = "${WORKSPACE_TMP}/gocache" PATH = "${PATH}:${GOPATH}/bin" REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go" ARTIFACT = utils.pkgFilename(name: "status-go", type: "android", ext: "aar", version: null) diff --git a/_assets/ci/Jenkinsfile.docker b/_assets/ci/Jenkinsfile.docker index 2a3ceaa64..14fdec7bd 100644 --- a/_assets/ci/Jenkinsfile.docker +++ b/_assets/ci/Jenkinsfile.docker @@ -31,10 +31,11 @@ pipeline { } environment { - TARGET = "docker" - REPO = "${env.WORKSPACE}/src/github.com/status-im/status-go" - GOPATH = "${env.WORKSPACE}" - PATH = "/usr/local/go/bin:${env.PATH}:${env.GOPATH}/bin" + TARGET = "docker" + REPO = "${env.WORKSPACE}/src/github.com/status-im/status-go" + GOPATH = "${env.WORKSPACE}" + GOCACHE = "${WORKSPACE_TMP}/gocache" + PATH = "/usr/local/go/bin:${env.PATH}:${env.GOPATH}/bin" /* Makefile parameters */ DOCKER_IMAGE_NAME = 'statusteam/status-go' DOCKER_IMAGE_CUSTOM_TAG = "ci-build-${utils.gitCommit()}" diff --git a/_assets/ci/Jenkinsfile.ios b/_assets/ci/Jenkinsfile.ios index 7e134aa33..0747d6952 100644 --- a/_assets/ci/Jenkinsfile.ios +++ b/_assets/ci/Jenkinsfile.ios @@ -32,6 +32,7 @@ pipeline { TARGET = 'ios' TMPDIR = "${WORKSPACE_TMP}" GOPATH = "${WORKSPACE_TMP}/go" + GOCACHE = "${WORKSPACE_TMP}/gocache" PATH = "${PATH}:${GOPATH}/bin" REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go" ARTIFACT = utils.pkgFilename(name: "status-go", type: "ios", ext: "zip", version: null) diff --git a/_assets/ci/Jenkinsfile.linux b/_assets/ci/Jenkinsfile.linux index da8c11df4..ee1185aea 100644 --- a/_assets/ci/Jenkinsfile.linux +++ b/_assets/ci/Jenkinsfile.linux @@ -32,6 +32,7 @@ pipeline { TARGET = 'linux' TMPDIR = "${WORKSPACE_TMP}" GOPATH = "${WORKSPACE_TMP}/go" + GOCACHE = "${WORKSPACE_TMP}/gocache" PATH = "${PATH}:${GOPATH}/bin" REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go" ARTIFACT = utils.pkgFilename(name: "status-go", type: "desktop", ext: "zip", version: null) diff --git a/_assets/ci/Jenkinsfile.tests b/_assets/ci/Jenkinsfile.tests index 53c8ac37a..cec8d7940 100644 --- a/_assets/ci/Jenkinsfile.tests +++ b/_assets/ci/Jenkinsfile.tests @@ -28,6 +28,7 @@ pipeline { DB_CONT = 'status-go-test-db' TMPDIR = "${WORKSPACE_TMP}" GOPATH = "${WORKSPACE_TMP}/go" + GOCACHE = "${WORKSPACE_TMP}/gocache" PATH = "${PATH}:${GOPATH}/bin" REPO_SRC = "${GOPATH}/src/github.com/status-im/status-go" }