Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wannabelll authored Feb 23, 2025
1 parent 2aac033 commit 8a6263d
Showing 1 changed file with 41 additions and 3 deletions.
44 changes: 41 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ pipeline {
// Get the latest Git tag for versioning
GIT_TAG = sh(script: "git describe --tags --abbrev=0", returnStdout: true).trim()
}

tools{
nodejs "node-23.8.0-from.org"
go '1.24.0'
}
stages {

// Install npm dependencies
Expand Down Expand Up @@ -71,7 +74,43 @@ pipeline {
}
}

s3Upload consoleLogLevel: 'INFO', dontSetBuildResultOnFailure: false, dontWaitForConcurrentBuildCompletion: false, entries: [[bucket: 'my-artifact-bucket-ue-north-1/${JOB_NAME}-${BUILD_NUMBER}', excludedFile: '', flatten: false, gzipFiles: false, keepForever: false, managedArtifacts: false, noUploadOnFailure: true, selectedRegion: 'eu-north-1', showDirectlyInBrowser: false, sourceFile: 'gitea-archive-${GIT_TAG}.tar.gz', storageClass: 'STANDARD', uploadFromSlave: false, useServerSideEncryption: false]], pluginFailureResultConstraint: 'FAILURE', profileName: ' s3-jenkins-ansible-user ', userMetadata: [[key: '', value: '']]
// Publish the versioned artifact to S3
stage('Upload to S3') {
steps {
script {
// Upload artifact to S3 using declarative pipeline syntax
s3Upload(
bucket: 'my-artifact-bucket-ue-north-1/${JOB_NAME}-${BUILD_NUMBER}',
sourceFile: "gitea-archive-${GIT_TAG}.tar.gz",
storageClass: 'STANDARD',
selectedRegion: 'eu-north-1',
gzipFiles: false,
flatten: false,
showDirectlyInBrowser: false,
noUploadOnFailure: true,
useServerSideEncryption: false,
keepForever: false,
managedArtifacts: false,
entries: [[
sourceFile: "gitea-archive-${GIT_TAG}.tar.gz",
bucket: "my-artifact-bucket-ue-north-1/${JOB_NAME}-${BUILD_NUMBER}",
excludedFile: "",
flatten: false,
gzipFiles: false,
keepForever: false,
managedArtifacts: false,
noUploadOnFailure: true,
selectedRegion: 'eu-north-1',
showDirectlyInBrowser: false,
storageClass: 'STANDARD',
useServerSideEncryption: false
]],
profileName: 's3-jenkins-ansible-user', // The profile configured for AWS CLI on Jenkins
pluginFailureResultConstraint: 'FAILURE'
)
}
}
}
}

post {
Expand All @@ -83,4 +122,3 @@ pipeline {
}
}
}

0 comments on commit 8a6263d

Please # to comment.