This is an automated email from the ASF dual-hosted git repository.
jstastnycz pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 6168294 kie-issues#574 Initial ASF Jenkins CI Setup (#257)
6168294 is described below
commit 6168294977481e2e0e38ac8a937d088c296d725e
Author: Jan Stastny <[email protected]>
AuthorDate: Tue Sep 19 20:29:48 2023 +0200
kie-issues#574 Initial ASF Jenkins CI Setup (#257)
Co-authored-by: radtriste <[email protected]>
---
.ci/jenkins/Jenkinsfile | 12 +++++-------
.ci/jenkins/Jenkinsfile.deploy | 20 ++++++++------------
.ci/jenkins/Jenkinsfile.e2e.cluster | 15 ++++-----------
.ci/jenkins/Jenkinsfile.promote | 16 +++++-----------
.ci/jenkins/Jenkinsfile.setup-branch | 9 ++++-----
.ci/jenkins/dsl/jobs.groovy | 16 +++++++++-------
.ci/jenkins/dsl/test.sh | 2 +-
.ci/jenkins/scripts/minikube.groovy | 2 +-
.github/ISSUE_TEMPLATE/config.yml | 4 ++--
.github/workflows/jenkins-tests-PR.yml | 4 ++--
10 files changed, 41 insertions(+), 59 deletions(-)
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
index c82ccc2..55a7be2 100644
--- a/.ci/jenkins/Jenkinsfile
+++ b/.ci/jenkins/Jenkinsfile
@@ -8,10 +8,10 @@ testsFailed = false
pipeline {
agent {
- label 'kogito-jenkins-node && !master'
- }
- tools {
- go 'golang-1.19'
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
buildDiscarder logRotator(artifactDaysToKeepStr: '',
artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')
@@ -19,8 +19,6 @@ pipeline {
}
environment {
OPENSHIFT_INTERNAL_REGISTRY =
'image-registry.openshift-image-registry.svc:5000'
-
- CONTAINER_ENGINE = 'podman'
}
stages {
stage('Setup pipeline') {
@@ -39,7 +37,7 @@ pipeline {
sh ' git config --global user.email "[email protected]" '
sh ' git config --global user.name "kie user"'
- githubscm.checkoutIfExists('kogito-serverless-operator',
changeAuthor, changeBranch, 'kiegroup', changeTarget, true, ['token' :
'GITHUB_TOKEN', 'usernamePassword' : 'user-kie-ci10'])
+
githubscm.checkoutIfExists('incubator-kie-kogito-serverless-operator',
changeAuthor, changeBranch, 'apache', changeTarget, true, ['token' :
'GITHUB_TOKEN', 'usernamePassword' : 'user-kie-ci10'])
sh "set +x && oc login --token=\$(oc whoami -t)
--server=${OPENSHIFT_API} --insecure-skip-tls-verify"
}
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 6f50738..0443be0 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -6,7 +6,10 @@ commitDone = false
pipeline {
agent {
- label 'kie-rhel8 && docker && kie-mem16g && !built-in'
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -14,18 +17,9 @@ pipeline {
timestamps()
}
- tools {
- go 'golang-1.19'
- }
-
environment {
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- // Linked to node label
- // Use docker due to multiplatform build
- CONTAINER_ENGINE = 'docker'
- CONTAINER_ENGINE_TLS_OPTIONS = ''
-
PR_BRANCH_HASH = "${util.generateHash(10)}"
IMAGE_BUILD_PLATFORMS = 'linux/amd64,linux/arm64'
@@ -61,6 +55,8 @@ pipeline {
// Prepare for multiplatform build
String localRegistry = cloud.startLocalRegistry()
+
+ // TODO docker buildx could be preinstalled onto the
docker image
cloud.prepareForDockerMultiplatformBuild([localRegistry],[cloud.getDockerIOMirrorRegistryConfig()],
false)
cloud.installSkopeo()
}
@@ -277,8 +273,8 @@ String getTempBuiltImageTag() {
return "localhost:5000/kogito-serverless-operator:${getOperatorVersion()}"
}
-def runPythonCommand(String cmd, boolean stdout = false) {
- return util.runWithPythonVirtualEnv(cmd, 'cekit', stdout)
+void runPythonCommand(String cmd, boolean stdout = false) {
+ return sh(returnStdout: stdout, script: cmd)
}
void pushFinalImage(String oldImageName, String newImageName) {
diff --git a/.ci/jenkins/Jenkinsfile.e2e.cluster
b/.ci/jenkins/Jenkinsfile.e2e.cluster
index c00f07f..3b90cab 100644
--- a/.ci/jenkins/Jenkinsfile.e2e.cluster
+++ b/.ci/jenkins/Jenkinsfile.e2e.cluster
@@ -7,7 +7,10 @@ openshiftClusterPlatform = 'openshift'
pipeline {
agent {
- label "${env.AGENT_LABEL ?: "rhel8"} && podman && !built-in"
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -15,16 +18,6 @@ pipeline {
timestamps()
}
- tools {
- go 'golang-1.19'
- }
-
- environment {
- // Linked to node label
- CONTAINER_ENGINE='podman'
- CONTAINER_ENGINE_TLS_OPTIONS='--tls-verify=false'
- }
-
stages {
stage('Setup pipeline') {
steps {
diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote
index edb786f..5e240a4 100644
--- a/.ci/jenkins/Jenkinsfile.promote
+++ b/.ci/jenkins/Jenkinsfile.promote
@@ -6,7 +6,10 @@ helper = null
pipeline {
agent {
- label 'kie-rhel8 && podman && !built-in'
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -14,19 +17,10 @@ pipeline {
timestamps()
}
- tools {
- go 'golang-1.19'
- }
-
environment {
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- // Linked to node label
- CONTAINER_ENGINE = 'podman'
- CONTAINER_ENGINE_TLS_OPTIONS = '--tls-verify=false'
-
PR_BRANCH_HASH = "${util.generateHash(10)}"
- GITHUB_REPO = "${REPO_NAME}" // for github-release cli
}
stages {
@@ -167,7 +161,7 @@ void promoteImage(String oldImageName, String newImageName)
{
void updateInternalGoModuleWithTag(String moduleName, String tagName) {
sh """
- go get
github.com/kiegroup/kogito-serverless-operator/${moduleName}@${githubscm.getTagCommitHash(tagName)}
+ go get
github.com/apache/incubator-kie-kogito-serverless-operator/${moduleName}@${githubscm.getTagCommitHash(tagName)}
go mod tidy
"""
}
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch
b/.ci/jenkins/Jenkinsfile.setup-branch
index 702d8bb..63f2cf9 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -5,11 +5,10 @@ testsFailed = false
pipeline {
agent {
- label 'rhel8 && !built-in'
- }
-
- tools {
- go 'golang-1.19'
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index dc6f3f4..3372013 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -2,10 +2,10 @@
* This file is describing all the Jenkins jobs in the DSL format (see
https://plugins.jenkins.io/job-dsl/)
* needed by the Kogito pipelines.
*
-* The main part of Jenkins job generation is defined into the
https://github.com/kiegroup/kogito-pipelines repository.
+* The main part of Jenkins job generation is defined into the
https://github.com/apache/incubator-kie-kogito-pipelines repository.
*
* This file is making use of shared libraries defined in
-*
https://github.com/kiegroup/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
+*
https://github.com/apache/incubator-kie-kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
*/
import org.kie.jenkins.jobdsl.model.JobType
@@ -16,7 +16,6 @@ import org.kie.jenkins.jobdsl.Utils
jenkins_path = '.ci/jenkins'
clustersConfig = [
minikube: [
- AGENT_LABEL: 'kie-rhel8 && kie-mem16g',
MINIKUBE_VERSION: '1.30.1',
KUBERNETES_VERSION: '1.26.3',
],
@@ -42,9 +41,9 @@ setupPromoteJob(JobType.RELEASE)
void createSetupBranchJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this,
'kogito-serverless-operator', JobType.SETUP_BRANCH,
"${jenkins_path}/Jenkinsfile.setup-branch", 'Kogito Serverless Cloud Operator
Setup Branch')
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
- REPO_NAME: 'kogito-serverless-operator',
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
@@ -67,6 +66,7 @@ void createSetupBranchJob() {
void setupDeployJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this,
'kogito-serverless-operator-deploy', jobType,
"${jenkins_path}/Jenkinsfile.deploy", 'Kogito Serverless Cloud Operator Deploy')
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
@@ -95,7 +95,7 @@ void setupDeployJob(JobType jobType) {
// Deploy information
booleanParam('IMAGE_USE_OPENSHIFT_REGISTRY', false, 'Set to true
if image should be deployed in Openshift registry.In this case,
IMAGE_REGISTRY_CREDENTIALS, IMAGE_REGISTRY and IMAGE_NAMESPACE parameters will
be ignored')
- stringParam('IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS_NIGHTLY}", 'Image registry credentials to
use to deploy images. Will be ignored if no IMAGE_REGISTRY is given')
+ stringParam('IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS}", 'Image registry credentials to use to
deploy images. Will be ignored if no IMAGE_REGISTRY is given')
stringParam('IMAGE_REGISTRY', "${CLOUD_IMAGE_REGISTRY}", 'Image
registry to use to deploy images')
stringParam('IMAGE_NAMESPACE', "${CLOUD_IMAGE_NAMESPACE}", 'Image
namespace to use to deploy images')
stringParam('IMAGE_NAME_SUFFIX', '', 'Image name suffix to use to
deploy images. In case you need to change the final image name, you can add a
suffix to it.')
@@ -115,6 +115,7 @@ void setupDeployJob(JobType jobType) {
void setupPromoteJob(JobType jobType) {
def jobParams = JobParamsUtils.getBasicJobParams(this,
'kogito-serverless-operator-promote', jobType,
"${jenkins_path}/Jenkinsfile.promote", 'Kogito Serverless Cloud Operator
Promote')
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
MAX_REGISTRY_RETRIES: 3,
@@ -136,7 +137,7 @@ void setupPromoteJob(JobType jobType) {
// Base information which can override `deployment.properties`
booleanParam('BASE_IMAGE_USE_OPENSHIFT_REGISTRY', false, 'Override
`deployment.properties`. Set to true if base image should be deployed in
Openshift registry.In this case, BASE_IMAGE_REGISTRY_CREDENTIALS,
BASE_IMAGE_REGISTRY and BASE_IMAGE_NAMESPACE parameters will be ignored')
- stringParam('BASE_IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS_NIGHTLY}", 'Override
`deployment.properties`. Base Image registry credentials to use to deploy
images. Will be ignored if no BASE_IMAGE_REGISTRY is given')
+ stringParam('BASE_IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS}", 'Override `deployment.properties`. Base
Image registry credentials to use to deploy images. Will be ignored if no
BASE_IMAGE_REGISTRY is given')
stringParam('BASE_IMAGE_REGISTRY', "${CLOUD_IMAGE_REGISTRY}",
'Override `deployment.properties`. Base image registry')
stringParam('BASE_IMAGE_NAMESPACE', "${CLOUD_IMAGE_NAMESPACE}",
'Override `deployment.properties`. Base image namespace')
stringParam('BASE_IMAGE_NAME_SUFFIX', '', 'Override
`deployment.properties`. Base image name suffix')
@@ -144,7 +145,7 @@ void setupPromoteJob(JobType jobType) {
// Promote information
booleanParam('PROMOTE_IMAGE_USE_OPENSHIFT_REGISTRY', false, 'Set
to true if base image should be deployed in Openshift registry.In this case,
PROMOTE_IMAGE_REGISTRY_CREDENTIALS, PROMOTE_IMAGE_REGISTRY and
PROMOTE_IMAGE_NAMESPACE parameters will be ignored')
- stringParam('PROMOTE_IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS_NIGHTLY}", 'Promote Image registry
credentials to use to deploy images. Will be ignored if no
PROMOTE_IMAGE_REGISTRY is given')
+ stringParam('PROMOTE_IMAGE_REGISTRY_CREDENTIALS',
"${CLOUD_IMAGE_REGISTRY_CREDENTIALS}", 'Promote Image registry credentials to
use to deploy images. Will be ignored if no PROMOTE_IMAGE_REGISTRY is given')
stringParam('PROMOTE_IMAGE_REGISTRY', "${CLOUD_IMAGE_REGISTRY}",
'Promote image registry')
stringParam('PROMOTE_IMAGE_NAMESPACE', "${CLOUD_IMAGE_NAMESPACE}",
'Promote image namespace')
stringParam('PROMOTE_IMAGE_NAME_SUFFIX', '', 'Promote image name
suffix')
@@ -162,6 +163,7 @@ void setupPromoteJob(JobType jobType) {
void setupE2EJob(JobType jobType, String clusterName, Map extraEnv = [:]) {
def jobParams = JobParamsUtils.getBasicJobParams(this,
"kogito-serverless-operator.e2e.${clusterName}", jobType,
"${jenkins_path}/Jenkinsfile.e2e.cluster", 'Kogito Serverless Cloud Operator
Deploy')
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this,
jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
CLUSTER_NAME: clusterName,
diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh
index ad8af34..2d518eb 100755
--- a/.ci/jenkins/dsl/test.sh
+++ b/.ci/jenkins/dsl/test.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
file=$(mktemp)
# For more usage of the script, use ./test.sh -h
-curl -o ${file}
https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
+curl -o ${file}
https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
chmod u+x ${file}
${file} $@
\ No newline at end of file
diff --git a/.ci/jenkins/scripts/minikube.groovy
b/.ci/jenkins/scripts/minikube.groovy
index 355396a..445e2da 100644
--- a/.ci/jenkins/scripts/minikube.groovy
+++ b/.ci/jenkins/scripts/minikube.groovy
@@ -1,6 +1,6 @@
minikubeVersion = env.MINIKUBE_VERSION ?: '1.30.1'
minikubeKubernetesVersion = env.KUBERNETES_VERSION ?: '1.26.3'
-minikubeContainerEngine = env.CONTAINER_ENGINE ?: 'podman'
+minikubeContainerEngine = env.CONTAINER_ENGINE ?: 'docker'
minikubeCpus = 'max'
minikubeMemory = '4g'
diff --git a/.github/ISSUE_TEMPLATE/config.yml
b/.github/ISSUE_TEMPLATE/config.yml
index 22c4c17..ac8dcaf 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,8 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: GitHub Issues
- url: https://github.com/kiegroup/kogito-serverless-operator/issues
+ url:
https://github.com/apache/incubator-kie-kogito-serverless-operator/issues
about: GitHub Issues page in case you need to report a bug or wish to ask
for a new feature.
- name: Question
- url: https://github.com/kiegroup/kogito-serverless-operator/discussions
+ url:
https://github.com/apache/incubator-kie-kogito-serverless-operator/discussions
about: I have a question about how to use the operator.
diff --git a/.github/workflows/jenkins-tests-PR.yml
b/.github/workflows/jenkins-tests-PR.yml
index bf3815c..324a2de 100644
--- a/.github/workflows/jenkins-tests-PR.yml
+++ b/.github/workflows/jenkins-tests-PR.yml
@@ -17,6 +17,6 @@ jobs:
- name: DSL tests
uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
with:
- main-config-file-repo: kiegroup/kogito-pipelines
+ main-config-file-repo: apache/incubator-kie-kogito-pipelines
main-config-file-path: .ci/jenkins/config/main.yaml
- branch-config-file-repo: kiegroup/kogito-pipelines
+ branch-config-file-repo: apache/incubator-kie-kogito-pipelines
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]