Skip to content

Commit

Permalink
kie-issues#574 Initial ASF Jenkins CI Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
radtriste authored and jstastny-cz committed Sep 19, 2023
1 parent f95759d commit 980751d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .ci/jenkins/Jenkinsfile.branch
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import org.jenkinsci.plugins.workflow.libs.Library
import org.kie.jenkins.MavenCommand
import org.kie.jenkins.MavenStagingHelper

AGENT_LABEL="kie-rhel7 && kie-mem4g"
MVN_TOOL="kie-maven-3.8.1"
JDK_TOOL="kie-jdk11"
benchmarksRepo="kie-benchmarks"
GIT_AUTHOR="kiegroup"
AGENT_LABEL="ubuntu"
MVN_TOOL="maven_3.8.6"
JDK_TOOL="jdk_11_latest"
benchmarksRepo="incubator-kie-benchmarks"
GIT_AUTHOR="apache"
TARGET_BRANCH="newBranch"

pipeline {
Expand Down
11 changes: 5 additions & 6 deletions .ci/jenkins/Jenkinsfile.bump-up-version
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import org.jenkinsci.plugins.workflow.libs.Library

import org.kie.jenkins.MavenCommand

def repoName = 'kie-benchmarks'
def repoName = 'incubator-kie-benchmarks'

pipeline {
agent {
label 'rhel8 && !built-in'
}
tools {
maven env.BUILD_MAVEN_TOOL
jdk env.BUILD_JDK_TOOL
docker {
image env.AGENT_DOCKER_BUILDER_IMAGE
args env.AGENT_DOCKER_BUILDER_ARGS
}
}

environment {
Expand Down
6 changes: 3 additions & 3 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,7 +25,7 @@ setupUpdateDependencyJob('drools')

void setupUpdateDependencyJob(String updateRepoName) {
def jobParams = JobParamsUtils.getBasicJobParams(this, "kie-benchmarks-update-${updateRepoName}", JobType.TOOLS, "${jenkins_path}/Jenkinsfile.bump-up-version", "${updateRepoName} bump up version")
JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",

Expand Down
8 changes: 4 additions & 4 deletions .ci/jenkins/dsl/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ fi

git_author="$(echo ${git_url} | awk -F"${git_server_url}" '{print $2}' | awk -F. '{print $1}' | awk -F/ '{print $1}')"

export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/drools
export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=kiegroup/drools
export DSL_DEFAULT_MAIN_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools
export DSL_DEFAULT_FALLBACK_MAIN_CONFIG_FILE_REPO=apache/incubator-kie-drools
export DSL_DEFAULT_MAIN_CONFIG_FILE_PATH=.ci/jenkins/config/main.yaml
export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/drools
export DSL_DEFAULT_BRANCH_CONFIG_FILE_REPO="${git_author}"/incubator-kie-drools

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} $@

0 comments on commit 980751d

Please sign in to comment.