diff --git a/jenkins-jobs/README.md b/jenkins-jobs/README.md deleted file mode 100644 index 65f219a9e..000000000 --- a/jenkins-jobs/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Debezium CI/CD Configuration - -Debezium CI/CD environment consists of a set of Jenkins jobs. The jobs are configured and generated using [Jenkins Job Builder](https://docs.openstack.org/infra/jenkins-job-builder/) tool. - -To generate jobs it is necessary to create a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) on GitHub account associated with Jenkins and use it as a password. - -``` -jenkins-jobs --conf config.ini -u -p update . -``` diff --git a/jenkins-jobs/config.ini b/jenkins-jobs/config.ini deleted file mode 100644 index ea3efd5b0..000000000 --- a/jenkins-jobs/config.ini +++ /dev/null @@ -1,7 +0,0 @@ -[job_builder] -ignore_cache=False -keep_descriptions=True -recursive=False - -[jenkins] -url=http://ci.hibernate.org diff --git a/jenkins-jobs/job-dsl/README.md b/jenkins-jobs/job-dsl/README.md deleted file mode 100644 index 6e142602c..000000000 --- a/jenkins-jobs/job-dsl/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Debezium private CI/CD Configuration - -Debezium private CI/CD environment consists of a set of Jenkins jobs. The jobs are configured and generated using [Jenkins Job DSL](https://jenkinsci.github.io/job-dsl-plugin/) Jenkins plugin. - -To update the jobs just run the **Seed Job**. All jobs define within this folder will be updated or created. diff --git a/jenkins-jobs/job-dsl/tools_source_clear.groovy b/jenkins-jobs/job-dsl/tools_source_clear.groovy new file mode 100644 index 000000000..4156666a2 --- /dev/null +++ b/jenkins-jobs/job-dsl/tools_source_clear.groovy @@ -0,0 +1,51 @@ +// Job definition to test PostgreSQL connector against different PostgreSQL versions + +freeStyleJob('tools-debezium-source-clear') { + + displayName('Vulnerability scan') + description('Executes SourceClear vulnerability scan of Debezium sources and binaries') + label('Slave') + + properties { + githubProjectUrl('https://github.com/debezium/debezium') + } + + logRotator { + daysToKeep(7) + } + + wrappers { + timeout { + noActivity(90) + } + + credentialsBinding { + string('SRCCLR_TOKEN', 'debezium-srcclr-token') + string('SOURCE_MAVEN_REPO', 'debezium-prod-repo') + } + } + + publishers { + mailer('jpechane@redhat.com', false, true) + } + + parameters { + stringParam('BUILD_VERSION', '', "Maven artifact id of the product binaries") + stringParam('PRODUCT_VERSION', '', "Product version") + stringParam('SOURCE_TAG', "", "Tagged version of source code to scan") + booleanParam('BINARY', false, "Scan binary artifacts") + stringParam('PLUGINS', "mysql postgres mongodb sqlserver", "The plugins whose binaries should be scanned") + } + + steps { + shell(''' +if [ "$BINARY" = "false" ]; then + docker run -e SRCCLR_TOKEN="$SRCCLR_TOKEN" quay.io/debezium/vulnerability-scan scm https://github.com/debezium/debezium.git "$PRODUCT_VERSION" "$SOURCE_TAG" +else + for CONNECTOR in $PLUGINS; do + docker run -e SRCCLR_TOKEN="$SRCCLR_TOKEN" quay.io/debezium/vulnerability-scan binary "$SOURCE_MAVEN_REPO/debezium-connector-$CONNECTOR/$BUILD_VERSION/debezium-connector-$CONNECTOR-${BUILD_VERSION}-plugin.zip" "$PRODUCT_VERSION" "$SOURCE_TAG" + done +fi +''') + } +} diff --git a/jenkins-jobs/job-dsl/tools_sync_images.groovy b/jenkins-jobs/job-dsl/tools_sync_images.groovy new file mode 100644 index 000000000..2581e8b70 --- /dev/null +++ b/jenkins-jobs/job-dsl/tools_sync_images.groovy @@ -0,0 +1,41 @@ +// Job definition to test PostgreSQL connector against different PostgreSQL versions + +freeStyleJob('tools-sync-images') { + + displayName('Synchronize Debezium Images') + description('Synchronizes Debezium images from Docker Hub to Quay') + label('Slave') + + properties { + githubProjectUrl('https://github.com/debezium/debezium') + } + + logRotator { + daysToKeep(7) + } + + wrappers { + timeout { + noActivity(90) + } + + credentialsBinding { + string('DEST_CREDENTIALS', 'debezium-quay') + } + } + + triggers { + cron('H 11 * * 1-5') + } + + publishers { + mailer('jpechane@redhat.com', false, true) + } + + + steps { + shell(''' +docker run -e DEST_CREDENTIALS="$DEST_CREDENTIALS" quay.io/debezium/sync-images +''') + } +} diff --git a/jenkins-jobs/job-dsl/view_list_jenkins.groovy b/jenkins-jobs/job-dsl/view_list_jenkins.groovy new file mode 100644 index 000000000..37dafb130 --- /dev/null +++ b/jenkins-jobs/job-dsl/view_list_jenkins.groovy @@ -0,0 +1,16 @@ +listView('Jenkins') { + description('Jenkins tools') + jobs { + name('job-configurator') + name('MonitoringTest') + } + columns { + status() + weather() + name() + lastSuccess() + lastFailure() + lastDuration() + buildButton() + } +} diff --git a/jenkins-jobs/job-dsl/view_list_openshift.groovy b/jenkins-jobs/job-dsl/view_list_openshift.groovy index 9ceca57ab..2ba8a3822 100644 --- a/jenkins-jobs/job-dsl/view_list_openshift.groovy +++ b/jenkins-jobs/job-dsl/view_list_openshift.groovy @@ -1,5 +1,5 @@ listView('Debezium-OpenShift-Tests') { - description('Upstream connector jobs') + description('OpenShift certification jobs') jobs { regex(/^ocp-.*$/) } diff --git a/jenkins-jobs/job-dsl/view_list_tools.groovy b/jenkins-jobs/job-dsl/view_list_tools.groovy new file mode 100644 index 000000000..a2b19b26b --- /dev/null +++ b/jenkins-jobs/job-dsl/view_list_tools.groovy @@ -0,0 +1,15 @@ +listView('Debezium-Tools') { + description('Tooling jobs') + jobs { + regex(/^tools-.*$/) + } + columns { + status() + weather() + name() + lastSuccess() + lastFailure() + lastDuration() + buildButton() + } +} diff --git a/jenkins-jobs/source-clear.yaml b/jenkins-jobs/source-clear.yaml deleted file mode 100644 index eb92182ca..000000000 --- a/jenkins-jobs/source-clear.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# Job definition to execute vulnerability scan ---- -- job: - project-type: freestyle - name: debezium-source-clear - display-name: Vulnerability scan - description: Executes SourceClear vulnerability scan of Debezium sources and binaries - node: Slave - properties: - - build-discarder: - days-to-keep: 7 - - github: - url: https://github.com/debezium/docker-images - parameters: - - string: - name: BUILD_VERSION - description: "Maven artifact id of the product binaries" - - string: - name: PRODUCT_VERSION - description: "Product version" - - string: - name: SOURCE_TAG - description: "Tagged version of source code to scan" - - bool: - name: BINARY - description: "Scan binary artifacts" - default: "false" - - string: - name: PLUGINS - description: "The plugins whose binaries should be scanned" - default: mysql postgres mongodb sqlserver - wrappers: - - timeout: - timeout: 90 - - credentials-binding: - - text: - credential-id: debezium-srcclr-token - variable: SRCCLR_TOKEN - - text: - credential-id: debezium-prod-repo - variable: SOURCE_MAVEN_REPO - builders: - - shell: | - if [ "$BINARY" = "false" ]; then - docker run -e SRCCLR_TOKEN="$SRCCLR_TOKEN" quay.io/debezium/vulnerability-scan scm https://github.com/debezium/debezium.git "$PRODUCT_VERSION" "$SOURCE_TAG" - else - for CONNECTOR in $PLUGINS; do - docker run -e SRCCLR_TOKEN="$SRCCLR_TOKEN" quay.io/debezium/vulnerability-scan binary "$SOURCE_MAVEN_REPO/debezium-connector-$CONNECTOR/$BUILD_VERSION/debezium-connector-$CONNECTOR-${BUILD_VERSION}-plugin.zip" "$PRODUCT_VERSION" "$SOURCE_TAG" - done - fi - publishers: - - email: - recipients: jpechane@redhat.com diff --git a/jenkins-jobs/sync-images.yaml b/jenkins-jobs/sync-images.yaml deleted file mode 100644 index 2fd45b728..000000000 --- a/jenkins-jobs/sync-images.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Job definition to synchronize Debezium images to Quay registry ---- -- job: - project-type: freestyle - name: debezium-sync-images - display-name: Synchronize Debezium Images - description: Synchronizes Debezium images from Docker Hub to Quay - node: Slave - properties: - - build-discarder: - days-to-keep: 7 - - github: - url: https://github.com/debezium/docker-images - wrappers: - - timeout: - timeout: 90 - - credentials-binding: - - text: - credential-id: debezium-quay - variable: DEST_CREDENTIALS - builders: - - shell: "docker run -e DEST_CREDENTIALS=\"$DEST_CREDENTIALS\" quay.io/debezium/sync-images" - triggers: - - timed: "H 11 * * 1-5" - publishers: - - email: - recipients: jpechane@redhat.com