Skip to content

Commit

Permalink
Fix archiving brew logs in ocp4
Browse files Browse the repository at this point in the history
  • Loading branch information
locriandev committed Aug 4, 2023
1 parent acc413f commit f79522d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 39 deletions.
7 changes: 6 additions & 1 deletion jobs/build/ocp4/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env groovy

def compressBrewLogs() {
echo "Compressing brew logs.."
commonlib.shell(script: "./find-and-compress-brew-logs.sh")
}

node {
checkout scm
def buildlib = load("pipeline-scripts/buildlib.groovy")
Expand Down Expand Up @@ -249,7 +254,7 @@ View the build artifacts and console output on Jenkins:
currentBuild.result = "FAILURE"
throw err // gets us a stack trace FWIW
} finally {
commonlib.compressBrewLogs()
compressBrewLogs()
commonlib.safeArchiveArtifacts([
"artcd_working/doozer_working/*.log",
"artcd_working/doozer_working/brew-logs.tar.bz2",
Expand Down
24 changes: 0 additions & 24 deletions jobs/build/ocp4/build.groovy

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fi

tar -cjf brew-logs.tar.bz2 ${BREWLOGS}
tar -tf brew-logs.tar.bz2
mv brew-logs.tar.bz2 doozer_working/brew-logs.tar.bz2
mv brew-logs.tar.bz2 artcd_working/doozer_working/brew-logs.tar.bz2
rm -rf $BREWLOGS

echo "Compressed brew logs:"
ls -lh doozer_working/brew-logs.tar.bz2
ls -lh artcd_working/doozer_working/brew-logs.tar.bz2
12 changes: 0 additions & 12 deletions pipeline-scripts/commonlib.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,6 @@ def safeArchiveArtifacts(List patterns) {
}
}


/**
* Try to find 'brew-logs' directories and then automatically compress
* them so we can save space and inodes on our storage devices.
* Won't explode if called and doozer never got to save any brew-logs.
**/
def compressBrewLogs() {
echo "Compressing brew logs.."
this.shell(script: "${env.WORKSPACE}/build-scripts/find-and-compress-brew-logs.sh > /dev/null")
}

import java.util.concurrent.atomic.AtomicInteger
shellCounter = new AtomicInteger()

Expand Down

0 comments on commit f79522d

Please sign in to comment.