2019-04-22 14:45:53 +01:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2019-12-16 15:25:12 +00:00
|
|
|
docker {
|
2019-06-19 20:56:52 +01:00
|
|
|
label 'main'
|
2021-08-15 22:38:40 +01:00
|
|
|
image 'storjlabs/ci:latest'
|
|
|
|
alwaysPull true
|
2020-01-08 20:09:34 +00:00
|
|
|
args '-u root:root --cap-add SYS_PTRACE -v "/tmp/gomod":/go/pkg/mod -v "/tmp/npm":/npm --tmpfs "/tmp:exec,mode=777"'
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
2019-05-02 16:48:04 +01:00
|
|
|
options {
|
2021-09-27 19:29:17 +01:00
|
|
|
timeout(time: 40, unit: 'MINUTES')
|
2021-09-23 11:48:20 +01:00
|
|
|
skipDefaultCheckout(true)
|
2019-05-02 16:48:04 +01:00
|
|
|
}
|
2019-09-05 14:32:46 +01:00
|
|
|
environment {
|
2020-01-08 20:09:34 +00:00
|
|
|
NPM_CONFIG_CACHE = '/npm/cache'
|
2020-11-11 11:57:45 +00:00
|
|
|
GOTRACEBACK = 'all'
|
2020-11-13 14:52:34 +00:00
|
|
|
COCKROACH_MEMPROF_INTERVAL=0
|
2019-09-05 14:32:46 +01:00
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
stages {
|
2021-06-09 12:50:57 +01:00
|
|
|
stage('Checkout') {
|
2019-04-22 14:45:53 +01:00
|
|
|
steps {
|
2021-09-27 17:36:04 +01:00
|
|
|
// Delete any content left over from a previous run.
|
|
|
|
sh "chmod -R 777 ."
|
|
|
|
// Bash requires extglob option to support !(.git) syntax,
|
|
|
|
// and we don't want to delete .git to have faster clones.
|
2021-09-29 11:41:50 +01:00
|
|
|
sh 'bash -O extglob -c "rm -rf !(.git)"'
|
2021-09-27 17:36:04 +01:00
|
|
|
|
2019-04-22 14:45:53 +01:00
|
|
|
checkout scm
|
2021-09-23 10:08:38 +01:00
|
|
|
|
2019-06-27 17:09:37 +01:00
|
|
|
sh 'mkdir -p .build'
|
2021-09-23 10:08:38 +01:00
|
|
|
|
2021-08-31 13:13:45 +01:00
|
|
|
// make a backup of the mod file, because sometimes they get modified by tools
|
|
|
|
// this allows to lint the unmodified files
|
2019-04-24 16:33:01 +01:00
|
|
|
sh 'cp go.mod .build/go.mod.orig'
|
2021-08-30 21:42:59 +01:00
|
|
|
sh 'cp testsuite/go.mod .build/testsuite.go.mod.orig'
|
|
|
|
|
2019-04-24 16:33:01 +01:00
|
|
|
// download dependencies
|
2019-04-22 14:45:53 +01:00
|
|
|
sh 'go mod download'
|
2021-08-30 21:42:59 +01:00
|
|
|
sh 'cd testsuite && go mod download'
|
2021-08-12 15:44:35 +01:00
|
|
|
|
2021-09-23 10:08:38 +01:00
|
|
|
// pre-check that we cannot do at a later stage reliably
|
|
|
|
sh 'check-large-files'
|
|
|
|
|
2021-08-12 15:44:35 +01:00
|
|
|
// add a stub go.mod file to node projects to prevent go build ./... from scanning them
|
|
|
|
sh 'mkdir -p web/satellite/node_modules web/storagenode/node_modules web/multinode/node_modules'
|
|
|
|
sh 'touch web/satellite/node_modules/go.mod web/storagenode/node_modules/go.mod web/multinode/node_modules/go.mod'
|
2021-06-09 12:50:57 +01:00
|
|
|
}
|
|
|
|
}
|
2022-03-23 13:29:47 +00:00
|
|
|
stage('Build Web') {
|
|
|
|
// The build code depends on the following assets being loaded.
|
|
|
|
parallel {
|
|
|
|
stage('web/satellite') {
|
|
|
|
steps {
|
|
|
|
dir('web/satellite') {
|
|
|
|
sh 'npm ci --prefer-offline --no-audit'
|
|
|
|
sh './scripts/build-wasm.sh'
|
|
|
|
sh 'npm run build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('web/storagenode') {
|
|
|
|
steps {
|
|
|
|
dir('web/storagenode') {
|
|
|
|
sh 'npm ci --prefer-offline --no-audit'
|
|
|
|
sh 'npm run build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('web/multinode') {
|
|
|
|
steps {
|
|
|
|
dir('web/multinode') {
|
|
|
|
sh 'npm ci --prefer-offline --no-audit'
|
|
|
|
sh 'npm run build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('satellite/admin/ui') {
|
|
|
|
steps {
|
|
|
|
dir('satellite/admin/ui') {
|
|
|
|
sh 'npm ci --prefer-offline --no-audit'
|
|
|
|
sh 'npm run build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-09 12:50:57 +01:00
|
|
|
stage('Build') {
|
|
|
|
parallel {
|
|
|
|
stage('go') {
|
|
|
|
steps {
|
2022-03-07 20:59:15 +00:00
|
|
|
// use go test to build all the packages, including tests
|
2022-03-29 10:42:53 +01:00
|
|
|
sh 'go test -v -p 16 -tags noembed -bench XYZXYZXYZXYZ -run XYZXYZXYZXYZ ./...'
|
2021-06-09 12:50:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('go -race') {
|
|
|
|
steps {
|
2022-03-07 20:59:15 +00:00
|
|
|
// use go test to build all the packages, including tests
|
2022-03-29 10:42:53 +01:00
|
|
|
sh 'go test -v -p 16 -tags noembed -bench XYZXYZXYZXYZ -run XYZXYZXYZXYZ -race ./...'
|
2021-06-09 12:50:57 +01:00
|
|
|
|
|
|
|
// install storj-sim
|
|
|
|
sh 'go install -race -v storj.io/storj/cmd/satellite '+
|
|
|
|
'storj.io/storj/cmd/storagenode ' +
|
|
|
|
'storj.io/storj/cmd/storj-sim ' +
|
|
|
|
'storj.io/storj/cmd/versioncontrol ' +
|
|
|
|
'storj.io/storj/cmd/uplink ' +
|
|
|
|
'storj.io/storj/cmd/identity ' +
|
|
|
|
'storj.io/storj/cmd/certificates ' +
|
|
|
|
'storj.io/storj/cmd/multinode'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('go -race gateway') {
|
|
|
|
steps {
|
|
|
|
// install gateway for storj-sim
|
2021-11-01 10:20:53 +00:00
|
|
|
sh 'go install -race -v storj.io/gateway@latest'
|
2021-06-09 12:50:57 +01:00
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
|
2021-06-09 12:50:57 +01:00
|
|
|
stage('db') {
|
|
|
|
steps {
|
|
|
|
sh 'service postgresql start'
|
|
|
|
dir('.build') {
|
|
|
|
sh 'cockroach start-single-node --insecure --store=type=mem,size=2GiB --listen-addr=localhost:26256 --http-addr=localhost:8086 --cache 512MiB --max-sql-memory 512MiB --background'
|
|
|
|
sh 'cockroach start-single-node --insecure --store=type=mem,size=2GiB --listen-addr=localhost:26257 --http-addr=localhost:8087 --cache 512MiB --max-sql-memory 512MiB --background'
|
|
|
|
sh 'cockroach start-single-node --insecure --store=type=mem,size=2GiB --listen-addr=localhost:26258 --http-addr=localhost:8088 --cache 512MiB --max-sql-memory 512MiB --background'
|
|
|
|
sh 'cockroach start-single-node --insecure --store=type=mem,size=2GiB --listen-addr=localhost:26259 --http-addr=localhost:8089 --cache 512MiB --max-sql-memory 512MiB --background'
|
|
|
|
sh 'cockroach start-single-node --insecure --store=type=mem,size=2GiB --listen-addr=localhost:26260 --http-addr=localhost:8090 --cache 256MiB --max-sql-memory 256MiB --background'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Verification') {
|
|
|
|
parallel {
|
|
|
|
stage('Lint') {
|
|
|
|
steps {
|
satellite/repair: in dns redial, don't retry if CloseError
To save load on DNS servers, the repair code first tries to dial the
last known good ip and port for a node, and then falls back to a DNS
lookup only if we fail to connect to the last known good ip and port.
However, it looks like we are seeing errors during the client stream
Close() call (probably due to quic-go code), and those are classified
the same as errors encountered during Dial. The repairer code sees this
error, assumes that we failed to contact the node, and retries- but
since we did actually succeed in connecting the first time around, this
results in submitting the same order limit (with the same serial number)
to the storage node, which (rightfully) rejects it.
So together with change I055c186d5fd4e79560f67763175bc3130b9bc7d2 in
storj/uplink, this should avoid the double submission and avoid dinging
nodes' suspension scores unfairly.
See https://github.com/storj/storj/issues/4687.
Also, moving the testsuite directory check up above check-monkit in the
Jenkins Lint task, so that a non-tidy testsuite/go.mod can be recognized
and handled before everything breaks weirdly and seemingly randomly
later on.
Change-Id: Icb2b05aaff921d0af6aba10e450ac7e0a7bb2655
2022-03-30 22:19:00 +01:00
|
|
|
sh 'check-mod-tidy -mod .build/go.mod.orig'
|
|
|
|
dir("testsuite") {
|
|
|
|
sh 'check-mod-tidy -mod ../.build/testsuite.go.mod.orig'
|
|
|
|
}
|
2019-12-16 15:25:12 +00:00
|
|
|
sh 'check-copyright'
|
|
|
|
sh 'check-imports -race ./...'
|
|
|
|
sh 'check-peer-constraints -race'
|
|
|
|
sh 'check-atomic-align ./...'
|
2020-09-08 15:20:27 +01:00
|
|
|
sh 'check-monkit ./...'
|
2019-12-16 15:25:12 +00:00
|
|
|
sh 'check-errs ./...'
|
2019-11-14 08:31:30 +00:00
|
|
|
sh 'staticcheck ./...'
|
2019-12-16 15:25:12 +00:00
|
|
|
sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run'
|
2019-10-15 18:00:14 +01:00
|
|
|
sh 'make check-monitoring'
|
2021-01-20 18:57:47 +00:00
|
|
|
sh 'make test-wasm-size'
|
2021-03-29 12:45:27 +01:00
|
|
|
|
|
|
|
sh 'protolock status'
|
2019-04-22 14:45:53 +01:00
|
|
|
|
2021-08-30 21:42:59 +01:00
|
|
|
dir("testsuite") {
|
|
|
|
sh 'check-imports ./...'
|
|
|
|
sh 'check-atomic-align ./...'
|
|
|
|
sh 'check-monkit ./...'
|
|
|
|
sh 'check-errs ./...'
|
|
|
|
sh 'staticcheck ./...'
|
|
|
|
sh 'golangci-lint --config /go/ci/.golangci.yml -j=2 run'
|
|
|
|
}
|
2021-12-01 16:17:30 +00:00
|
|
|
|
|
|
|
dir("satellite/admin/ui") {
|
|
|
|
sh 'npm run check'
|
|
|
|
sh 'npm run lint'
|
|
|
|
}
|
2021-12-21 12:57:51 +00:00
|
|
|
|
|
|
|
sh './scripts/check-package-lock.sh'
|
2022-03-07 20:59:15 +00:00
|
|
|
}
|
2021-08-30 21:42:59 +01:00
|
|
|
}
|
2021-09-16 16:09:07 +01:00
|
|
|
stage('Cross Compile') {
|
|
|
|
steps {
|
|
|
|
// verify most of the commands, we cannot check everything since some of them
|
|
|
|
// have a C dependency and we don't have cross-compilation in storj/ci image
|
2022-01-06 19:55:46 +00:00
|
|
|
sh 'GOOS=linux GOARCH=386 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=linux GOARCH=amd64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=linux GOARCH=arm go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=linux GOARCH=arm64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=windows GOARCH=386 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=windows GOARCH=amd64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=windows GOARCH=arm64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=darwin GOARCH=amd64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
|
|
|
sh 'GOOS=darwin GOARCH=arm64 go vet ./cmd/uplink ./cmd/satellite ./cmd/storagenode-updater ./cmd/storj-sim'
|
2021-09-16 16:09:07 +01:00
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
stage('Tests') {
|
|
|
|
environment {
|
2022-03-28 19:05:53 +01:00
|
|
|
STORJ_TEST_HOST = '127.0.0.20;127.0.0.21;127.0.0.22;127.0.0.23;127.0.0.24;127.0.0.25'
|
2020-07-10 14:28:01 +01:00
|
|
|
STORJ_TEST_COCKROACH = 'cockroach://root@localhost:26256/testcockroach?sslmode=disable;' +
|
2020-04-27 20:34:42 +01:00
|
|
|
'cockroach://root@localhost:26257/testcockroach?sslmode=disable;' +
|
|
|
|
'cockroach://root@localhost:26258/testcockroach?sslmode=disable;' +
|
|
|
|
'cockroach://root@localhost:26259/testcockroach?sslmode=disable'
|
2020-09-28 08:33:00 +01:00
|
|
|
STORJ_TEST_COCKROACH_ALT = 'cockroach://root@localhost:26260/testcockroach?sslmode=disable'
|
2020-07-10 14:28:01 +01:00
|
|
|
STORJ_TEST_POSTGRES = 'postgres://postgres@localhost/teststorj?sslmode=disable'
|
2022-02-10 16:51:19 +00:00
|
|
|
STORJ_TEST_LOG_LEVEL = 'info'
|
2021-04-23 14:13:51 +01:00
|
|
|
COVERFLAGS = "${ env.BRANCH_NAME == 'main' ? '-coverprofile=.build/coverprofile -coverpkg=storj.io/storj/private/...,storj.io/storj/satellite/...,storj.io/storj/storage/...,storj.io/storj/storagenode/...,storj.io/storj/versioncontrol/...' : ''}"
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
steps {
|
2020-04-27 20:34:42 +01:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26256 -e \'create database testcockroach;\''
|
2019-12-10 16:32:54 +00:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26257 -e \'create database testcockroach;\''
|
2020-04-27 20:34:42 +01:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26258 -e \'create database testcockroach;\''
|
|
|
|
sh 'cockroach sql --insecure --host=localhost:26259 -e \'create database testcockroach;\''
|
2020-09-28 08:33:00 +01:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26260 -e \'create database testcockroach;\''
|
2020-04-27 20:34:42 +01:00
|
|
|
|
2020-10-28 15:28:06 +00:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26259 -e \'create database testmetabase;\''
|
|
|
|
|
2019-04-22 14:45:53 +01:00
|
|
|
sh 'psql -U postgres -c \'create database teststorj;\''
|
2020-10-28 15:28:06 +00:00
|
|
|
sh 'psql -U postgres -c \'create database testmetabase;\''
|
2019-12-16 15:25:12 +00:00
|
|
|
sh 'use-ports -from 1024 -to 10000 &'
|
2020-11-09 12:57:23 +00:00
|
|
|
|
2022-03-29 10:42:53 +01:00
|
|
|
sh 'go test -tags noembed -parallel 4 -p 6 -vet=off $COVERFLAGS -timeout 32m -json -race ./... 2>&1 | tee .build/tests.json | xunit -out .build/tests.xml'
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
2019-04-24 16:33:01 +01:00
|
|
|
archiveArtifacts artifacts: '.build/tests.json'
|
2021-11-12 11:02:55 +00:00
|
|
|
sh script: 'cat .build/tests.json | tparse -all -top -slow 100', returnStatus: true
|
2019-04-24 16:33:01 +01:00
|
|
|
junit '.build/tests.xml'
|
2019-04-26 14:39:11 +01:00
|
|
|
|
|
|
|
script {
|
|
|
|
if(fileExists(".build/coverprofile")){
|
2019-12-16 15:25:12 +00:00
|
|
|
sh script: 'filter-cover-profile < .build/coverprofile > .build/clean.coverprofile', returnStatus: true
|
2019-04-26 14:39:11 +01:00
|
|
|
sh script: 'gocov convert .build/clean.coverprofile > .build/cover.json', returnStatus: true
|
|
|
|
sh script: 'gocov-xml < .build/cover.json > .build/cobertura.xml', returnStatus: true
|
jenkins: Enable Cobertura failing for code coverage
Measure code coverage "by line" (Go actually measures by block, but whatever)
The '100, 0, 0' means anything above 100 auto-passes, anything below 0 auto-fails,
and anything below 0 is reported as unstable. autoupdateHealth, if I understand
correctly, will raise the functional auto-fail limit each time, so that a drop
in coverage will result in a failed test. Finally failUnhealty is the trigger
which actually causes the build to fail, rather than simply reporting an error.
I have tested these changes using replay, but I was unable to verify 100% that
they work as designed. The risks of having to revert this code seems less than
the cost of spending more time playing around with Jenkins locally..
Change-Id: Ica855b36aef7e1c3023fa80611229ca691017021
2020-05-13 15:39:18 +01:00
|
|
|
cobertura coberturaReportFile: '.build/cobertura.xml',
|
2021-02-22 11:53:21 +00:00
|
|
|
lineCoverageTargets: '70, 60, 50',
|
|
|
|
autoUpdateHealth: false,
|
|
|
|
autoUpdateStability: false,
|
jenkins: Enable Cobertura failing for code coverage
Measure code coverage "by line" (Go actually measures by block, but whatever)
The '100, 0, 0' means anything above 100 auto-passes, anything below 0 auto-fails,
and anything below 0 is reported as unstable. autoupdateHealth, if I understand
correctly, will raise the functional auto-fail limit each time, so that a drop
in coverage will result in a failed test. Finally failUnhealty is the trigger
which actually causes the build to fail, rather than simply reporting an error.
I have tested these changes using replay, but I was unable to verify 100% that
they work as designed. The risks of having to revert this code seems less than
the cost of spending more time playing around with Jenkins locally..
Change-Id: Ica855b36aef7e1c3023fa80611229ca691017021
2020-05-13 15:39:18 +01:00
|
|
|
failUnhealthy: true
|
2019-04-26 14:39:11 +01:00
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-10 07:10:01 +01:00
|
|
|
stage('Check Benchmark') {
|
|
|
|
environment {
|
2021-10-08 14:36:58 +01:00
|
|
|
STORJ_TEST_COCKROACH = 'omit'
|
2020-07-10 14:28:01 +01:00
|
|
|
STORJ_TEST_POSTGRES = 'postgres://postgres@localhost/benchstorj?sslmode=disable'
|
2020-07-10 07:10:01 +01:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'psql -U postgres -c \'create database benchstorj;\''
|
2022-03-29 10:42:53 +01:00
|
|
|
sh 'go test -tags noembed -parallel 1 -p 1 -vet=off -timeout 20m -short -run XYZXYZXYZXYZ -bench . -benchtime 1x ./...'
|
2020-07-10 07:10:01 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-22 14:45:53 +01:00
|
|
|
stage('Integration') {
|
|
|
|
environment {
|
|
|
|
// use different hostname to avoid port conflicts
|
|
|
|
STORJ_NETWORK_HOST4 = '127.0.0.2'
|
|
|
|
STORJ_NETWORK_HOST6 = '127.0.0.2'
|
2019-05-14 16:13:18 +01:00
|
|
|
|
|
|
|
STORJ_SIM_POSTGRES = 'postgres://postgres@localhost/teststorj2?sslmode=disable'
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
2019-05-14 16:13:18 +01:00
|
|
|
sh 'psql -U postgres -c \'create database teststorj2;\''
|
2019-04-22 14:45:53 +01:00
|
|
|
sh 'make test-sim'
|
2020-11-05 12:28:59 +00:00
|
|
|
|
2019-09-25 16:16:11 +01:00
|
|
|
// sh 'make test-certificates' // flaky
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
2019-08-14 16:34:12 +01:00
|
|
|
|
2019-12-10 19:18:02 +00:00
|
|
|
stage('Cockroach Integration') {
|
2019-08-14 16:34:12 +01:00
|
|
|
environment {
|
2019-12-10 19:18:02 +00:00
|
|
|
STORJ_NETWORK_HOST4 = '127.0.0.4'
|
|
|
|
STORJ_NETWORK_HOST6 = '127.0.0.4'
|
2019-08-18 15:51:33 +01:00
|
|
|
|
2019-12-10 19:18:02 +00:00
|
|
|
STORJ_SIM_POSTGRES = 'cockroach://root@localhost:26257/testcockroach4?sslmode=disable'
|
2019-08-14 16:34:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
2019-12-10 19:18:02 +00:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26257 -e \'create database testcockroach4;\''
|
|
|
|
sh 'make test-sim'
|
2020-04-27 20:34:42 +01:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26257 -e \'drop database testcockroach4;\''
|
2019-08-14 16:34:12 +01:00
|
|
|
}
|
|
|
|
}
|
2019-09-05 14:32:46 +01:00
|
|
|
|
2021-03-08 11:21:43 +00:00
|
|
|
stage('Integration Redis unavailability') {
|
|
|
|
environment {
|
|
|
|
// use different hostname to avoid port conflicts
|
|
|
|
STORJ_NETWORK_HOST4 = '127.0.0.6'
|
|
|
|
STORJ_NETWORK_HOST6 = '127.0.0.6'
|
|
|
|
STORJ_REDIS_PORT = '7379'
|
|
|
|
|
|
|
|
STORJ_SIM_POSTGRES = 'postgres://postgres@localhost/teststorj6?sslmode=disable'
|
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
sh 'psql -U postgres -c \'create database teststorj6;\''
|
|
|
|
sh 'make test-sim-redis-unavailability'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-10 19:18:02 +00:00
|
|
|
stage('Backwards Compatibility') {
|
2019-11-22 19:59:46 +00:00
|
|
|
environment {
|
2019-12-10 19:18:02 +00:00
|
|
|
STORJ_NETWORK_HOST4 = '127.0.0.3'
|
|
|
|
STORJ_NETWORK_HOST6 = '127.0.0.3'
|
|
|
|
|
|
|
|
STORJ_SIM_POSTGRES = 'postgres://postgres@localhost/teststorj3?sslmode=disable'
|
2021-01-07 15:03:16 +00:00
|
|
|
STORJ_MIGRATION_DB = 'postgres://postgres@localhost/teststorj3?sslmode=disable&options=--search_path=satellite/0/meta'
|
2019-11-22 19:59:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
2019-12-10 19:18:02 +00:00
|
|
|
sh 'psql -U postgres -c \'create database teststorj3;\''
|
|
|
|
sh 'make test-sim-backwards-compatible'
|
2019-11-22 19:59:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-21 15:42:49 +00:00
|
|
|
stage('Cockroach Backwards Compatibility') {
|
|
|
|
environment {
|
|
|
|
STORJ_NETWORK_HOST4 = '127.0.0.5'
|
|
|
|
STORJ_NETWORK_HOST6 = '127.0.0.5'
|
|
|
|
|
|
|
|
STORJ_SIM_POSTGRES = 'cockroach://root@localhost:26257/testcockroach5?sslmode=disable'
|
2021-01-07 15:03:16 +00:00
|
|
|
STORJ_MIGRATION_DB = 'postgres://root@localhost:26257/testcockroach5/satellite/0/meta?sslmode=disable'
|
2020-01-21 15:42:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
steps {
|
|
|
|
sh 'cockroach sql --insecure --host=localhost:26257 -e \'create database testcockroach5;\''
|
|
|
|
sh 'make test-sim-backwards-compatible'
|
2020-04-27 20:34:42 +01:00
|
|
|
sh 'cockroach sql --insecure --host=localhost:26257 -e \'drop database testcockroach5;\''
|
2020-01-21 15:42:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-08 19:26:37 +00:00
|
|
|
stage('wasm npm') {
|
|
|
|
steps {
|
|
|
|
dir(".build") {
|
|
|
|
sh 'cp -r ../satellite/console/wasm/tests/ .'
|
|
|
|
sh 'cd tests && cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .'
|
|
|
|
sh 'cd tests && npm install && npm run test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-09 12:50:57 +01:00
|
|
|
stage('web/satellite') {
|
|
|
|
steps {
|
|
|
|
dir("web/satellite") {
|
2021-08-05 12:07:45 +01:00
|
|
|
sh 'npm run lint-ci'
|
2021-06-09 12:50:57 +01:00
|
|
|
sh script: 'npm audit', returnStatus: true
|
|
|
|
sh 'npm run test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('web/storagenode') {
|
2020-02-03 14:40:07 +00:00
|
|
|
steps {
|
|
|
|
dir("web/storagenode") {
|
2021-08-05 12:46:48 +01:00
|
|
|
sh 'npm run lint-ci'
|
2020-02-10 20:32:13 +00:00
|
|
|
sh script: 'npm audit', returnStatus: true
|
2019-09-05 14:32:46 +01:00
|
|
|
sh 'npm run test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-05-21 12:46:44 +01:00
|
|
|
|
2021-06-09 12:50:57 +01:00
|
|
|
stage('web/multinode') {
|
2021-05-21 12:46:44 +01:00
|
|
|
steps {
|
|
|
|
dir("web/multinode") {
|
2021-08-04 11:26:43 +01:00
|
|
|
sh 'npm run lint-ci'
|
2021-05-21 12:46:44 +01:00
|
|
|
sh script: 'npm audit', returnStatus: true
|
|
|
|
sh 'npm run test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-10-05 17:33:21 +01:00
|
|
|
|
|
|
|
stage('satellite/admin/ui') {
|
|
|
|
steps {
|
|
|
|
dir("satellite/admin/ui") {
|
|
|
|
sh script: 'npm audit', returnStatus: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
|
|
|
}
|
2022-01-03 13:54:15 +00:00
|
|
|
/*
|
2021-09-22 10:20:03 +01:00
|
|
|
stage('UI') {
|
|
|
|
when {
|
|
|
|
anyOf {
|
|
|
|
branch 'main'
|
|
|
|
branch pattern: "release-.*", comparator: "REGEXP"
|
2021-11-10 16:56:51 +00:00
|
|
|
changeset "testsuite/ui/**"
|
2021-09-22 10:20:03 +01:00
|
|
|
changeset "web/**"
|
|
|
|
changeset "satellite/console/**"
|
|
|
|
changeset "storagenode/console/**"
|
|
|
|
changeset "multinode/console/**"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
environment {
|
|
|
|
STORJ_TEST_COCKROACH = 'omit'
|
|
|
|
STORJ_TEST_POSTGRES = 'postgres://postgres@localhost/testui?sslmode=disable'
|
|
|
|
STORJ_TEST_BROWSER = '/usr/bin/chromium'
|
|
|
|
STORJ_TEST_SATELLITE_WEB = "${pwd()}/web/satellite"
|
2021-10-14 12:27:03 +01:00
|
|
|
STORJ_TEST_EDGE_HOST = '127.0.0.10'
|
2021-09-22 10:20:03 +01:00
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'psql -U postgres -c \'create database testui;\''
|
|
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
2021-11-12 11:02:55 +00:00
|
|
|
sh 'cd testsuite && go test -parallel 1 -p 1 -short -vet=off -timeout 5m -json -race ./... 2>&1 | tee ../.build/ui-tests.json | xunit -out ../.build/ui-tests.xml'
|
2021-09-22 10:20:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts artifacts: '.build/ui-tests.json'
|
2021-11-12 11:02:55 +00:00
|
|
|
sh script: 'cat .build/ui-tests.json | tparse -all -top -slow 100', returnStatus: true
|
2021-09-22 10:20:03 +01:00
|
|
|
junit '.build/ui-tests.xml'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-03 13:54:15 +00:00
|
|
|
*/
|
2021-09-23 10:08:38 +01:00
|
|
|
stage('Post') {
|
|
|
|
parallel {
|
|
|
|
stage('Lint') {
|
|
|
|
steps {
|
|
|
|
sh 'check-clean-directory'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-04-22 14:45:53 +01:00
|
|
|
}
|
2019-05-09 06:40:00 +01:00
|
|
|
}
|