Reduce ci artifacts

This commit is contained in:
Jamie Curnow
2021-06-30 13:14:27 +10:00
parent 225569920f
commit d44143b15a
2 changed files with 9 additions and 11 deletions

12
Jenkinsfile vendored
View File

@@ -111,10 +111,6 @@ pipeline {
// Dumps to analyze later // Dumps to analyze later
sh 'mkdir -p debug' sh 'mkdir -p debug'
sh 'docker-compose logs fullstack | gzip > debug/docker_fullstack.log.gz' sh 'docker-compose logs fullstack | gzip > debug/docker_fullstack.log.gz'
// Cypress videos and screenshot artifacts
dir(path: 'test/results') {
archiveArtifacts allowEmptyArchive: true, artifacts: '**/*', excludes: '**/*.xml'
}
junit 'test/results/junit/*' junit 'test/results/junit/*'
} }
} }
@@ -139,8 +135,6 @@ pipeline {
dir(path: 'docs/.vuepress/dist') { dir(path: 'docs/.vuepress/dist') {
sh 'tar -czf ../../docs.tgz *' sh 'tar -czf ../../docs.tgz *'
} }
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
} }
} }
stage('MultiArch Build') { stage('MultiArch Build') {
@@ -221,11 +215,17 @@ pipeline {
sh 'figlet "SUCCESS"' sh 'figlet "SUCCESS"'
} }
failure { failure {
dir(path: 'test') {
archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml'
}
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true) archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
juxtapose event: 'failure' juxtapose event: 'failure'
sh 'figlet "FAILURE"' sh 'figlet "FAILURE"'
} }
unstable { unstable {
dir(path: 'test') {
archiveArtifacts allowEmptyArchive: true, artifacts: 'results/**/*', excludes: '**/*.xml'
}
archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true) archiveArtifacts(artifacts: 'debug/**.*', allowEmptyArchive: true)
juxtapose event: 'unstable' juxtapose event: 'unstable'
sh 'figlet "UNSTABLE"' sh 'figlet "UNSTABLE"'

View File

@@ -20,10 +20,10 @@ if [ "$BUILD_VERSION" = "" ]; then
fi fi
echo -e "${BLUE} ${GREEN}build-backend:${RESET}" echo -e "${BLUE} ${GREEN}build-backend:${RESET}"
echo " BUILD_COMMIT: ${BUILD_COMMIT:-notset}" echo " BUILD_COMMIT: $BUILD_COMMIT"
echo " BUILD_DATE: $BUILD_DATE" echo " BUILD_DATE: $BUILD_DATE"
echo " BUILD_VERSION: $BUILD_VERSION" echo " BUILD_VERSION: $BUILD_VERSION"
echo " CGO_ENABLED: ${CGO_ENABLED:-not set}" echo " CGO_ENABLED: ${CGO_ENABLED:-}"
echo " GO111MODULE: ${GO111MODULE:-}" echo " GO111MODULE: ${GO111MODULE:-}"
echo " GOPRIVATE: ${GOPRIVATE:-}" echo " GOPRIVATE: ${GOPRIVATE:-}"
echo " GOPROXY: ${GOPROXY:-}" echo " GOPROXY: ${GOPROXY:-}"
@@ -36,7 +36,7 @@ cleanup() {
build_backend() { build_backend() {
echo -e "${BLUE} ${CYAN}Building backend for ${YELLOW}${1}-${2} ...${RESET}" echo -e "${BLUE} ${CYAN}Building backend for ${YELLOW}${1}-${2} ...${RESET}"
FILENAME="nginxproxymanager-v${BUILD_VERSION}_${1}_${2}" FILENAME="nginxproxymanager-${1}_${2}"
if [ "$1" = "windows" ]; then if [ "$1" = "windows" ]; then
FILENAME="${FILENAME}.exe" FILENAME="${FILENAME}.exe"
fi fi
@@ -44,13 +44,11 @@ build_backend() {
docker run --rm \ docker run --rm \
-e BUILD_COMMIT="${BUILD_COMMIT:-notset}" \ -e BUILD_COMMIT="${BUILD_COMMIT:-notset}" \
-e BUILD_DATE="$BUILD_DATE" \ -e BUILD_DATE="$BUILD_DATE" \
-e BUILD_VERSION="$BUILD_VERSION" \
-e GOARCH="${2}" \ -e GOARCH="${2}" \
-e GOOS="${1}" \ -e GOOS="${1}" \
-e GOPRIVATE="${GOPRIVATE:-}" \ -e GOPRIVATE="${GOPRIVATE:-}" \
-e GOPROXY="${GOPROXY:-}" \ -e GOPROXY="${GOPROXY:-}" \
-e NOW="$NOW" \ -e NOW="$NOW" \
-e SENTRY_DSN="${SENTRY_DSN:-}" \
-e TZ="${TZ:-Australia/Brisbane}" \ -e TZ="${TZ:-Australia/Brisbane}" \
-v "$(pwd):/app" \ -v "$(pwd):/app" \
-w '/app/backend' \ -w '/app/backend' \