Fix Jenksfile for merge
testing/ogcore-api/pipeline/head This commit looks good Details
ogcore-debian-package/pipeline/head This commit looks good Details
ogcore-debian-package/pipeline/tag There was a failure building this commit Details

jenkins_upload_packages 0.0.4
Nicolas Arenas 2025-03-18 09:06:44 +01:00
commit dd81706e18
1 changed files with 35 additions and 7 deletions

View File

@ -1,13 +1,20 @@
@Library('jenkins-shared-library') _
pipeline {
agent {
label 'jenkins-slave'
}
environment {
DEBIAN_FRONTEND = 'noninteractive'
DEFAULT_DEV_NAME = 'Opengnsys Team'
DEFAULT_DEV_EMAIL = 'opengnsys@qindel.com'
}
options {
skipDefaultCheckout()
}
parameters {
string(name: 'DEV_NAME', defaultValue: '', description: 'Nombre del desarrollador')
string(name: 'DEV_EMAIL', defaultValue: '', description: 'Email del desarrollador')
}
stages {
stage('Prepare Workspace') {
steps {
@ -24,6 +31,23 @@ pipeline {
}
}
}
stage('Generate Changelog') {
when {
expression {
return env.TAG_NAME != null
}
}
steps {
script {
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
generateDebianChangelog(env.BUILD_DIR, devName, devEmail)
}
}
}
stage('Build') {
steps {
dir("${env.BUILD_DIR}") {
@ -35,15 +59,19 @@ pipeline {
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/
'''
}
}
}
stage ('Publish to Debian Repository') {
agent { label 'debian-repo' }
steps {
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb"
}
}
}
post {
always {
notifyBuildStatus('narenas@qindel.com')
}
}
}
// stage ('Publish to Debian Repository') {
// agent { label 'debian-repo' }
// steps {
// sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb"
// }
// }