From 8536af0bb3f00d62d1a57259ed6048603ba1a850 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 13:48:19 -0400 Subject: [PATCH 01/70] initial build and output testing --- Jenkinsfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..8a4d790d1 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,25 @@ +pipeline { + agent { + docker { image 'ubuntu:latest'} + } + + stages { + stage('Build') { + steps { + echo 'Building ...' + docker build -t cerc-io/go-ethereum . + echo 'built geth' + } + } + stage('Test') { + steps { + echo 'Testing ...' + } + } + stage('Packaging') { + steps { + echo 'Packaging ...' + } + } + } +} \ No newline at end of file -- 2.45.2 From b0b7a0de726e2a287c6748d83b702521c70037f3 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 14:08:52 -0400 Subject: [PATCH 02/70] move docker agent declaration and reuse --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8a4d790d1..638e84d37 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,14 @@ pipeline { - agent { - docker { image 'ubuntu:latest'} - } + agent any stages { stage('Build') { + agent { + docker { + image 'ubuntu:latest' + reuseNode true + } + } steps { echo 'Building ...' docker build -t cerc-io/go-ethereum . -- 2.45.2 From 3f2e8e1c35a121ba72b997a3c5fc4907040703a8 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 14:21:11 -0400 Subject: [PATCH 03/70] steps are not shell --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 638e84d37..11ded8d0c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,9 +10,11 @@ pipeline { } } steps { - echo 'Building ...' - docker build -t cerc-io/go-ethereum . - echo 'built geth' + docker.withRegistry('https://git.vdb.to'){ + echo 'Building ...' + def geth_image = docker.build("cerc-io/go-ethereum") + echo 'built geth' + } } } stage('Test') { -- 2.45.2 From 08eeefb31dfc45d003603f119654a5417e96299a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 14:49:23 -0400 Subject: [PATCH 04/70] docker method calls inside a script block --- Jenkinsfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 11ded8d0c..5b3b66c17 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,10 +10,12 @@ pipeline { } } steps { - docker.withRegistry('https://git.vdb.to'){ - echo 'Building ...' - def geth_image = docker.build("cerc-io/go-ethereum") - echo 'built geth' + script{ + docker.withRegistry('https://git.vdb.to'){ + echo 'Building geth image...' + def geth_image = docker.build("cerc-io/go-ethereum:jenkinscicd") + echo 'built geth image' + } } } } -- 2.45.2 From fa5ce136fb369f2b96599130aa9c0914bd5949b1 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 15:49:53 -0400 Subject: [PATCH 05/70] build directly on node, not within container --- Jenkinsfile | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5b3b66c17..5d2b042dc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,12 +3,6 @@ pipeline { stages { stage('Build') { - agent { - docker { - image 'ubuntu:latest' - reuseNode true - } - } steps { script{ docker.withRegistry('https://git.vdb.to'){ -- 2.45.2 From c7a0d299d1192055dab9a14d4f96d5ff8d533fd5 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 16:42:58 -0400 Subject: [PATCH 06/70] first attempt make test from within golang alpine container --- Jenkinsfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5d2b042dc..172df8475 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,22 @@ pipeline { } } stage('Test') { + agent { + docker { + image 'golang:1.18-alpine' + } + } + tools { + go 'go-1.18' + } + environment { + GO111MODULE = 'on' + CGO_ENABLED = 0 + GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + } steps { echo 'Testing ...' + sh 'make test' } } stage('Packaging') { -- 2.45.2 From f4e7ee5c00116f311ef98b0282ecbcd606af9de1 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Tue, 4 Oct 2022 16:44:11 -0400 Subject: [PATCH 07/70] SPECIFIC installed go tools --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 172df8475..776491639 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { } } tools { - go 'go-1.18' + go 'go-1.18.5' } environment { GO111MODULE = 'on' -- 2.45.2 From 6966e3be1201d4027f46eb832128b04940a83a3d Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 5 Oct 2022 14:09:09 -0400 Subject: [PATCH 08/70] run in ubuntu latest for make --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 776491639..ff6381a31 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage('Test') { agent { docker { - image 'golang:1.18-alpine' + image 'ubuntu:latest' } } tools { -- 2.45.2 From c5ba0b8e1eec664c7175767beb315a7bf97c2eb3 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 5 Oct 2022 14:43:21 -0400 Subject: [PATCH 09/70] no make on ubuntu:latest --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index ff6381a31..e3d8f8165 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,7 @@ pipeline { } steps { echo 'Testing ...' + sh 'apt-get install make' sh 'make test' } } -- 2.45.2 From c3f3f59671986fe434188a09c0402cc25147914e Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 5 Oct 2022 14:52:53 -0400 Subject: [PATCH 10/70] trying sudo apt-get --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e3d8f8165..5ae64d319 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ pipeline { } steps { echo 'Testing ...' - sh 'apt-get install make' + sh 'sudo apt-get install -y make' sh 'make test' } } -- 2.45.2 From afe5336d8480c21a873261502d3684b755bd3f11 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 5 Oct 2022 15:27:26 -0400 Subject: [PATCH 11/70] trying apt after sudo not found --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5ae64d319..2d076204e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,7 @@ pipeline { } steps { echo 'Testing ...' - sh 'sudo apt-get install -y make' + sh 'apt install build-essential -y --no-install-recommends' sh 'make test' } } -- 2.45.2 From 3343b786aa38831ffb3d283288acb871eb56b005 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Wed, 5 Oct 2022 17:55:23 -0400 Subject: [PATCH 12/70] first attempt with foundation image --- Jenkinsfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2d076204e..6c5c17127 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,20 +16,16 @@ pipeline { stage('Test') { agent { docker { - image 'ubuntu:latest' + image 'cerc-io/foundation:jenkinscicd' } } - tools { - go 'go-1.18.5' - } - environment { - GO111MODULE = 'on' - CGO_ENABLED = 0 - GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" - } + environment { + GO111MODULE = 'on' + CGO_ENABLED = 0 + GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + } steps { echo 'Testing ...' - sh 'apt install build-essential -y --no-install-recommends' sh 'make test' } } -- 2.45.2 From 6767078c1624a5e13dc67d19759bd3f433201e3b Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 08:07:48 -0400 Subject: [PATCH 13/70] GOPATH not set properly? --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6c5c17127..7cbb98acb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,6 +26,9 @@ pipeline { } steps { echo 'Testing ...' + sh 'env' + sh 'pwd' + sh 'export GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"' sh 'make test' } } -- 2.45.2 From f471dc8f9c03849348c6f6d497c6837931529039 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 08:18:08 -0400 Subject: [PATCH 14/70] go env inspection --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7cbb98acb..1594da6e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,7 +28,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'pwd' - sh 'export GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"' + sh 'go env' sh 'make test' } } -- 2.45.2 From da00da4ea2e52d8a651f3864d490980d0cfe24ff Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 09:52:29 -0400 Subject: [PATCH 15/70] go env inspection 2 --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1594da6e0..710e5bfc1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,7 @@ pipeline { sh 'env' sh 'pwd' sh 'go env' + sh 'ls -tla /var/lib/jenkins/jobs' sh 'make test' } } -- 2.45.2 From de5968f24472fbfe40187f00d361f88fe9537e3f Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 10:01:33 -0400 Subject: [PATCH 16/70] trying workspace as modcache --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 710e5bfc1..db1be441a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,7 @@ pipeline { GO111MODULE = 'on' CGO_ENABLED = 0 GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOMODCACHE = "${WORKSPACE}/pkg/mod" } steps { echo 'Testing ...' -- 2.45.2 From ad6def9021a966cd332e63228acd89b817a676f0 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 10:14:17 -0400 Subject: [PATCH 17/70] trying workspace as modcache without ls --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index db1be441a..d4d63e402 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,6 @@ pipeline { sh 'env' sh 'pwd' sh 'go env' - sh 'ls -tla /var/lib/jenkins/jobs' sh 'make test' } } -- 2.45.2 From 87fa971eb2f9a6bf745103a7c49808e1f7e1fef5 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 10:32:24 -0400 Subject: [PATCH 18/70] gocache and goenv dirs changed to workspace --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index d4d63e402..53d90a906 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,6 +24,8 @@ pipeline { CGO_ENABLED = 0 GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOMODCACHE = "${WORKSPACE}/pkg/mod" + GOCACHE = "${WORKSPACE}/.cache/go-build" + GOENV = "${WORKSPACE}/.config/go/env" } steps { echo 'Testing ...' -- 2.45.2 From ab4b805937eb2dbc1cf379daf1179ef4ab60f01e Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 10:43:25 -0400 Subject: [PATCH 19/70] try with cgo enabled --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 53d90a906..698c0df1d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ pipeline { } environment { GO111MODULE = 'on' - CGO_ENABLED = 0 + CGO_ENABLED = 1 GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" -- 2.45.2 From 423d6ce1fb76b1075da08d2713a9d3ae4077ad9a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 14:02:10 -0400 Subject: [PATCH 20/70] go get everything explicit --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 698c0df1d..c309ba7ff 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ pipeline { steps { echo 'Testing ...' sh 'env' - sh 'pwd' + sh 'go get -d ./...' sh 'go env' sh 'make test' } -- 2.45.2 From 3dc4e6265e7ab848aff5c2185f9f26911c68984f Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 14:16:21 -0400 Subject: [PATCH 21/70] go mod tidy --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index c309ba7ff..e489abe2b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,6 +30,7 @@ pipeline { steps { echo 'Testing ...' sh 'env' + sh 'go mod tidy' sh 'go get -d ./...' sh 'go env' sh 'make test' -- 2.45.2 From afcc5888d305f983897ef061c0dd61fe7b45d914 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 15:09:12 -0400 Subject: [PATCH 22/70] go back and try the build step tagged image as base for testing --- .github/workflows/publish.yaml | 2 +- Jenkinsfile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5a3ecbb26..5772c6e84 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,4 +33,4 @@ jobs: - name: curl uses: enflo/curl-action@master with: - curl: --user circcicd:${{ secrets.GITEA_TOKEN }} --upload-file geth-linux-amd64 https://git.vdb.to/api/packages/cerc-io/generic/go-ethereum/v1.10.23-statediff-alpha-unstable/geth-linux-amd64 + curl: --user cerccicd:${{ secrets.GITEA_TOKEN }} --upload-file geth-linux-amd64 https://git.vdb.to/api/packages/cerc-io/generic/go-ethereum/${{ github.event.inputs.giteaPublishTag }}/geth-linux-amd64 diff --git a/Jenkinsfile b/Jenkinsfile index e489abe2b..0874e207e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,8 @@ pipeline { stage('Test') { agent { docker { - image 'cerc-io/foundation:jenkinscicd' + //image 'cerc-io/foundation:jenkinscicd' + image 'cerc-io/go-ethereum:jenkinscicd' } } environment { @@ -30,8 +31,6 @@ pipeline { steps { echo 'Testing ...' sh 'env' - sh 'go mod tidy' - sh 'go get -d ./...' sh 'go env' sh 'make test' } -- 2.45.2 From de59fb203e4bc556b5b4d8ca12b6289f3cea9f3d Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 15:51:47 -0400 Subject: [PATCH 23/70] foundation with with musl-dev --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0874e207e..e4cd309ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,8 +16,8 @@ pipeline { stage('Test') { agent { docker { - //image 'cerc-io/foundation:jenkinscicd' - image 'cerc-io/go-ethereum:jenkinscicd' + image 'cerc-io/foundation:jenkinscicd' + //image 'cerc-io/go-ethereum:jenkinscicd' } } environment { @@ -31,6 +31,8 @@ pipeline { steps { echo 'Testing ...' sh 'env' + sh 'go mod tidy' + sh 'go get -d ./...' sh 'go env' sh 'make test' } -- 2.45.2 From 145e0e5ceaab226b49082467ce73ef7f6a4598fb Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 16:03:52 -0400 Subject: [PATCH 24/70] foundation with with musl-dev to make test --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e4cd309ca..dfd936452 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,8 +31,6 @@ pipeline { steps { echo 'Testing ...' sh 'env' - sh 'go mod tidy' - sh 'go get -d ./...' sh 'go env' sh 'make test' } -- 2.45.2 From 5839fd1caad5f4d9092904e7c920ce31c38019d3 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 17:37:35 -0400 Subject: [PATCH 25/70] turn off cgo --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index dfd936452..21d5e1929 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,7 +22,7 @@ pipeline { } environment { GO111MODULE = 'on' - CGO_ENABLED = 1 + CGO_ENABLED = 0 GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" -- 2.45.2 From 1c27d7df7c26c57193cd0e6cfac1ce76d0c70cb1 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Thu, 6 Oct 2022 17:55:08 -0400 Subject: [PATCH 26/70] turn on cgo and dev null GOMOD to match successful github runs --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 21d5e1929..2e67207f7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,11 +22,13 @@ pipeline { } environment { GO111MODULE = 'on' - CGO_ENABLED = 0 + CGO_ENABLED = 1 GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" + GOMOD="/dev/null" + } steps { echo 'Testing ...' -- 2.45.2 From 9448d128450021ba5954aab9306c8d97b8ead21a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 09:28:37 -0400 Subject: [PATCH 27/70] WORKSPACE as GOPATH --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2e67207f7..7ec2b9c73 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { environment { GO111MODULE = 'on' CGO_ENABLED = 1 - GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOPATH = "${WORKSPACE}" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" -- 2.45.2 From f7b0b336aee10364d6f338d2db1c490f8986ce4b Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 09:37:13 -0400 Subject: [PATCH 28/70] build job as GOPATH --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7ec2b9c73..d39c81752 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ pipeline { environment { GO111MODULE = 'on' CGO_ENABLED = 1 - GOPATH = "${WORKSPACE}" + GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" @@ -34,6 +34,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' + sh 'ls -tla' sh 'make test' } } -- 2.45.2 From 78debb7b9ed9a2892aa4fea9769aa68d2e08a48a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 10:36:56 -0400 Subject: [PATCH 29/70] explicit mod readonly and verbose test --- Jenkinsfile | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d39c81752..e1b363f6e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,6 +28,7 @@ pipeline { GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" GOMOD="/dev/null" + GOFLAGS="-mod=readonly" } steps { diff --git a/Makefile b/Makefile index 706477c42..c06fa26b2 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test + $(GORUN) build/ci.go test -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 525075a3f095567f491be02e629aecfa9ac1c4c1 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 10:48:07 -0400 Subject: [PATCH 30/70] explicit mod=mod mode for GOFLAGS --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1b363f6e..2382c9d6d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,12 +23,13 @@ pipeline { environment { GO111MODULE = 'on' CGO_ENABLED = 1 - GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOPATH = "/tmp/go" GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" GOMOD="/dev/null" - GOFLAGS="-mod=readonly" + GOFLAGS="-mod=mod" } steps { -- 2.45.2 From a70ece01ce0057001939eba012d961432ace5559 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 11:09:01 -0400 Subject: [PATCH 31/70] using tmp/go for cache and env --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2382c9d6d..e3f7bdf52 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,12 @@ pipeline { CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOPATH = "/tmp/go" - GOMODCACHE = "${WORKSPACE}/pkg/mod" - GOCACHE = "${WORKSPACE}/.cache/go-build" - GOENV = "${WORKSPACE}/.config/go/env" + //GOMODCACHE = "${WORKSPACE}/pkg/mod" + //GOCACHE = "${WORKSPACE}/.cache/go-build" + //GOENV = "${WORKSPACE}/.config/go/env" + GOMODCACHE = "/tmp/go/pkg/mod" + GOCACHE = "/tmp/go/.cache/go-build" + GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" GOFLAGS="-mod=mod" -- 2.45.2 From 962cbfd573f67a4508aa1ca6edaf4da3d378100e Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 16:01:28 -0400 Subject: [PATCH 32/70] restrict to testing go-ethereum --- Jenkinsfile | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e3f7bdf52..dc2aa4225 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'ls -tla' + sh 'whoami' sh 'make test' } } diff --git a/Makefile b/Makefile index c06fa26b2..1e86ea871 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v + $(GORUN) build/ci.go test -v github.com/ethereum/go-ethereum lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 4e865aa152ecf22f78616b2ec8d9bb25745dae4c Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 16:04:37 -0400 Subject: [PATCH 33/70] no whoami in containers --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index dc2aa4225..6d3c9b1ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,6 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'whoami' sh 'make test' } } -- 2.45.2 From 6a5abfa254e508aedc758fdcd8764bd196c63972 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 16:36:23 -0400 Subject: [PATCH 34/70] test geth in depth --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1e86ea871..c825fcfc5 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v github.com/ethereum/go-ethereum + $(GORUN) build/ci.go test -v github.com/ethereum/go-ethereum/... lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 91cf99386048fba21937f3af39fcde3cd25f1248 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 16:49:30 -0400 Subject: [PATCH 35/70] test geth in depth with ./... --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c825fcfc5..7d4a15d19 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v github.com/ethereum/go-ethereum/... + $(GORUN) build/ci.go test -v ./... lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 41798ed130c4054f9089ffef3a019a61afe2b3ae Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 17:07:40 -0400 Subject: [PATCH 36/70] retry matching go env vars to successful github run --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6d3c9b1ee..91d08b797 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,13 +26,13 @@ pipeline { //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOPATH = "/tmp/go" //GOMODCACHE = "${WORKSPACE}/pkg/mod" - //GOCACHE = "${WORKSPACE}/.cache/go-build" - //GOENV = "${WORKSPACE}/.config/go/env" + GOCACHE = "${WORKSPACE}/.cache/go-build" + GOENV = "${WORKSPACE}/.config/go/env" GOMODCACHE = "/tmp/go/pkg/mod" - GOCACHE = "/tmp/go/.cache/go-build" - GOENV = "/tmp/go/.config/go/env" + //GOCACHE = "/tmp/go/.cache/go-build" + //GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" - GOFLAGS="-mod=mod" + //GOFLAGS="-mod=mod" } steps { -- 2.45.2 From 56c77fcc8cc053689f5187f8083c33ad9df2e4b8 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 7 Oct 2022 17:17:22 -0400 Subject: [PATCH 37/70] remove ./... from go test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d4a15d19..c7826a2e5 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v ./... + $(GORUN) build/ci.go test -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 60cd4604a9a3397ede7b09d4a0aa07d000f98370 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 10:39:58 -0400 Subject: [PATCH 38/70] disable environmental GO111MODULE --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 91d08b797..860c74bc9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,6 @@ pipeline { } } environment { - GO111MODULE = 'on' CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOPATH = "/tmp/go" -- 2.45.2 From ab8ce97fc60e40ec96300eaf524cc03b9284fe2f Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 10:57:17 -0400 Subject: [PATCH 39/70] explicit set of mod=readonly GOFLAG --- Jenkinsfile | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 860c74bc9..a93a6b5a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,6 +21,7 @@ pipeline { } } environment { + GO111MODULE = 'on' CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOPATH = "/tmp/go" @@ -31,7 +32,7 @@ pipeline { //GOCACHE = "/tmp/go/.cache/go-build" //GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" - //GOFLAGS="-mod=mod" + GOFLAGS="-mod=readonly" } steps { diff --git a/Makefile b/Makefile index c7826a2e5..c06fa26b2 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v + $(GORUN) build/ci.go test -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 7c0b7aa8d655b91165345abb4213f40c12541b27 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 11:30:09 -0400 Subject: [PATCH 40/70] explicit go get of test dependencies --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index a93a6b5a7..bda85a898 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' + sh 'go get -t ./...' sh 'make test' } } -- 2.45.2 From 1fc071b0e318dc22eb18bff7d2dce716cf43e669 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 11:42:54 -0400 Subject: [PATCH 41/70] bypass Makefile and run go test command explicitly --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bda85a898..720782d02 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,8 +39,8 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'go get -t ./...' - sh 'make test' + sh '/usr/local/go/bin/go test -p 1 -v ./...' + //sh 'make test' } } stage('Packaging') { -- 2.45.2 From cf01cbf79686ea84263f7deb297e5478f4bb056b Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 11:46:59 -0400 Subject: [PATCH 42/70] bypass Makefile and run go test command modified --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 720782d02..151d81bd0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh '/usr/local/go/bin/go test -p 1 -v ./...' + sh '/usr/local/go/bin/go test -p 1 -v ' //sh 'make test' } } -- 2.45.2 From 556f89f2828fbf919f61c30fe6b70c81fe26b663 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 12:34:19 -0400 Subject: [PATCH 43/70] bypass Makefile and run go test command modified with mod=mod --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 151d81bd0..d00d774d0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,14 +32,14 @@ pipeline { //GOCACHE = "/tmp/go/.cache/go-build" //GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" - GOFLAGS="-mod=readonly" + GOFLAGS="-mod=mod" } steps { echo 'Testing ...' sh 'env' sh 'go env' - sh '/usr/local/go/bin/go test -p 1 -v ' + sh '/usr/local/go/bin/go test -p 1 -v ./...' //sh 'make test' } } -- 2.45.2 From ceddceb1757a1166c1db9ab9c80a59c51794e8c2 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 12:41:03 -0400 Subject: [PATCH 44/70] try mod=vendor --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d00d774d0..2472621bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,7 @@ pipeline { //GOCACHE = "/tmp/go/.cache/go-build" //GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" - GOFLAGS="-mod=mod" + GOFLAGS="-mod=vendor" } steps { -- 2.45.2 From 3f92a10d7bac79f4f9ae29c92ac417ae04c69145 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 12:47:33 -0400 Subject: [PATCH 45/70] try GOMOD dev null --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2472621bc..3656f9b7a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,14 +32,14 @@ pipeline { //GOCACHE = "/tmp/go/.cache/go-build" //GOENV = "/tmp/go/.config/go/env" GOMOD="/dev/null" - GOFLAGS="-mod=vendor" + GOFLAGS="" } steps { echo 'Testing ...' sh 'env' sh 'go env' - sh '/usr/local/go/bin/go test -p 1 -v ./...' + sh 'env GOMOD=/dev/null /usr/local/go/bin/go test -p 1 -v ./...' //sh 'make test' } } -- 2.45.2 From 5be46ab8153fa0ee8881c03049cdfe04d4bf3508 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 12:59:56 -0400 Subject: [PATCH 46/70] disable build while iterating and try explicit test path --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3656f9b7a..8530fb2b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ pipeline { script{ docker.withRegistry('https://git.vdb.to'){ echo 'Building geth image...' - def geth_image = docker.build("cerc-io/go-ethereum:jenkinscicd") + //def geth_image = docker.build("cerc-io/go-ethereum:jenkinscicd") echo 'built geth image' } } @@ -39,7 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'env GOMOD=/dev/null /usr/local/go/bin/go test -p 1 -v ./...' + sh '/usr/local/go/bin/go test -p 1 -v github.com/go-ethereum/go-ethereum/...' //sh 'make test' } } -- 2.45.2 From cb8b1a9b715365a668d64250d7c13f5dd8f7ed14 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 13:09:44 -0400 Subject: [PATCH 47/70] trying suggested go work use . --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8530fb2b4..f0c044c7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,8 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh '/usr/local/go/bin/go test -p 1 -v github.com/go-ethereum/go-ethereum/...' + sh 'go work use .' //https://github.com/golangci/golangci-lint/issues/2654 + sh '/usr/local/go/bin/go test -p 1 -v ./...' //sh 'make test' } } -- 2.45.2 From 3c5ee7eb6e414420156ee64643eb55ca309d8e7a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 10 Oct 2022 13:20:05 -0400 Subject: [PATCH 48/70] go work init --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f0c044c7b..2327639a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'go work use .' //https://github.com/golangci/golangci-lint/issues/2654 + sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 sh '/usr/local/go/bin/go test -p 1 -v ./...' //sh 'make test' } -- 2.45.2 From d4eb5b0b9fcbf28aaf34176d12d9f1939e7b2865 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 11:21:36 -0400 Subject: [PATCH 49/70] go back top make test --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2327639a1..894fab69b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,8 +39,8 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 - sh '/usr/local/go/bin/go test -p 1 -v ./...' + //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 + //sh '/usr/local/go/bin/go test -p 1 -v ./...' //sh 'make test' } } -- 2.45.2 From 419f68e1a8136bdd92d1973448439570b5b3205d Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 11:22:54 -0400 Subject: [PATCH 50/70] go back top make test actually --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 894fab69b..0a09edd5c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,7 +41,7 @@ pipeline { sh 'go env' //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 //sh '/usr/local/go/bin/go test -p 1 -v ./...' - //sh 'make test' + sh 'make test' } } stage('Packaging') { -- 2.45.2 From b25b9a39c1c416e03cfbba2241c5f4d0cbd70215 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 11:40:33 -0400 Subject: [PATCH 51/70] attempt to go get everything --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a09edd5c..881f1ccd3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,8 +31,8 @@ pipeline { GOMODCACHE = "/tmp/go/pkg/mod" //GOCACHE = "/tmp/go/.cache/go-build" //GOENV = "/tmp/go/.config/go/env" - GOMOD="/dev/null" - GOFLAGS="" + //GOMOD="/dev/null" + //GOFLAGS="" } steps { @@ -41,6 +41,7 @@ pipeline { sh 'go env' //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 //sh '/usr/local/go/bin/go test -p 1 -v ./...' + sh 'go get -d ./...' sh 'make test' } } -- 2.45.2 From 1274f883a644cb6757a3e05635dc2729d633a66a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 11:44:50 -0400 Subject: [PATCH 52/70] everything in workspace --- Jenkinsfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 881f1ccd3..26f67a69a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,13 +24,12 @@ pipeline { GO111MODULE = 'on' CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" - GOPATH = "/tmp/go" - //GOMODCACHE = "${WORKSPACE}/pkg/mod" + //GOPATH = "/tmp/go" + GOPATH = "${WORKSPACE}" + GOMODCACHE = "${WORKSPACE}/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" - GOMODCACHE = "/tmp/go/pkg/mod" - //GOCACHE = "/tmp/go/.cache/go-build" - //GOENV = "/tmp/go/.config/go/env" + //GOMODCACHE = "/tmp/go/pkg/mod" //GOMOD="/dev/null" //GOFLAGS="" -- 2.45.2 From 89cce6ea415e13047a237216fea62a3abdca63f3 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 11:59:05 -0400 Subject: [PATCH 53/70] try default tooling on ubuntu latest --- Jenkinsfile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 26f67a69a..d4d79c569 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,19 +16,22 @@ pipeline { stage('Test') { agent { docker { - image 'cerc-io/foundation:jenkinscicd' - //image 'cerc-io/go-ethereum:jenkinscicd' + //image 'cerc-io/foundation:jenkinscicd' + image 'ubuntu:latest' } } + tools { + go 'go-1.18.6' + } environment { GO111MODULE = 'on' CGO_ENABLED = 1 - //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" //GOPATH = "/tmp/go" - GOPATH = "${WORKSPACE}" - GOMODCACHE = "${WORKSPACE}/pkg/mod" - GOCACHE = "${WORKSPACE}/.cache/go-build" - GOENV = "${WORKSPACE}/.config/go/env" + //GOPATH = "${WORKSPACE}" + //GOMODCACHE = "${WORKSPACE}/pkg/mod" + //GOCACHE = "${WORKSPACE}/.cache/go-build" + //GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" //GOMOD="/dev/null" //GOFLAGS="" -- 2.45.2 From e62dc8ad37f7f340d02c83aeb8d73866aaa51c70 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 12:04:26 -0400 Subject: [PATCH 54/70] try default tooling diff level of pipeline on ubuntu latest --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d4d79c569..179785c07 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,8 @@ pipeline { agent any - + tools { + go 'go-1.18.6' + } stages { stage('Build') { steps { @@ -20,9 +22,7 @@ pipeline { image 'ubuntu:latest' } } - tools { - go 'go-1.18.6' - } + environment { GO111MODULE = 'on' CGO_ENABLED = 1 -- 2.45.2 From b93f9f9cc30b52ad260fa8582e94cfc71ec4aaa4 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 12:22:14 -0400 Subject: [PATCH 55/70] test on alpine based image --- Jenkinsfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 179785c07..82b2cfcaa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,6 @@ pipeline { agent any - tools { - go 'go-1.18.6' - } + stages { stage('Build') { steps { @@ -19,17 +17,17 @@ pipeline { agent { docker { //image 'cerc-io/foundation:jenkinscicd' - image 'ubuntu:latest' + image 'cerc-io/foundation_alpine:jenkinscicd' } } environment { GO111MODULE = 'on' CGO_ENABLED = 1 - GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" - //GOPATH = "/tmp/go" + //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOPATH = "/go" //GOPATH = "${WORKSPACE}" - //GOMODCACHE = "${WORKSPACE}/pkg/mod" + GOMODCACHE = "/go/pkg/mod" //GOCACHE = "${WORKSPACE}/.cache/go-build" //GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" -- 2.45.2 From 0ba6fcb54ac387197d5db0672af5eb5920523ed1 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 13:39:36 -0400 Subject: [PATCH 56/70] no go get --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 82b2cfcaa..d2697532d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,10 +26,9 @@ pipeline { CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" GOPATH = "/go" - //GOPATH = "${WORKSPACE}" GOMODCACHE = "/go/pkg/mod" - //GOCACHE = "${WORKSPACE}/.cache/go-build" - //GOENV = "${WORKSPACE}/.config/go/env" + GOCACHE = "${WORKSPACE}/.cache/go-build" + GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" //GOMOD="/dev/null" //GOFLAGS="" @@ -41,7 +40,6 @@ pipeline { sh 'go env' //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 //sh '/usr/local/go/bin/go test -p 1 -v ./...' - sh 'go get -d ./...' sh 'make test' } } -- 2.45.2 From 6aa6a5adb099b1a4f6f3d78f7a1a23ae25c96015 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Fri, 14 Oct 2022 13:49:53 -0400 Subject: [PATCH 57/70] no make, try direct go test for now --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2697532d..a179eb3b0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,8 +39,8 @@ pipeline { sh 'env' sh 'go env' //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 - //sh '/usr/local/go/bin/go test -p 1 -v ./...' - sh 'make test' + sh '/usr/local/go/bin/go test -p 1 -v ./...' + //sh 'make test' } } stage('Packaging') { -- 2.45.2 From 32f82708c7eb91a8edd92d7ec78905c2e230b864 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 12:09:21 -0400 Subject: [PATCH 58/70] make test now --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a179eb3b0..d2697532d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,8 +39,8 @@ pipeline { sh 'env' sh 'go env' //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 - sh '/usr/local/go/bin/go test -p 1 -v ./...' - //sh 'make test' + //sh '/usr/local/go/bin/go test -p 1 -v ./...' + sh 'make test' } } stage('Packaging') { -- 2.45.2 From dc8cbb4ac0d769a4c520c5975df02b5763a7afff Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 13:26:12 -0400 Subject: [PATCH 59/70] GOMODCACHE removed --- Jenkinsfile | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2697532d..4e18d9777 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,17 +16,18 @@ pipeline { stage('Test') { agent { docker { - //image 'cerc-io/foundation:jenkinscicd' - image 'cerc-io/foundation_alpine:jenkinscicd' + image 'cerc-io/foundation:jenkinscicd' + //image 'cerc-io/foundation_alpine:jenkinscicd' } } environment { - GO111MODULE = 'on' + GO111MODULE = "on" CGO_ENABLED = 1 //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" - GOPATH = "/go" - GOMODCACHE = "/go/pkg/mod" + //GOPATH = "/go" + GOPATH = "/tmp/go" + //GOMODCACHE = "/go/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" @@ -38,8 +39,10 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - //sh 'go work init . ;go work use .' //https://github.com/golangci/golangci-lint/issues/2654 + //sh '/usr/local/go/bin/go test -p 1 -v ./...' + sh 'cwd' + sh 'which go' sh 'make test' } } -- 2.45.2 From 14e7f9ea45186aabe8d65bab540c80e8160b1079 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 13:29:10 -0400 Subject: [PATCH 60/70] GOPATH only env var --- Jenkinsfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4e18d9777..f54dca5e3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,8 +28,8 @@ pipeline { //GOPATH = "/go" GOPATH = "/tmp/go" //GOMODCACHE = "/go/pkg/mod" - GOCACHE = "${WORKSPACE}/.cache/go-build" - GOENV = "${WORKSPACE}/.config/go/env" + //GOCACHE = "${WORKSPACE}/.cache/go-build" + //GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" //GOMOD="/dev/null" //GOFLAGS="" @@ -39,10 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - //sh '/usr/local/go/bin/go test -p 1 -v ./...' - sh 'cwd' - sh 'which go' sh 'make test' } } -- 2.45.2 From 26ecd87c4369e8a0f43003dadba4d247848ce911 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 13:34:13 -0400 Subject: [PATCH 61/70] GOCACHE GOENV and GOPATH to build --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f54dca5e3..99da620d9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,12 +24,12 @@ pipeline { environment { GO111MODULE = "on" CGO_ENABLED = 1 - //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" //GOPATH = "/go" - GOPATH = "/tmp/go" + //GOPATH = "/tmp/go" //GOMODCACHE = "/go/pkg/mod" - //GOCACHE = "${WORKSPACE}/.cache/go-build" - //GOENV = "${WORKSPACE}/.config/go/env" + GOCACHE = "${WORKSPACE}/.cache/go-build" + GOENV = "${WORKSPACE}/.config/go/env" //GOMODCACHE = "/tmp/go/pkg/mod" //GOMOD="/dev/null" //GOFLAGS="" -- 2.45.2 From 83237dbb6f7abee593ef9dc7b4bb64e2124372c2 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 13:53:26 -0400 Subject: [PATCH 62/70] GOMODCACHE GOMOD GOWORK --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 99da620d9..2ab763ef1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,14 +24,15 @@ pipeline { environment { GO111MODULE = "on" CGO_ENABLED = 1 - GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" + //GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}" //GOPATH = "/go" - //GOPATH = "/tmp/go" + GOPATH = "/tmp/go" //GOMODCACHE = "/go/pkg/mod" GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" - //GOMODCACHE = "/tmp/go/pkg/mod" - //GOMOD="/dev/null" + GOMODCACHE = "/tmp/go/pkg/mod" + GOMOD="/dev/null" + GOWORK="" //GOFLAGS="" } -- 2.45.2 From 4899b4b349f164049323fa306728f402d959f808 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 14:02:06 -0400 Subject: [PATCH 63/70] try with specific path instead of ./... --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c06fa26b2..f3756ee93 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,8 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - $(GORUN) build/ci.go test -v + #$(GORUN) build/ci.go test -v + GO111MODULE=on go test -p 1 github.com/ethereum/go-ethereum/... -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 7be35ea5807a499d97353678aa4061da7358f1ce Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 14:28:14 -0400 Subject: [PATCH 64/70] go test with explicit GOMOD GOWORK and ./... --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f3756ee93..b87f6df84 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ ios: test: all #$(GORUN) build/ci.go test -v - GO111MODULE=on go test -p 1 github.com/ethereum/go-ethereum/... -v + GO111MODULE=on GOMOD="/dev/null" GOWORK="" go test -p 1 ./... -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From 1214c3472bbaa17717ba21c02204d0d49529866e Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 14:32:42 -0400 Subject: [PATCH 65/70] go work use . --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b87f6df84..1cc377b62 100644 --- a/Makefile +++ b/Makefile @@ -50,8 +50,9 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - #$(GORUN) build/ci.go test -v - GO111MODULE=on GOMOD="/dev/null" GOWORK="" go test -p 1 ./... -v + go work use . + $(GORUN) build/ci.go test -v + #GO111MODULE=on GOMOD="/dev/null" GOWORK="" go test -p 1 ./... -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2 From c24d09fe8bab3cc158237f6898a93a35205e3e58 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 15:55:46 -0400 Subject: [PATCH 66/70] debugging for context in github action --- .github/workflows/tests.yml | 2 ++ Makefile | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 94a9b02b8..e99148e18 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,6 +36,8 @@ jobs: - name: Run unit tests run: | + go env + ls -tlh make test statediff-unit-test: diff --git a/Makefile b/Makefile index 1cc377b62..583f56715 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,6 @@ ios: @echo "Import \"$(GOBIN)/Geth.framework\" to use the library." test: all - go work use . $(GORUN) build/ci.go test -v #GO111MODULE=on GOMOD="/dev/null" GOWORK="" go test -p 1 ./... -v -- 2.45.2 From 5354bd32056c8fa372e56d3bad70be38bb7bed6a Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 16:32:13 -0400 Subject: [PATCH 67/70] debugging for context in jenkins --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ab763ef1..22cd08750 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,6 @@ pipeline { GOCACHE = "${WORKSPACE}/.cache/go-build" GOENV = "${WORKSPACE}/.config/go/env" GOMODCACHE = "/tmp/go/pkg/mod" - GOMOD="/dev/null" GOWORK="" //GOFLAGS="" @@ -40,6 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' + sh 'ls -tlh' //sh '/usr/local/go/bin/go test -p 1 -v ./...' sh 'make test' } -- 2.45.2 From cc6eb9033766cf7dd2f8c04a085bba6f453dc1ef Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 16:39:34 -0400 Subject: [PATCH 68/70] clean workspace --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 22cd08750..c877752e8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,8 @@ pipeline { agent any - + options { + skipDefaultCheckout(true) + } stages { stage('Build') { steps { @@ -36,6 +38,8 @@ pipeline { } steps { + cleanWs() + checkout scm echo 'Testing ...' sh 'env' sh 'go env' -- 2.45.2 From c33ca482216cac6e02b011acc396b990281b80a0 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 16:44:58 -0400 Subject: [PATCH 69/70] cleaning caused errors --- Jenkinsfile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c877752e8..fa1605be2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,8 +1,6 @@ pipeline { agent any - options { - skipDefaultCheckout(true) - } + stages { stage('Build') { steps { @@ -38,8 +36,6 @@ pipeline { } steps { - cleanWs() - checkout scm echo 'Testing ...' sh 'env' sh 'go env' -- 2.45.2 From dd0be59e25d57582904a92426a4881a105138829 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Mon, 17 Oct 2022 17:33:22 -0400 Subject: [PATCH 70/70] clean up for working (but failing) unit test geth with ubuntu foundation image --- .github/workflows/tests.yml | 2 -- Jenkinsfile | 5 +---- Makefile | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e99148e18..94a9b02b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,8 +36,6 @@ jobs: - name: Run unit tests run: | - go env - ls -tlh make test statediff-unit-test: diff --git a/Jenkinsfile b/Jenkinsfile index fa1605be2..98b02490a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ pipeline { agent any - + stages { stage('Build') { steps { @@ -37,9 +37,6 @@ pipeline { } steps { echo 'Testing ...' - sh 'env' - sh 'go env' - sh 'ls -tlh' //sh '/usr/local/go/bin/go test -p 1 -v ./...' sh 'make test' } diff --git a/Makefile b/Makefile index 583f56715..c06fa26b2 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,6 @@ ios: test: all $(GORUN) build/ci.go test -v - #GO111MODULE=on GOMOD="/dev/null" GOWORK="" go test -p 1 ./... -v lint: ## Run linters. $(GORUN) build/ci.go lint -- 2.45.2