From 70727907583d80a50e5ec5a5aaefefc5f8b9885c Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 24 Jul 2024 14:40:38 -0300 Subject: [PATCH 01/11] Adjust release pipelines for the Apache 10 release (#1228) --- .ci/jenkins/Jenkinsfile.release | 140 +++----------------------- .ci/jenkins/Jenkinsfile.release.cloud | 134 ++++-------------------- .ci/jenkins/dsl/jobs.groovy | 20 +--- 3 files changed, 37 insertions(+), 257 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.release b/.ci/jenkins/Jenkinsfile.release index a9dcf65b8..9dfaa04ba 100644 --- a/.ci/jenkins/Jenkinsfile.release +++ b/.ci/jenkins/Jenkinsfile.release @@ -4,10 +4,8 @@ import org.jenkinsci.plugins.workflow.libs.Library kogitoRuntimesRepo = 'kogito-runtimes' kogitoAppsRepo = 'kogito-apps' -kogitoExamplesRepo = 'kogito-examples' ARTIFACTS_STAGING_STAGE = 'stage.artifacts.staging' -ARTIFACTS_RELEASE_STAGE = 'stage.artifacts.release' JOB_PROPERTY_PREFIX = 'build' JOB_RESULT_PROPERTY_KEY = 'result' @@ -42,23 +40,17 @@ pipeline { echo "Release properties imported from previous job: ${releaseProperties}" } - assert getDroolsVersion() - assert getKogitoVersion() + assert getReleaseVersion() currentBuild.displayName = getDisplayName() - sendNotification("Release Pipeline has started...\nKogito version = ${getKogitoVersion()}\n=> ${env.BUILD_URL}") - - // Safety measure to not publish to main JBoss - if (getGitAuthor() != 'apache' && !getArtifactsRepositoryParam()) { - sendNotification("Git Author is different from `apache` and no `ARTIFACTS_REPOSITORY` parameter has been provided. Are you sure you want to continue ? => ${env.BUILD_URL}input") - input message: 'Should the pipeline continue with no `ARTIFACTS_REPOSITORY` defined ?', ok: 'Yes' - } + sendNotification("Release Pipeline has started...\nKogito version = ${getReleaseVersion()}\n=> ${env.BUILD_URL}") } } post { always { - setReleasePropertyIfneeded('kogito.version', getKogitoVersion()) + setReleasePropertyIfneeded('release.version', getReleaseVersion()) + setReleasePropertyIfneeded('git.tag.name', getGitTagName()) } } } @@ -66,10 +58,9 @@ pipeline { stage('Build & Deploy Kogito Runtimes') { steps { script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) + def buildParams = getDefaultBuildParams(getReleaseVersion()) addSkipTestsParam(buildParams) - addStringParam(buildParams, 'DROOLS_VERSION', getDroolsVersion()) - + addStringParam(buildParams, 'DROOLS_VERSION', getReleaseVersion()) buildJob(getDeployJobName(kogitoRuntimesRepo), buildParams) } } @@ -78,26 +69,13 @@ pipeline { stage('Build & Deploy Kogito Apps') { steps { script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) + def buildParams = getDefaultBuildParams(getReleaseVersion()) addSkipTestsParam(buildParams) - buildJob(getDeployJobName(kogitoAppsRepo), buildParams) } } } - stage('Build & Deploy Kogito Examples') { - steps { - script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) - addSkipTestsParam(buildParams) - addStringParam(buildParams, 'DROOLS_VERSION', getDroolsVersion()) - - buildJob(getDeployJobName(kogitoExamplesRepo), buildParams) - } - } - } - stage('Artifacts\' staging finalization') { steps { script { @@ -109,80 +87,15 @@ pipeline { } } - stage('Are staged artifacts released?') { - when { - // Execute only if artifacts repository was not given, which means the staging repository has been created - expression { return !getArtifactsRepositoryParam() && !areArtifactsReleased() } - } - steps { - script { - String body = "${getKogitoVersion()} artifacts are ready for release.\n" + - "Please release the staging repositories and then confirm here: ${env.BUILD_URL}input" - sendNotification(body) - input message: 'Has the staging repository been released ?', ok: 'Yes' - - sendNotification('Artifacts have been released. Finalizing now the release ...') - setArtifactsReleased() - } - } - } - - stage('Promote Kogito Runtimes') { - when { - expression { return isJobConsideredOk(getDeployJobName(kogitoRuntimesRepo)) } - } - steps { - script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) - addDeployBuildUrlParam(buildParams, getDeployJobName(kogitoRuntimesRepo)) - addStringParam(buildParams, 'DROOLS_VERSION', getDroolsVersion()) - - buildJob(getPromoteJobName(kogitoRuntimesRepo), buildParams) - } - } - } - - stage('Promote Kogito Apps') { - when { - expression { return isJobConsideredOk(getDeployJobName(kogitoAppsRepo)) } - } - steps { - script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) - addDeployBuildUrlParam(buildParams, getDeployJobName(kogitoAppsRepo)) - - buildJob(getPromoteJobName(kogitoAppsRepo), buildParams) - } - } - } - - stage('Promote Kogito Examples') { - when { - expression { return isJobConsideredOk(getDeployJobName(kogitoExamplesRepo)) } - } - steps { - script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) - addStringParam(buildParams, 'DROOLS_VERSION', getDroolsVersion()) - addDeployBuildUrlParam(buildParams, getDeployJobName(kogitoExamplesRepo)) - addBooleanParam(buildParams, 'UPDATE_STABLE_BRANCH', isDeployAsLatest()) - - buildJob(getPromoteJobName(kogitoExamplesRepo), buildParams) - } - } - } - stage('Start Cloud release') { when { expression { isCloudRelease() } } steps { script { - def buildParams = getDefaultBuildParams(getKogitoVersion()) - addStringParam(buildParams, 'KOGITO_VERSION', getKogitoVersion()) - addBooleanParam(buildParams, 'DEPLOY_AS_LATEST', isDeployAsLatest()) + def buildParams = getDefaultBuildParams(getReleaseVersion()) + addStringParam(buildParams, 'RELEASE_VERSION', getReleaseVersion()) addSkipTestsParam(buildParams) - build(job: './0-kogito-release-cloud', wait: false, parameters: buildParams, propagate: false) } } @@ -257,10 +170,6 @@ String getDeployJobName(String repository) { return "${repository}-deploy" } -String getPromoteJobName(String repository) { - return "${repository}-promote" -} - String getJobPropertySuffix(String jobName) { return "${JOB_PROPERTY_PREFIX}.${jobName}" } @@ -358,6 +267,7 @@ List getDefaultBuildParams(String version) { addDisplayNameParam(buildParams, getDisplayName(version)) addStringParam(buildParams, 'PROJECT_VERSION', version) addStringParam(buildParams, 'KOGITO_PR_BRANCH', "kogito-${version}") + addStringParam(buildParams, 'GIT_TAG_NAME', getGitTagName()) return buildParams } @@ -396,34 +306,22 @@ String constructKey(String prefix, String paramId) { } String getDisplayName(version = '') { - version = version ?: getKogitoVersion() + version = version ?: getReleaseVersion() return "Release ${version}" } -String getKogitoVersion() { - return params.KOGITO_VERSION ?: getReleaseProperty('kogito.version') +String getReleaseVersion() { + return params.RELEASE_VERSION ?: getReleaseProperty('release.version') } -String getDroolsVersion() { - return params.DROOLS_VERSION ?: getReleaseProperty('drools.version') +String getGitTagName() { + return params.GIT_TAG_NAME ?: getReleaseProperty('git.tag.name') } String getGitAuthor() { return env.GIT_AUTHOR } -String getArtifactsRepositoryParam() { - return env['ARTIFACTS_REPOSITORY'] ?: '' -} - -String getStagingRepository() { - return getArtifactsRepositoryParam() ?: env.DEFAULT_STAGING_REPOSITORY -} - -boolean isDeployAsLatest() { - return params.DEPLOY_AS_LATEST || getReleaseProperty('deploy.latest')?.toBoolean() -} - boolean isCloudRelease() { return !params.SKIP_CLOUD_RELEASE } @@ -455,11 +353,3 @@ boolean areArtifactsStaged() { void setArtifactsStaged() { setReleasePropertyIfneeded(ARTIFACTS_STAGING_STAGE, true) } - -boolean areArtifactsReleased() { - return hasReleaseProperty(ARTIFACTS_RELEASE_STAGE) -} - -void setArtifactsReleased() { - setReleasePropertyIfneeded(ARTIFACTS_RELEASE_STAGE, true) -} diff --git a/.ci/jenkins/Jenkinsfile.release.cloud b/.ci/jenkins/Jenkinsfile.release.cloud index 12d4f897c..86ccc37b4 100644 --- a/.ci/jenkins/Jenkinsfile.release.cloud +++ b/.ci/jenkins/Jenkinsfile.release.cloud @@ -3,10 +3,6 @@ import org.jenkinsci.plugins.workflow.libs.Library @Library('jenkins-pipeline-shared-libraries')_ kogitoImagesRepo = 'kogito-images' -kogitoServerlessOperatorRepo = 'kogito-serverless-operator' - -ARTIFACTS_STAGING_STAGE = 'stage.artifacts.staging' -ARTIFACTS_RELEASE_STAGE = 'stage.artifacts.release' JOB_PROPERTY_PREFIX = 'build' JOB_RESULT_PROPERTY_KEY = 'result' @@ -18,7 +14,6 @@ releaseProperties = [:] defaultImageParamsPrefix = 'IMAGE' baseImageParamsPrefix = 'BASE_IMAGE' -promoteImageParamsPrefix = 'PROMOTE_IMAGE' pipeline { agent { @@ -45,19 +40,17 @@ pipeline { echo "Release properties imported from previous job: ${releaseProperties}" } - assert getKogitoVersion() + assert getReleaseVersion() currentBuild.displayName = getDisplayName() - sendNotification("Cloud Release Pipeline has started...\nKogito version = ${getKogitoVersion()}\n=> ${env.BUILD_URL}") + sendNotification("Cloud Release Pipeline has started...\nKogito version = ${getReleaseVersion()}\n=> ${env.BUILD_URL}") } } post { always { - setReleasePropertyIfneeded('kogito.version', getKogitoVersion()) - setReleasePropertyIfneeded('kogito.images.version', getKogitoImagesVersion()) - setReleasePropertyIfneeded('kogito.serverless.operator.version', getKogitoServerlessOperatorVersion()) - setReleasePropertyIfneeded('deploy.latest', isDeployAsLatest()) + setReleasePropertyIfneeded('release.version', getReleaseVersion()) + setReleasePropertyIfneeded('git.tag.name', getGitTagName()) } } } @@ -66,7 +59,7 @@ pipeline { steps { script { env.APPS_URI = params.APPS_URI ?: (getReleaseProperty('apps.uri') ?: "https://github.com/${getGitAuthor()}/incubator-kie-kogito-apps") - env.APPS_REF = params.APPS_REF ?: (getReleaseProperty('apps.ref') ?: getKogitoVersion()) + env.APPS_REF = params.APPS_REF ?: (getReleaseProperty('apps.ref') ?: getReleaseVersion()) echo "Got apps uri ${env.APPS_URI}" echo "Got apps ref ${env.APPS_REF}" @@ -83,70 +76,15 @@ pipeline { } steps { script { - def buildParams = getDefaultBuildParams(getKogitoImagesVersion()) - addStringParam(buildParams, 'KOGITO_ARTIFACTS_VERSION', getKogitoVersion()) - addImageBuildParams(buildParams, getKogitoImagesTempTag()) + def buildParams = getDefaultBuildParams(getReleaseVersion()) + addImageBuildParams(buildParams, getReleaseVersion()) addAppsParam(buildParams) addSkipTestsParam(buildParams) - addExamplesParam(buildParams) buildJob(getDeployJobName(kogitoImagesRepo), buildParams) } } } - - // stage('Build & Deploy Kogito Serverless Operator') { - // when { - // expression { return isServerlessOperatorRelease() } - // } - // steps { - // script { - // def buildParams = getDefaultBuildParams(getKogitoServerlessOperatorVersion()) - // addSkipTestsParam(buildParams) - // addImageBuildParams(buildParams, getKogitoServerlessOperatorTempTag()) - - // buildJob(getDeployJobName(kogitoServerlessOperatorRepo), buildParams) - // } - // } - // } - - // stage('Promote Kogito Images') { - // when { - // expression { return isImagesRelease() && isJobConsideredOk(getDeployJobName(kogitoImagesRepo)) } - // } - // steps { - // script { - // def buildParams = getDefaultBuildParams(getKogitoImagesVersion()) - // addDeployBuildUrlParamOrClosure(buildParams, getDeployJobName(kogitoImagesRepo)) { - // addImageBuildParams(buildParams, getKogitoImagesTempTag(), false, baseImageParamsPrefix) - // } - // addImageBuildParams(buildParams, getKogitoImagesFinalTag(), true, promoteImageParamsPrefix) - // addBooleanParam(buildParams, 'DEPLOY_WITH_LATEST_TAG', isDeployAsLatest()) - - // buildJob(getPromoteJobName(kogitoImagesRepo), buildParams) - // } - // } - // } - - // stage('Promote Kogito Serverless Operator') { - // when { - // expression { return isServerlessOperatorRelease() && isJobConsideredOk(getDeployJobName(kogitoServerlessOperatorRepo)) } - // } - // steps { - // script { - // def buildParams = getDefaultBuildParams(getKogitoServerlessOperatorVersion()) - // addDeployBuildUrlParamOrClosure(buildParams, getDeployJobName(kogitoServerlessOperatorRepo)) { - // addImageBuildParams(buildParams, getKogitoServerlessOperatorTempTag(), false, baseImageParamsPrefix) - // } - - // // Base image information is given by the deploy URL - // addImageBuildParams(buildParams, getKogitoServerlessOperatorFinalTag(), true, promoteImageParamsPrefix) - // addBooleanParam(buildParams, 'DEPLOY_WITH_LATEST_TAG', isDeployAsLatest()) - - // buildJob(getPromoteJobName(kogitoServerlessOperatorRepo), buildParams) - // } - // } - // } } post { always { @@ -217,10 +155,6 @@ String getDeployJobName(String repository) { return "${repository}-deploy" } -String getPromoteJobName(String repository) { - return "${repository}-promote" -} - String getJobPropertySuffix(String jobName) { return "${JOB_PROPERTY_PREFIX}.${jobName}" } @@ -318,6 +252,7 @@ List getDefaultBuildParams(String version) { addDisplayNameParam(buildParams, getDisplayName(version)) addStringParam(buildParams, 'PROJECT_VERSION', version) addStringParam(buildParams, 'KOGITO_PR_BRANCH', params.KOGITO_PR_BRANCH ?: "kogito-${version}") + addStringParam(buildParams, 'GIT_TAG_NAME', getGitTagName()) return buildParams } @@ -349,11 +284,11 @@ void addAppsParam(buildParams) { } void addImageBuildParams(List buildParams, String tag, boolean isFinalImage = false, String paramsPrefix = defaultImageParamsPrefix) { - addBooleanParam(buildParams, constructKey(paramsPrefix, 'USE_OPENSHIFT_REGISTRY'), !isFinalImage && params.USE_TEMP_OPENSHIFT_REGISTRY) - addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_USER_CREDENTIALS_ID'), env.IMAGE_REGISTRY_USER_CREDENTIALS_ID) - addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_TOKEN_CREDENTIALS_ID'), env.IMAGE_REGISTRY_TOKEN_CREDENTIALS_ID) - addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY'), env.IMAGE_REGISTRY) - addStringParam(buildParams, constructKey(paramsPrefix, 'NAMESPACE'), env.IMAGE_NAMESPACE) + addBooleanParam(buildParams, constructKey(paramsPrefix, 'USE_OPENSHIFT_REGISTRY'), false) + addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_USER_CREDENTIALS_ID'), '') + addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_TOKEN_CREDENTIALS_ID'), '') + addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY'), '') + addStringParam(buildParams, constructKey(paramsPrefix, 'NAMESPACE'), '') addStringParam(buildParams, constructKey(paramsPrefix, 'TAG'), tag) } @@ -370,57 +305,24 @@ String constructKey(String prefix, String paramId) { } String getDisplayName(version = '') { - version = version ?: getKogitoVersion() + version = version ?: getReleaseVersion() return "Release ${version}" } -String getKogitoVersion() { - return params.KOGITO_VERSION ?: getReleaseProperty('kogito.version') -} - -String getKogitoImagesVersion() { - return params.KOGITO_IMAGES_VERSION ?: (getReleaseProperty('kogito.images.version') ?: removeVersionSuffixIfExist(getKogitoVersion())) -} - -String getKogitoServerlessOperatorVersion() { - return params.KOGITO_SERVERLESS_OPERATOR_VERSION ?: (getReleaseProperty('kogito.serverless.operator.version') ?: removeVersionSuffixIfExist(getKogitoVersion())) +String getReleaseVersion() { + return params.RELEASE_VERSION ?: getReleaseProperty('release.version') } String getGitAuthor() { return env.GIT_AUTHOR } -boolean isDeployAsLatest() { - return params.DEPLOY_AS_LATEST || getReleaseProperty('deploy.latest')?.toBoolean() -} - boolean isImagesRelease() { return !params.SKIP_IMAGES_RELEASE } -boolean isServerlessOperatorRelease() { - return !params.SKIP_SERVERLESS_OPERATOR_RELEASE -} - -String getKogitoImagesTempTag() { - return "${getKogitoImagesVersion()}-temp".toLowerCase() -} - -String getKogitoImagesFinalTag() { - return "${getKogitoImagesVersion()}".toLowerCase() -} - -String getKogitoServerlessOperatorTempTag() { - return "${getKogitoServerlessOperatorVersion()}-temp".toLowerCase() -} - -String getKogitoServerlessOperatorFinalTag() { - return "${getKogitoServerlessOperatorVersion()}".toLowerCase() -} - -String removeVersionSuffixIfExist(String version) { - Integer[] versionSplit = util.parseVersion(version) - return "${versionSplit[0]}.${versionSplit[1]}.${versionSplit[2]}" +String getGitTagName() { + return params.GIT_TAG_NAME ?: getReleaseProperty('git.tag.name') } void setReleasePropertyIfneeded(String key, def value) { diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 56177469a..ef78197f7 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -283,9 +283,8 @@ void setupReleaseArtifactsJob() { parameters { stringParam('RESTORE_FROM_PREVIOUS_JOB', '', 'URL to a previous stopped release job which needs to be continued') - stringParam('KOGITO_VERSION', '', 'Kogito version to release as Major.minor.micro') - stringParam('DROOLS_VERSION', '', 'Drools version to set for the release') - booleanParam('DEPLOY_AS_LATEST', false, 'Given project version is considered the latest version') + stringParam('RELEASE_VERSION', '', 'Version to release as Major.minor.micro') + stringParam('GIT_TAG_NAME', '', 'Git tag to create. i.e.: 10.0.0-rc1') booleanParam('SKIP_TESTS', false, 'Skip all tests') @@ -301,21 +300,13 @@ void setupReleaseCloudJob() { GIT_BRANCH_NAME: "${GIT_BRANCH}", GIT_AUTHOR: "${GIT_AUTHOR_NAME}", - - IMAGE_REGISTRY_USER_CREDENTIALS_ID: "${CLOUD_IMAGE_REGISTRY_USER_CREDENTIALS_ID}", - IMAGE_REGISTRY_TOKEN_CREDENTIALS_ID: "${CLOUD_IMAGE_REGISTRY_TOKEN_CREDENTIALS_ID}", - IMAGE_REGISTRY: "${CLOUD_IMAGE_REGISTRY}", - IMAGE_NAMESPACE: "${CLOUD_IMAGE_NAMESPACE}", - BRANCH_FOR_LATEST: "${CLOUD_IMAGE_LATEST_GIT_BRANCH}", ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { parameters { stringParam('RESTORE_FROM_PREVIOUS_JOB', '', 'URL to a previous stopped release job which needs to be continued') - stringParam('KOGITO_VERSION', '', 'Kogito version to release as Major.minor.micro') - stringParam('KOGITO_IMAGES_VERSION', '', '(optional) To be set if different from KOGITO_VERSION. Should be only a bug fix update from KOGITO_VERSION.') - stringParam('KOGITO_SERVERLESS_OPERATOR_VERSION', '', '(optional) To be set if different from KOGITO_VERSION. Should be only a bug fix update from KOGITO_VERSION.') - booleanParam('DEPLOY_AS_LATEST', false, 'Given project version is considered the latest version') + stringParam('RELEASE_VERSION', '', 'Version to release as Major.minor.micro. i.e: 10.0.0') + stringParam('GIT_TAG_NAME', '', 'Git tag to create. i.e.: 10.0.0-rc1') stringParam('APPS_URI', '', 'Override default. Git uri to the kogito-apps repository to use for building images.') stringParam('APPS_REF', '', 'Override default. Git reference (branch/tag) to the kogito-apps repository to use for building images.') @@ -323,9 +314,6 @@ void setupReleaseCloudJob() { booleanParam('SKIP_TESTS', false, 'Skip all tests') booleanParam('SKIP_IMAGES_RELEASE', false, 'To skip Images Test & Deployment.') - booleanParam('SKIP_SERVERLESS_OPERATOR_RELEASE', false, 'To skip Serverless Operator Test & Deployment.') - - booleanParam('USE_TEMP_OPENSHIFT_REGISTRY', false, 'If enabled, use Openshift registry to push temporary images') } } } From 364d3973421e1a697d5463cc32922000772fde29 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Mon, 12 Aug 2024 14:55:14 -0300 Subject: [PATCH 02/11] Staging Apache SVN credentials (#1237) --- .ci/jenkins/config/branch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index d71721d28..b2f8b07a5 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -93,8 +93,8 @@ release: key-credentials-id: 'GPG_KEY' passphrase-credentials-id: '' svn: - staging-repository: - credentials-id: + staging-repository: https://dist.apache.org/repos/dist/dev/incubator/kie + credentials-id: kie-dist-acct jenkins: email_creds_id: KOGITO_CI_NOTIFICATION_EMAILS agent: From dbfc60928589a1c433a6f8cf5829f77490672dcc Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 13 Aug 2024 11:12:19 -0300 Subject: [PATCH 03/11] NO-ISSUE: Fix release configuration keys (#1238) * Fix release configuration keys * Rename release.groovy file to avoid conflicts with the RELEASE env var --- .ci/jenkins/Jenkinsfile.zip.sources | 6 +++--- .ci/jenkins/config/branch.yaml | 8 ++++---- .../vars/{release.groovy => releaseUtils.groovy} | 0 3 files changed, 7 insertions(+), 7 deletions(-) rename jenkins-pipeline-shared-libraries/vars/{release.groovy => releaseUtils.groovy} (100%) diff --git a/.ci/jenkins/Jenkinsfile.zip.sources b/.ci/jenkins/Jenkinsfile.zip.sources index 617ecbce7..3df8e0bd8 100644 --- a/.ci/jenkins/Jenkinsfile.zip.sources +++ b/.ci/jenkins/Jenkinsfile.zip.sources @@ -26,9 +26,9 @@ pipeline { stage('Sign and upload the sources.zip') { steps { script { - release.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId()) - release.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) - release.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) + releaseUtils.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId()) + releaseUtils.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) + releaseUtils.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) } archiveArtifacts artifacts: "**/${SIGNATURE_FILE_NAME}" } diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index b2f8b07a5..60f6385f4 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -90,11 +90,11 @@ cloud: release: gpg: sign: - key-credentials-id: 'GPG_KEY' - passphrase-credentials-id: '' + key_credentials_id: GPG_KEY + passphrase_credentials_id: '' svn: - staging-repository: https://dist.apache.org/repos/dist/dev/incubator/kie - credentials-id: kie-dist-acct + staging_repository: https://dist.apache.org/repos/dist/dev/incubator/kie + credentials_id: kie-dist-acct jenkins: email_creds_id: KOGITO_CI_NOTIFICATION_EMAILS agent: diff --git a/jenkins-pipeline-shared-libraries/vars/release.groovy b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy similarity index 100% rename from jenkins-pipeline-shared-libraries/vars/release.groovy rename to jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy From ed1ea48ab9e49702968f8f45a537b966093a8c14 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 13 Aug 2024 14:32:01 -0300 Subject: [PATCH 04/11] Fix gpg import key utility (#1239) --- jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy index 6bb9564e1..6e8833759 100644 --- a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy +++ b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy @@ -20,7 +20,7 @@ def gpgImportKeyFromStringWithoutPassword(String gpgKeyCredentialsId) { echo "$SIGNING_KEY" > $WORKSPACE/signkey.gpg # Please do not remove list keys command. When gpg is run for the first time, it may initialize some internals. gpg --list-keys - gpg --batch --pinentry-mode=loopback --import signkey.gpg + gpg --batch --pinentry-mode=loopback --import $WORKSPACE/signkey.gpg rm $WORKSPACE/signkey.gpg """ } From 5eed4c2b44e078c346e5f4ffba4ef3bbc4310f0a Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 14 Aug 2024 09:00:30 -0300 Subject: [PATCH 05/11] NO-ISSUE: Switch to GPG File Jenkins secret (#1240) * Switch to GPG File Jenkins secret * Switch to GPG File Jenkins secret --- .ci/jenkins/config/branch.yaml | 2 +- .../vars/releaseUtils.groovy | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.ci/jenkins/config/branch.yaml b/.ci/jenkins/config/branch.yaml index 60f6385f4..3696a3beb 100644 --- a/.ci/jenkins/config/branch.yaml +++ b/.ci/jenkins/config/branch.yaml @@ -90,7 +90,7 @@ cloud: release: gpg: sign: - key_credentials_id: GPG_KEY + key_credentials_id: GPG_KEY_FILE passphrase_credentials_id: '' svn: staging_repository: https://dist.apache.org/repos/dist/dev/incubator/kie diff --git a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy index 6e8833759..af51530b0 100644 --- a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy +++ b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy @@ -14,14 +14,10 @@ def gpgImportKeyFromFileWithPassword(String gpgKeyCredentialsId, String gpgKeyPa } def gpgImportKeyFromStringWithoutPassword(String gpgKeyCredentialsId) { - withCredentials([string(credentialsId: gpgKeyCredentialsId, variable: 'SIGNING_KEY')]) { - // copy the key to singkey.gpg file in *plain text* so we can import it + withCredentials([file(credentialsId: gpgKeyCredentialsId, variable: 'SIGNING_KEY')]) { sh """ - echo "$SIGNING_KEY" > $WORKSPACE/signkey.gpg - # Please do not remove list keys command. When gpg is run for the first time, it may initialize some internals. gpg --list-keys - gpg --batch --pinentry-mode=loopback --import $WORKSPACE/signkey.gpg - rm $WORKSPACE/signkey.gpg + gpg --batch --pinentry-mode=loopback --import $SIGNING_KEY """ } } From a33c6e5aa13e579af618e4b23ee9854e51bb4221 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Wed, 28 Aug 2024 10:53:01 -0300 Subject: [PATCH 06/11] [10.0.x] NO-ISSUE: Fix kogito apps git reference in the release cloud job (#1243) * Fix kogito apps git reference in the release cloud job * Fix kogito apps git reference in the release cloud job --- .ci/jenkins/Jenkinsfile.release.cloud | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/Jenkinsfile.release.cloud b/.ci/jenkins/Jenkinsfile.release.cloud index 86ccc37b4..a5e22c409 100644 --- a/.ci/jenkins/Jenkinsfile.release.cloud +++ b/.ci/jenkins/Jenkinsfile.release.cloud @@ -59,7 +59,7 @@ pipeline { steps { script { env.APPS_URI = params.APPS_URI ?: (getReleaseProperty('apps.uri') ?: "https://github.com/${getGitAuthor()}/incubator-kie-kogito-apps") - env.APPS_REF = params.APPS_REF ?: (getReleaseProperty('apps.ref') ?: getReleaseVersion()) + env.APPS_REF = params.APPS_REF ?: (getReleaseProperty('apps.ref') ?: getGitTagName()) echo "Got apps uri ${env.APPS_URI}" echo "Got apps ref ${env.APPS_REF}" From 9ecacdf23da0e57522f52bd8ac20ddb06df14071 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Fri, 30 Aug 2024 07:57:06 -0300 Subject: [PATCH 07/11] [10.0.x] NO-ISSUE: Kogito Images release job fixes (#1244) * Kogito Images release job fixes * Kogito Images release job fixes --- .ci/jenkins/Jenkinsfile.release.cloud | 4 ++-- .ci/jenkins/dsl/jobs.groovy | 3 +++ apache-nodes/Dockerfile.kogito-ci-build | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.release.cloud b/.ci/jenkins/Jenkinsfile.release.cloud index a5e22c409..31509fb4e 100644 --- a/.ci/jenkins/Jenkinsfile.release.cloud +++ b/.ci/jenkins/Jenkinsfile.release.cloud @@ -287,8 +287,8 @@ void addImageBuildParams(List buildParams, String tag, boolean isFinalImage = fa addBooleanParam(buildParams, constructKey(paramsPrefix, 'USE_OPENSHIFT_REGISTRY'), false) addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_USER_CREDENTIALS_ID'), '') addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY_TOKEN_CREDENTIALS_ID'), '') - addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY'), '') - addStringParam(buildParams, constructKey(paramsPrefix, 'NAMESPACE'), '') + addStringParam(buildParams, constructKey(paramsPrefix, 'REGISTRY'), env.IMAGE_REGISTRY) + addStringParam(buildParams, constructKey(paramsPrefix, 'NAMESPACE'), env.IMAGE_NAMESPACE) addStringParam(buildParams, constructKey(paramsPrefix, 'TAG'), tag) } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index ef78197f7..66d474718 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -298,6 +298,9 @@ void setupReleaseCloudJob() { jobParams.env.putAll([ JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", + IMAGE_REGISTRY: "${CLOUD_IMAGE_REGISTRY}", + IMAGE_NAMESPACE: "${CLOUD_IMAGE_NAMESPACE}", + GIT_BRANCH_NAME: "${GIT_BRANCH}", GIT_AUTHOR: "${GIT_AUTHOR_NAME}", ]) diff --git a/apache-nodes/Dockerfile.kogito-ci-build b/apache-nodes/Dockerfile.kogito-ci-build index c711451f1..91ab0c883 100644 --- a/apache-nodes/Dockerfile.kogito-ci-build +++ b/apache-nodes/Dockerfile.kogito-ci-build @@ -55,6 +55,7 @@ libasound2 \ # kogito-images (BEGIN) jq \ skopeo \ +subversion \ # kogito-images (END) && apt clean From e934d28346580ddbe300ec5ec45ff6ecd6994117 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Fri, 30 Aug 2024 09:23:21 -0300 Subject: [PATCH 08/11] Apache release changes --- .ci/jenkins/Jenkinsfile.setup-branch.cloud | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/jenkins/Jenkinsfile.setup-branch.cloud b/.ci/jenkins/Jenkinsfile.setup-branch.cloud index a198a8907..2022b9c5f 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch.cloud +++ b/.ci/jenkins/Jenkinsfile.setup-branch.cloud @@ -36,7 +36,7 @@ pipeline { steps { script { def buildParams = getDefaultBuildParams() - addStringParam(buildParams, 'KOGITO_VERSION', getKogitoVersion().toLowerCase()) + addStringParam(buildParams, 'KOGITO_VERSION', getKogitoVersion()) addStringParam(buildParams, 'KOGITO_ARTIFACTS_VERSION', getKogitoVersion()) buildJob('kogito-images', buildParams) } From 47c20acb5907ea8831a8a26c99d73dc3868694dc Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Tue, 3 Sep 2024 15:20:58 -0300 Subject: [PATCH 09/11] [10.0.x] NO-ISSUE: Fix SVN upload utility function (#1246) * Fix SVN upload utility function * Add shasum func --- .../vars/releaseUtils.groovy | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy index af51530b0..bab1596be 100644 --- a/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy +++ b/jenkins-pipeline-shared-libraries/vars/releaseUtils.groovy @@ -29,7 +29,10 @@ def gpgSignFileDetachedSignatureWithPassword(String file, String signatureTarget } def gpgSignFileDetachedSignatureWithoutPassword(String file, String signatureTarget) { - sh "gpg --batch --sign --pinentry-mode=loopback --output ${signatureTarget} --detach-sig ${file}" + sh """ + gpg --batch --sign --pinentry-mode=loopback --output ${signatureTarget} --detach-sig ${file} + shasum -a 512 ${file} > ${file}.sha512 + """ } boolean gpgIsValidDetachedSignature(String file, String signature) { @@ -38,13 +41,13 @@ boolean gpgIsValidDetachedSignature(String file, String signature) { def svnUploadFileToRepository(String svnRepository, String svnCredentialsId, String releaseVersion, String... files) { withCredentials([usernamePassword(credentialsId: svnCredentialsId, usernameVariable: 'ASF_USERNAME', passwordVariable: 'ASF_PASSWORD')]) { - sh "svn co --depth=empty ${svnRepository} svn-kie" + sh "svn co --depth=empty ${svnRepository}/${releaseVersion} svn-kie" for (file in files) { - sh "cp ${file} svn-kie/${releaseVersion}/" + sh "cp ${file} svn-kie" } sh """ - svn add "svn-kie/${releaseVersion}" cd svn-kie + svn add . --force svn ci --non-interactive --no-auth-cache --username ${ASF_USERNAME} --password '${ASF_PASSWORD}' -m "Apache KIE ${releaseVersion} artifacts" rm -rf svn-kie """ From 3965397a0eab5d13c3b456ef94fbb6971cc50e0d Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Mon, 16 Sep 2024 16:26:27 -0300 Subject: [PATCH 10/11] Fix release sources zip jenkins job (#1248) --- .ci/jenkins/Jenkinsfile.zip.sources | 26 ++++++++++++++------------ .ci/jenkins/dsl/jobs.groovy | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.ci/jenkins/Jenkinsfile.zip.sources b/.ci/jenkins/Jenkinsfile.zip.sources index 3df8e0bd8..55bdeb546 100644 --- a/.ci/jenkins/Jenkinsfile.zip.sources +++ b/.ci/jenkins/Jenkinsfile.zip.sources @@ -9,7 +9,8 @@ pipeline { environment { SOURCES_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip" - SIGNATURE_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.asc" + SIGNATURE_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip.asc" + CHECKSUM_FILE_NAME = "${SOURCES_FILE_NAME_TEMPLATE}.zip.sha512" } options { @@ -23,20 +24,21 @@ pipeline { archiveArtifacts artifacts: "**/${SOURCES_FILE_NAME}" } } - stage('Sign and upload the sources.zip') { - steps { - script { - releaseUtils.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId()) - releaseUtils.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) - releaseUtils.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) - } - archiveArtifacts artifacts: "**/${SIGNATURE_FILE_NAME}" - } - } + stage('Sign and upload the sources.zip') { + steps { + dir('sources-out') { + script { + releaseUtils.gpgImportKeyFromStringWithoutPassword(getReleaseGpgSignKeyCredsId()) + releaseUtils.gpgSignFileDetachedSignatureWithoutPassword(SOURCES_FILE_NAME, SIGNATURE_FILE_NAME) + releaseUtils.svnUploadFileToRepository(getReleaseSvnRepository(), getReleaseSvnCredsId(), TARGET_VERSION, SOURCES_FILE_NAME, SIGNATURE_FILE_NAME, CHECKSUM_FILE_NAME) + } + archiveArtifacts artifacts: "**/${SIGNATURE_FILE_NAME}" + } + } + } } } - String getReleaseGpgSignKeyCredsId() { return env.RELEASE_GPG_SIGN_KEY_CREDS_ID } diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 66d474718..6b36c7d57 100644 --- a/.ci/jenkins/dsl/jobs.groovy +++ b/.ci/jenkins/dsl/jobs.groovy @@ -331,8 +331,8 @@ void setupZipSourcesJob() { RELEASE_GPG_SIGN_KEY_CREDS_ID: Utils.getReleaseGpgSignKeyCredentialsId(this), RELEASE_GPG_SIGN_PASSPHRASE_CREDS_ID: Utils.getReleaseGpgSignPassphraseCredentialsId(this), - RELEASE_SVN_REPOSITORY: Utils.getReleaseSvnCredentialsId(this), - RELEASE_SVN_CREDS_ID: Utils.getReleaseSvnStagingRepository(this) + RELEASE_SVN_REPOSITORY: Utils.getReleaseSvnStagingRepository(this), + RELEASE_SVN_CREDS_ID: Utils.getReleaseSvnCredentialsId(this) ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { From 534c50f828e4e85a20e401455e86da9e3f5354b8 Mon Sep 17 00:00:00 2001 From: Rodrigo Antunes Date: Fri, 4 Oct 2024 16:36:21 -0300 Subject: [PATCH 11/11] [10.0.x] NO-ISSUE: Add LICENSE, NOTICE and DISCLAIMER files to the root folder of the sources zip file (#1252) * Add Adding LICENSE, NOTICE and DISCLAIMER files to the root folder of the sources zip file * Add Adding LICENSE, NOTICE and DISCLAIMER files to the root folder of the sources zip file * Add Adding LICENSE, NOTICE and DISCLAIMER files to the root folder of the sources zip file --------- Co-authored-by: Rodrigo Antunes --- tools/zip-sources-all.sh | 4 + tools/zip-sources-files/DISCLAIMER | 26 ++++ tools/zip-sources-files/LICENSE | 201 +++++++++++++++++++++++++++++ tools/zip-sources-files/NOTICE | 119 +++++++++++++++++ 4 files changed, 350 insertions(+) create mode 100644 tools/zip-sources-files/DISCLAIMER create mode 100644 tools/zip-sources-files/LICENSE create mode 100644 tools/zip-sources-files/NOTICE diff --git a/tools/zip-sources-all.sh b/tools/zip-sources-all.sh index d84f07787..c1bb362ef 100755 --- a/tools/zip-sources-all.sh +++ b/tools/zip-sources-all.sh @@ -86,6 +86,10 @@ function zip_sources() { done <<< $SOURCES_REPOSITORIES + #Add LICENSE, NOTICE and DISCLAIMER files to the root folder of the zip file + echo "Adding LICENSE, NOTICE and DISCLAIMER files to the zip file" + cp ./tools/zip-sources-files/{LICENSE,NOTICE,DISCLAIMER} ${SOURCES_DIRECTORY_NAME} + #Creating ZIP pushd ${SOURCES_DIRECTORY_NAME} ZIP_FILE_NAME=$1 diff --git a/tools/zip-sources-files/DISCLAIMER b/tools/zip-sources-files/DISCLAIMER new file mode 100644 index 000000000..9d6cd54cb --- /dev/null +++ b/tools/zip-sources-files/DISCLAIMER @@ -0,0 +1,26 @@ +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +* Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +* Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header +* The following filetypes in the examples affect the build currently if file + headers are added: working on a ctt, exam, sol, exam, mm, txt, tsp, vrp, + They are not source files for the project. + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/tools/zip-sources-files/LICENSE b/tools/zip-sources-files/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/tools/zip-sources-files/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/zip-sources-files/NOTICE b/tools/zip-sources-files/NOTICE new file mode 100644 index 000000000..72f716f40 --- /dev/null +++ b/tools/zip-sources-files/NOTICE @@ -0,0 +1,119 @@ +Apache KIE +Copyright 2023 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +The Initial Developer of some parts of the framework, which are copied from, derived from, or +inspired by KIE (Knowledge Is Everthing) group, is Red Hat, Inc (https://www.redhat.com/). +Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved. + +This product also includes the following third-party components: + +* Twitter bootstrap version: 2.3.2 + Downloaded from: https://getbootstrap.com/ + License: Apache License v2.0 (just like OptaPlanner) + +* jQuery version: 1.9.1 + Downloaded from: http://jquery.com/ + License: MIT (which can be used by Apache License v2.0 projects) + +* google-code-pretty version: 4-Mar-2013 + Downloaded from: http://code.google.com/p/google-code-prettify + License: Apache License v2.0 (just like OptaPlanner) + +* jQuery version: 3.3.1 + Downloaded from: http://jquery.com/ + License: MIT - this is compatible with ASL 2.0: http://www.apache.org/legal/resolved.html#category-a + +* jstree version: 3.3.5 + Downloaded from: https://www.jstree.com/ + License: MIT - this is compatible with ASL 2.0: http://www.apache.org/legal/resolved.html#category-a + +* animate.css (http://daneden.me/animate) + + Copyright (c) 2016 Daniel Eden + +* bootstrap (https://getbootstrap.com/) + + Copyright 2011-2019 Twitter, Inc. + +* bootstrap-datepicker (https://github.com/smalot/bootstrap-datetimepicker) + + Copyright 2012 Stefan Petre + +* bootstrap-select (http://silviomoreto.github.io/bootstrap-select) + + Copyright 2013-2017 bootstrap-select + +* Context Dependency Injection (CDI) + + Copyright (C) 2009 The JSR-330 Expert Group + +* connected (https://github.com/Vertispan/connected) + + Copyright (C) 2017 Vertispan + +* Eclipse Modeling Framework (https://eclipse.dev/modeling/emf/) + + Copyright (C) Eclipse and contributors: Copyright (c) 2010 SAP AG + +* Font Awesome (https://fontawesome.com/) + + Copyright Dave Gandy 2016. All rights reserved + +* Google Web Toolkit (GWT) (https://www.gwtproject.org/) + + Copyright 2007 Google Inc. + +* GWT Bootstrap 3 (https://github.com/gwtbootstrap3/gwtbootstrap3) + + Copyright (C) 2013 GwtBootstrap3 + +* highlight.js (https://highlightjs.org) + + Copyright (C) highlight.js + +* Jakarta EE (https://jakarta.ee/) + + Copyright (C) Eclipse and contributors + +* Java Enterprise Edition (https://www.oracle.com/java/technologies/java-ee-glance.html) + + Copyright (c) 2017, 2020 Oracle and/or its affiliates. All rights reserved. + +* Java Standard Edition (https://www.oracle.com/java/technologies/java-se-glance.html) + + Copyright (c) 2005-2013 Oracle and/or its affiliates + +* jQuery UI (http://jqueryui.com) + + Copyright jQuery Foundation + +* libgdx (https://github.com/libgdx/libgdx) + + Copyright (c) 2008, Avian Contributors + +* Lienzo (https://github.com/dikalo/lienzo-core) + + Copyright (c) 2017 Ahome' Innovation Technologies + +* Respond.js (https://github.com/scottjehl/Respond) + + Copyright 2013 Scott Jehl + +* SnakeYAML (https://bitbucket.org/snakeyaml/snakeyaml) + + Copyright (c) 2018, SnakeYAML + +* wysihtml (https://github.com/Voog/wysihtml) + + Copyright (C) 2012-2016 XING AG, Voog and contributors + +* lunr 2.3.9 + Downloaded from: https://lunrjs.com/ + License: MIT + +* search-ui + Downloaded from: https://gitlab.com/antora/antora-lunr-extension + License: Mozilla Public License 2.0