изменен пайплайн
gitea local/fvtt-shared-compendia/pipeline/head This commit looks good
Details
gitea local/fvtt-shared-compendia/pipeline/head This commit looks good
Details
parent
d88b72f63a
commit
d434632d94
|
@ -1,11 +1,52 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
VERSION_STR = "$BUILD_NUMBER"
|
||||
DOWNLOAD_STR = "http://192.168.1.200:8082/repository/zip-repo/shared-compendia/${BUILD_NUMBER}/shared-compendia-${BUILD_NUMBER}.zip"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('test') {
|
||||
stage('modifying module.json') {
|
||||
steps {
|
||||
sh '/bin/true'
|
||||
sh 'ls -la'
|
||||
sh "sed -i 's_\"version\":.*\$_\"version\": \"${BUILD_NUMBER}\",_;s_\"download\":.*\$_\"download\": \"${DOWNLOAD_STR}\",_' module.json"
|
||||
}
|
||||
}
|
||||
stage('copy module.json') {
|
||||
steps {
|
||||
sh "cp -f module.json src/module.json"
|
||||
}
|
||||
}
|
||||
stage('archive artifacts') {
|
||||
steps {
|
||||
archiveArtifacts artifacts: 'module.json', fingerprint: true
|
||||
}
|
||||
}
|
||||
stage('generate archive') {
|
||||
steps {
|
||||
zip zipFile: "shared-compendia-${BUILD_NUMBER}.zip", archive: false, overwrite: true, dir: "src"
|
||||
}
|
||||
}
|
||||
stage('upload artifact') {
|
||||
steps {
|
||||
nexusArtifactUploader (
|
||||
artifacts: [
|
||||
[
|
||||
artifactId: "shared-compendia",
|
||||
classifier: '',
|
||||
file: "shared-compendia-${BUILD_NUMBER}.zip",
|
||||
type: 'zip'
|
||||
]
|
||||
],
|
||||
credentialsId: '190405b3-4cdf-4475-85ed-a3a7713cb6eb',
|
||||
groupId: 'shared-compendia',
|
||||
nexusUrl: '192.168.1.200:8082',
|
||||
nexusVersion: 'nexus3',
|
||||
protocol: 'http',
|
||||
repository: 'zip-repo',
|
||||
version: '$BUILD_NUMBER'
|
||||
)
|
||||
sh 'curl --user jenkins:12345678 --upload-file module.json http://192.168.1.200:8082/repository/zip-repo/shared-compendia/module.json'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue