fix: postgres jenkensfile

This commit is contained in:
harsh-98 2023-10-05 07:05:48 +07:00 committed by harsh jain
parent 5d0692b339
commit d96e1aedde
1 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ pipeline {
environment {
TARGET = 'tests'
DB_CONT = "status-go-test-db-${env.EXECUTOR_NUMBER.toInteger() + 1}"
DB_CONT = "go-waku-test-db-${env.EXECUTOR_NUMBER.toInteger() + 1}"
DB_PORT = "${5432 + env.EXECUTOR_NUMBER.toInteger()}"
REPO = "${env.WORKSPACE}/src/github.com/waku-org/go-waku"
GOCACHE = "${env.WORKSPACE_TMP}/go-build"
@ -60,11 +60,11 @@ pipeline {
} } }
}
stage('postgres tests') {
stage('PostgresSQL') {
environment {
TEST_DB_PORT = "${env.DB_PORT}"
}
steps { script {
steps { script { dir(env.REPO) {
db = docker.image('postgres:9.6-alpine').withRun([
"--name=${DB_CONT}",
"--env=POSTGRES_HOST_AUTH_METHOD=trust",
@ -76,7 +76,7 @@ pipeline {
nix.develop('make test-postgres', pure: false)
}
}
} }
} } }
post { cleanup { /* Leftover DB containers. */
sh "docker rm ${DB_CONT} || true"
} }