Skip to content
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

kie-issues#574 Initial ASF Jenkins CI Setup #504

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions .ci/jenkins/Jenkinsfile.post-release
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,15 @@ import org.jenkinsci.plugins.workflow.libs.Library

pipeline {
agent {
label 'rhel8 && !built-in'
}

tools {
nodejs 'nodejs-16.2.0'
label 'ubuntu'
}

options {
timestamps()
timeout(time: 60, unit: 'MINUTES')
}

// parameters {
// For parameters, check into .jenkins/dsl/jobs.groovy file
// }

environment {
// Some generated env is also defined into .jenkins/dsl/jobs.groovy file

CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
}

Expand All @@ -48,7 +38,7 @@ pipeline {
script {
dir("kogito-docs-${getBuildBranch()}") {
deleteDir()
checkout(githubscm.resolveRepository('kogito-docs', getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsID()))
checkout(githubscm.resolveRepository('incubator-kie-kogito-docs', getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsID()))
sh "git checkout ${getBuildBranch()}"

String antoraFile = 'serverlessworkflow/antora.yml'
Expand Down
18 changes: 4 additions & 14 deletions .ci/jenkins/Jenkinsfile.setup-branch
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,15 @@ import org.jenkinsci.plugins.workflow.libs.Library

pipeline {
agent {
label 'kie-rhel8 && !built-in'
}

tools {
nodejs 'nodejs-16.2.0'
label 'ubuntu'
}

options {
timestamps()
timeout(time: 60, unit: 'MINUTES')
}

// parameters {
// For parameters, check into .jenkins/dsl/jobs.groovy file
// }

environment {
// Some generated env is also defined into .jenkins/dsl/jobs.groovy file

CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
}

Expand Down Expand Up @@ -51,14 +41,14 @@ pipeline {

dir("kogito-docs-${getBuildBranch()}") {
deleteDir()
checkout(githubscm.resolveRepository('kogito-docs', getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsID()))
checkout(githubscm.resolveRepository('incubator-kie-kogito-docs', getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsID()))
sh "git checkout ${getBuildBranch()}"

String[] branchSplit = getBuildBranch().split("\\.")
String displayVersion = "${branchSplit[0]}.${branchSplit[1]}-RC"
String version = "${branchSplit[0]}.${branchSplit[1]}.0-SNAPSHOT"
String prereleaseStr = 'rc'
String swExamplesURL = "https://github.com/kiegroup/kogito-examples/tree/${getBuildBranch()}/serverless-workflow-examples"
String swExamplesURL = "https://github.com/apache/incubator-kie-kogito-examples/tree/${getBuildBranch()}/serverless-workflow-examples"
String antoraFile = 'serverlessworkflow/antora.yml'
String operatorVersion = "${getBuildBranch()}"

Expand Down Expand Up @@ -87,7 +77,7 @@ pipeline {
script {
dir('kogito-docs') {
deleteDir()
checkout(githubscm.resolveRepository('kogito-docs', getGitAuthor(), 'main', false, getGitAuthorCredsID()))
checkout(githubscm.resolveRepository('incubator-kie-kogito-docs', getGitAuthor(), 'main', false, getGitAuthorCredsID()))
sh 'git checkout main'

updateYaml('antora-playbook.yml') { antoraConfig ->
Expand Down
4 changes: 2 additions & 2 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 Down
2 changes: 1 addition & 1 deletion .ci/jenkins/dsl/test.sh
Original file line number Diff line number Diff line change
@@ -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} $@
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Please make sure that your PR meets the following requirements:

- [ ] You have read the [contributions doc](https://github.com/kiegroup/kogito-docs/blob/main/CONTRIBUTING.md)
- [ ] You have read the [contributions doc](https://github.com/apache/incubator-kie-kogito-docs/blob/main/CONTRIBUTING.md)
- [ ] Pull Request title is properly formatted: `KOGITO-XYZ Subject`
- [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] KOGITO-XYZ Subject`
- [ ] The nav.adoc file has a link to this guide in the proper category
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jenkins-tests-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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