-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Release Automation] Extend release pipeline creating zip files for source code as required by Apache #828
Comments
@eduardocerqueira Do we want to produce zips per repository or is one huge zip preferred? |
this is what I wrote for Jenkins, this should do the job: def repos = [
[name: 'kie-drools', url: 'https://github.com/apache/incubator-kie-drools.git'],
[name: 'kie-optaplanner', url: 'https://github.com/apache/incubator-kie-optaplanner.git'],
[name: 'kie-kogito-runtimes', url: 'https://github.com/apache/incubator-kie-kogito-runtimes.git'],
[name: 'kie-kogito-apps', url: 'https://github.com/apache/incubator-kie-kogito-apps.git'],
[name: 'kie-kogito-images', url: 'https://github.com/apache/incubator-kie-kogito-images.git'],
[name: 'kie-tools', url: 'https://github.com/apache/incubator-kie-tools.git'],
[name: 'kie-sandbox-quarkus-accelerator', url: 'https://github.com/apache/incubator-kie-sandbox-quarkus-accelerator.git']
]
pipeline {
agent any
parameters {
string(name: 'BRANCH_NAME', defaultValue: 'main', description: 'Branch name to use for all repositories')
string(name: 'VERSION_NUMBER', defaultValue: '1.0.0', description: 'Version number for the ZIP file')
}
environment {
ZIP_FILE_NAME = "apache-kie-${params.VERSION_NUMBER}.zip"
}
stages {
stage('Clone Repositories') {
steps {
script {
repos.each { repo ->
dir(repo.name) {
git branch: params.BRANCH_NAME, url: repo.url
}
}
}
}
}
stage('Remove .git Directories') {
steps {
script {
repos.each { repo ->
sh "rm -rf ${repo.name}/.git"
}
}
}
}
stage('Create ZIP File') {
steps {
script {
def repoNames = repos.collect { it.name }
sh "zip -r ${env.ZIP_FILE_NAME} ${repoNames.join(' ')}"
}
}
}
stage('Archive ZIP') {
steps {
archiveArtifacts artifacts: env.ZIP_FILE_NAME, allowEmptyArchive: false
}
}
}
post {
always {
cleanWs()
}
}
} |
this is supposed to be a permanent automation to release in Apache |
PR with Implementation is here: apache/incubator-kie-kogito-pipelines#1202 - please review Job that builds it can be found here: https://ci-builds.apache.org/job/KIE/job/tools/job/zip-sources/ |
@cimbalek I think what Alex did creates one big zip. In the zip script, it creates one zip per repository. Could you please update the script, that it just clones everything and does on big zip of the whole folder with all repositories? |
extend pipelines adding step to compress in a tarball/zip the source code as it is required for releasing in Apache.
PS: it is for all repos targeting the 10.0.0 release.
The text was updated successfully, but these errors were encountered: