mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-23 05:18:12 -05:00
Cleanup CI file
This commit is contained in:
parent
b2592d9351
commit
ac8fa0d737
31
Jenkinsfile
vendored
31
Jenkinsfile
vendored
@ -77,28 +77,10 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
withCredentials([string(credentialsId: 'npm-sentry-dsn', variable: 'SENTRY_DSN')]) {
|
withCredentials([string(credentialsId: 'npm-sentry-dsn', variable: 'SENTRY_DSN')]) {
|
||||||
withCredentials([usernamePassword(credentialsId: 'oss-index-token', passwordVariable: 'NANCY_TOKEN', usernameVariable: 'NANCY_USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'oss-index-token', passwordVariable: 'NANCY_TOKEN', usernameVariable: 'NANCY_USER')]) {
|
||||||
script {
|
sh './scripts/ci/test-backend'
|
||||||
def shStatusCode = sh(label: 'test-backend', returnStatus: true, script: '''
|
|
||||||
set -e
|
|
||||||
./scripts/ci/test-backend | sed -r "s/\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" > ${WORKSPACE}/tmp-sh-build 2>&1
|
|
||||||
''')
|
|
||||||
shOutput = readFile "${env.WORKSPACE}/tmp-sh-build"
|
|
||||||
if (shStatusCode != 0) {
|
|
||||||
error "${shOutput}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Build all the golang binaries
|
// Build all the golang binaries
|
||||||
script {
|
sh './scripts/ci/build-backend'
|
||||||
def shStatusCode = sh(label: 'build-backend', returnStatus: true, script: '''
|
|
||||||
set -e
|
|
||||||
./scripts/ci/build-backend > ${WORKSPACE}/tmp-sh-build 2>&1
|
|
||||||
''')
|
|
||||||
shOutput = readFile "${env.WORKSPACE}/tmp-sh-build"
|
|
||||||
if (shStatusCode != 0) {
|
|
||||||
error "${shOutput}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Build the docker image used for testing below
|
// Build the docker image used for testing below
|
||||||
sh '''docker build --pull --no-cache \\
|
sh '''docker build --pull --no-cache \\
|
||||||
-t "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}" \\
|
-t "${IMAGE}:${BRANCH_LOWER}-ci-${BUILD_NUMBER}" \\
|
||||||
@ -111,12 +93,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
|
||||||
sh 'rm -f ${WORKSPACE}/tmp-sh-build'
|
|
||||||
}
|
|
||||||
failure {
|
|
||||||
npmGithubPrComment("CI Error:\n\n```\n${shOutput}\n```", true)
|
|
||||||
}
|
|
||||||
success {
|
success {
|
||||||
archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*'
|
archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*'
|
||||||
script {
|
script {
|
||||||
@ -136,7 +112,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'docker-compose config'
|
|
||||||
sh 'rm -rf ./test/results/junit/*'
|
sh 'rm -rf ./test/results/junit/*'
|
||||||
sh './scripts/ci/fulltest-cypress'
|
sh './scripts/ci/fulltest-cypress'
|
||||||
}
|
}
|
||||||
@ -167,7 +142,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'docker-compose config'
|
|
||||||
sh 'rm -rf ./test/results/junit/*'
|
sh 'rm -rf ./test/results/junit/*'
|
||||||
sh './scripts/ci/fulltest-cypress'
|
sh './scripts/ci/fulltest-cypress'
|
||||||
}
|
}
|
||||||
@ -196,7 +170,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'docker-compose config'
|
|
||||||
sh 'rm -rf ./test/results/junit/*'
|
sh 'rm -rf ./test/results/junit/*'
|
||||||
sh './scripts/ci/fulltest-cypress'
|
sh './scripts/ci/fulltest-cypress'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user