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 000000000000..8a4d790d1401 --- /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 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 8a4d790d1401..638e84d3783b 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 . 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 638e84d3783b..11ded8d0c0bf 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') { 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 11ded8d0c0bf..5b3b66c172b1 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' + } } } } 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 5b3b66c172b1..5d2b042dc210 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'){ 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 5d2b042dc210..172df8475013 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') { 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 172df8475013..7764916395d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { } } tools { - go 'go-1.18' + go 'go-1.18.5' } environment { GO111MODULE = 'on' 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 7764916395d7..ff6381a31077 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { stage('Test') { agent { docker { - image 'golang:1.18-alpine' + image 'ubuntu:latest' } } tools { 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 ff6381a31077..e3d8f8165a56 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,7 @@ pipeline { } steps { echo 'Testing ...' + sh 'apt-get install make' sh 'make test' } } 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 e3d8f8165a56..5ae64d319ff4 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' } } 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 5ae64d319ff4..2d076204eb3a 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' } } 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 2d076204eb3a..6c5c1712706c 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' } } 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 6c5c1712706c..7cbb98acb880 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' } } 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 7cbb98acb880..1594da6e049d 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' } } 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 1594da6e049d..710e5bfc1bec 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' } } 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 710e5bfc1bec..db1be441a66e 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 ...' 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 db1be441a66e..d4d63e402c66 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' } } 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 d4d63e402c66..53d90a906772 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 ...' 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 53d90a906772..698c0df1db0a 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" 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 698c0df1db0a..c309ba7ffdb3 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' } 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 c309ba7ffdb3..e489abe2bdf0 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' 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 5a3ecbb26259..5772c6e847cb 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 e489abe2bdf0..0874e207e777 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' } 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 0874e207e777..e4cd309ca992 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' } 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 e4cd309ca992..dfd936452dcc 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' } 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 dfd936452dcc..21d5e1929ea0 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" 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 21d5e1929ea0..2e67207f733d 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 ...' 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 2e67207f733d..7ec2b9c73e55 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" 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 7ec2b9c73e55..d39c81752aa0 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' } } 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 d39c81752aa0..e1b363f6ee8e 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 706477c4257c..c06fa26b2453 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 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 e1b363f6ee8e..2382c9d6d963 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 { 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 2382c9d6d963..e3f7bdf52b22 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" 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 e3f7bdf52b22..dc2aa4225372 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 c06fa26b2453..1e86ea871129 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 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 dc2aa4225372..6d3c9b1ee961 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,7 +39,6 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' - sh 'whoami' sh 'make test' } } 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 1e86ea871129..c825fcfc502d 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 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 c825fcfc502d..7d4a15d1947a 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 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 6d3c9b1ee961..91d08b79785c 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 { 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 7d4a15d1947a..c7826a2e5573 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 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 91d08b79785c..860c74bc9aa6 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" 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 860c74bc9aa6..a93a6b5a7ad4 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 c7826a2e5573..c06fa26b2453 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 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 a93a6b5a7ad4..bda85a898c22 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,7 @@ pipeline { echo 'Testing ...' sh 'env' sh 'go env' + sh 'go get -t ./...' sh 'make test' } } 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 bda85a898c22..720782d02d95 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') { 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 720782d02d95..151d81bd09f2 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' } } 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 151d81bd09f2..d00d774d0e8d 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' } } 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 d00d774d0e8d..2472621bc812 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 { 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 2472621bc812..3656f9b7ae99 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' } } 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 3656f9b7ae99..8530fb2b4735 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' } } 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 8530fb2b4735..f0c044c7be06 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' } } 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 f0c044c7be06..2327639a198e 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' } 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 2327639a198e..894fab69b96b 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' } } 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 894fab69b96b..0a09edd5c441 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') { 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 0a09edd5c441..881f1ccd3305 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' } } 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 881f1ccd3305..26f67a69ae95 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="" 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 26f67a69ae95..d4d79c56901d 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="" 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 d4d79c56901d..179785c07d6c 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 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 179785c07d6c..82b2cfcaa97a 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" 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 82b2cfcaa97a..d2697532dd54 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' } } 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 d2697532dd54..a179eb3b0fba 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') { 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 a179eb3b0fba..d2697532dd54 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') { 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 d2697532dd54..4e18d9777b9d 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' } } 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 4e18d9777b9d..f54dca5e37f0 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' } } 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 f54dca5e37f0..99da620d9d36 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="" 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 99da620d9d36..2ab763ef1cc0 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="" } 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 c06fa26b2453..f3756ee93589 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 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 f3756ee93589..b87f6df84533 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 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 b87f6df84533..1cc377b62ed0 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 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 94a9b02b89f9..e99148e181e6 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 1cc377b62ed0..583f56715810 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 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 2ab763ef1cc0..22cd08750f2c 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' } 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 22cd08750f2c..c877752e8405 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' 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 c877752e8405..fa1605be2d97 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' 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 e99148e181e6..94a9b02b89f9 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 fa1605be2d97..98b02490aba4 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 583f56715810..c06fa26b2453 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