Skip to content

Commit

Permalink
Merge pull request #33 from fellrock/develop
Browse files Browse the repository at this point in the history
Update JenkinsFile
  • Loading branch information
fellrock authored Mar 9, 2024
2 parents 4143977 + fc1be1f commit 0d23b25
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions jenkins/jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,13 @@ pipeline {
stage('Copy to Nginx Server') {
steps {
script {
def curlOutput = sh(script: 'curl -T . http://172.17.0.5:80/mnt/user/appdata/nginx/www', returnStatus: true).trim()
echo "curl result: ${curlOutput}"
def curlOutput = sh(script: 'curl -T . http://172.17.0.5:80/mnt/user/appdata/nginx/www', returnStdout: true, returnStatus: true).trim()
def curlExitCode = sh(script: 'echo $?', returnStatus: true).trim()

if (curlOutput != '0') {
echo "curl result: ${curlExitCode}"
echo "curl output: ${curlOutput}"

if (curlExitCode != '0') {
error "Failed to copy files to Nginx server. Check logs for details."
}
}
Expand Down

0 comments on commit 0d23b25

Please sign in to comment.