Modify jenkinsfile to upload packages
ogclone-engine/pipeline/head This commit looks good Details

jenkins_upload_packages
Nicolas Arenas 2025-03-19 14:58:11 +01:00
parent c7756f8fb1
commit f8390cc9be
2 changed files with 18 additions and 8 deletions

View File

@ -1,4 +1,9 @@
# Changelog # Changelog
## [0.1.1] - 2025-02-28
### Changed - 2025-03-19
## [0.1.0] - 2025-02-28 ## [0.1.0] - 2025-02-28
### Addded ### Addded

View File

@ -55,12 +55,23 @@ pipeline {
sh ''' sh '''
dpkg-buildpackage -us -uc dpkg-buildpackage -us -uc
mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/ mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/
ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo && mkdir -p /var/tmp/opengnsys/debian-repo" ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/ogclient && mkdir -p /var/tmp/opengnsys/debian-repo/ogclient"
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ogclient
''' '''
} }
} }
} }
stage ('Publish to Debian Repository') {
when {
expression {
return env.TAG_NAME != null
}
}
agent { label 'debian-repo' }
steps {
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/ogclient/*.deb"
}
}
} }
post { post {
always { always {
@ -68,10 +79,4 @@ pipeline {
} }
} }
} }
// stage ('Publish to Debian Repository') {
// agent { label 'debian-repo' }
// steps {
// sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb"
// }
// }