diff --git a/JenkinsJobs/Builds/DockerImagesBuild.groovy b/JenkinsJobs/Builds/DockerImagesBuild.groovy index 77a15c2919f..810ccbdf69f 100644 --- a/JenkinsJobs/Builds/DockerImagesBuild.groovy +++ b/JenkinsJobs/Builds/DockerImagesBuild.groovy @@ -32,54 +32,69 @@ pipeline { stages { stage('Clean workspace') { steps { - sh \'''#!/bin/bash -x - docker images - docker system prune -a -f - cd ${WORKSPACE} - rm -rf * - \''' + cleanWs() } } stage('Get Docker Files') { steps { sh \''' git clone -b master https://github.com/eclipse-platform/eclipse.platform.releng.aggregator.git - git clone -b master https://git.eclipse.org/r/jdt/eclipse.jdt.core.git + git clone -b master https://github.com/eclipse-jdt/eclipse.jdt.core \''' } } stage('Build Docker Images') { steps { - sh \'''#!/bin/bash -x - cd ${WORKSPACE}/eclipse.platform.releng.aggregator/cje-production/dockerfiles/ - chmod +x *.sh - (./build-centos_9.sh|tee centos9.log)& - (./build-centos_9_swt_build.sh|tee swt_9_build.log)& - (./build-ubuntu-22.04.sh|tee ubuntu22.log)& - (./build-openSuse-15.sh|tee opensuse_leap.log)& - cd ${WORKSPACE}/eclipse.jdt.core/org.eclipse.jdt.core/docker/ - chmod +x *.sh - (./build-ubuntu-jikespg.sh|tee ubuntuJikespg.log)& - wait - docker images - \''' + dir('eclipse.platform.releng.aggregator/cje-production/dockerfiles') { + sh \''' + (cd centos-gtk4-mutter/9-gtk4 && \ + echo "Building Centos 9 docker image" && \ + docker build --pull -t eclipse/platformreleng-centos-gtk4-mutter:9 . \ + |tee centos9.log)& + (cd centos-gtk4-mutter/9-swtBuild && \ + echo "Building Centos 9 swt build image" && \ + docker build --pull -t eclipse/platformreleng-centos-swt-build:9 . \ + |tee swt_9_build.log)& + (cd ubuntu-gtk3-metacity/22.04-gtk3 && \ + echo "Building Ubuntu 22.04 docker image" && \ + docker build --pull -t eclipse/platformreleng-ubuntu-gtk3-metacity:22.04 . \ + |tee ubuntu22.log)& + (cd opensuse-gtk3-metacity/15-gtk3 && \ + echo "Building Opensuse Leap 15 docker image" && \ + docker build --pull -t eclipse/platformreleng-opensuse-gtk3-metacity:15 . \ + |tee opensuse_leap.log)& + wait + \''' + } + dir('eclipse.jdt.core/org.eclipse.jdt.core/docker') { + sh \''' + chmod +x *.sh + (./build-ubuntu-jikespg.sh|tee ubuntuJikespg.log)& + wait + \''' + } + sh 'docker images' } } stage('Push docker image') { steps { withDockerRegistry([credentialsId: 'docker.com-bot', url: '']) { - sh \'''#!/bin/bash -x - cd ${WORKSPACE}/eclipse.platform.releng.aggregator/cje-production/dockerfiles/ - chmod +x *.sh - (./push-centos_9.sh|tee push-centos9.log)& - (./push-centos9_swt_build.sh|tee push-swt_9_build.log)& - (./push-ubuntu-22.04.sh|tee push-ubuntu22.log)& - (./push-opensuse-15.sh|tee push-opensuse_leap.log)& - cd ${WORKSPACE}/eclipse.jdt.core/org.eclipse.jdt.core/docker/ - chmod +x *.sh - (./push-ubuntu-jikespg.sh|tee push-ubuntuJikespg.log)& - wait - \''' + dir('eclipse.platform.releng.aggregator/cje-production/dockerfiles') { + sh \''' + (docker push eclipse/platformreleng-centos-gtk4-mutter:9|tee centos9.log)& + (docker push eclipse/platformreleng-centos-swt-build:9|tee push-swt_9_build.log)& + (docker push eclipse/platformreleng-opensuse-gtk3-metacity:15|tee push-ubuntu22.log)& + (docker push eclipse/platformreleng-ubuntu-gtk3-metacity:22.04|tee push-opensuse_leap.log)& + wait + \''' + } + dir('eclipse.jdt.core/org.eclipse.jdt.core/docker') { + sh \''' + chmod +x *.sh + (./push-ubuntu-jikespg.sh|tee push-ubuntuJikespg.log)& + wait + \''' + } } } } @@ -94,22 +109,15 @@ pipeline { } } post { - success { - emailext body: "Container images used for testing eclipse platform - Build Successful. Please go to ${BUILD_URL}console and check the log", - subject: "Container images - Build Successful", - to: "sravankumarl@in.ibm.com manoj.palat@in.ibm.com kalyan_prasad@in.ibm.com sdawley@redhat.com platform-releng-dev@eclipse.org", - from:"genie.releng@eclipse.org" - } - unsuccessful { emailext body: "Container images used for testing eclipse platform - Build Unsuccessful. Please go to ${BUILD_URL}console and check the log", subject: "Container images - Build Unsuccessful", - to: "sravankumarl@in.ibm.com manoj.palat@in.ibm.com kalyan_prasad@in.ibm.com sdawley@redhat.com platform-releng-dev@eclipse.org", + to: "platform-releng-dev@eclipse.org", from:"genie.releng@eclipse.org" } - always { archiveArtifacts '**/*.log' + cleanWs() } } } diff --git a/cje-production/dockerfiles/build-centos_9.sh b/cje-production/dockerfiles/build-centos_9.sh deleted file mode 100755 index 10aead6c3ec..00000000000 --- a/cje-production/dockerfiles/build-centos_9.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -pushd centos-gtk4-mutter/9-gtk4 -echo "Building Centos 9 docker image" -docker build --pull -t eclipse/platformreleng-centos-gtk4-mutter:9 . -popd diff --git a/cje-production/dockerfiles/build-centos_9_swt_build.sh b/cje-production/dockerfiles/build-centos_9_swt_build.sh deleted file mode 100755 index 36ee82c1355..00000000000 --- a/cje-production/dockerfiles/build-centos_9_swt_build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -pushd centos-gtk4-mutter/9-swtBuild -echo "Building Centos 9 swt build image" -docker build --pull -t eclipse/platformreleng-centos-swt-build:9 . -popd diff --git a/cje-production/dockerfiles/build-openSuse-15.sh b/cje-production/dockerfiles/build-openSuse-15.sh deleted file mode 100644 index b9a839dfb64..00000000000 --- a/cje-production/dockerfiles/build-openSuse-15.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2021 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -pushd opensuse-gtk3-metacity/15-gtk3 -echo "Building Opensuse Leap 15 docker image" -docker build --pull -t eclipse/platformreleng-opensuse-gtk3-metacity:15 . -popd diff --git a/cje-production/dockerfiles/build-ubuntu-22.04.sh b/cje-production/dockerfiles/build-ubuntu-22.04.sh deleted file mode 100755 index c1e6496a71b..00000000000 --- a/cje-production/dockerfiles/build-ubuntu-22.04.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -pushd ubuntu-gtk3-metacity/22.04-gtk3 -echo "Building Ubuntu 22.04 docker image" -docker build --pull -t eclipse/platformreleng-ubuntu-gtk3-metacity:22.04 . -popd diff --git a/cje-production/dockerfiles/push-centos9_swt_build.sh b/cje-production/dockerfiles/push-centos9_swt_build.sh deleted file mode 100644 index 38fa1b3bb38..00000000000 --- a/cje-production/dockerfiles/push-centos9_swt_build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2021 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -docker push eclipse/platformreleng-centos-swt-build:9 diff --git a/cje-production/dockerfiles/push-centos_9.sh b/cje-production/dockerfiles/push-centos_9.sh deleted file mode 100644 index c589bab42f7..00000000000 --- a/cje-production/dockerfiles/push-centos_9.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2021 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -docker push eclipse/platformreleng-centos-gtk4-mutter:9 diff --git a/cje-production/dockerfiles/push-opensuse-15.sh b/cje-production/dockerfiles/push-opensuse-15.sh deleted file mode 100644 index 32a37629a05..00000000000 --- a/cje-production/dockerfiles/push-opensuse-15.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2021 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -docker push eclipse/platformreleng-opensuse-gtk3-metacity:15 diff --git a/cje-production/dockerfiles/push-ubuntu-22.04.sh b/cje-production/dockerfiles/push-ubuntu-22.04.sh deleted file mode 100644 index 06a32d538b4..00000000000 --- a/cje-production/dockerfiles/push-ubuntu-22.04.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -x -#******************************************************************************* -# Copyright (c) 2022 IBM Corporation and others. -# -# This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 -# -# Contributors: -# Sravan Kumar Lakkimsetti - initial API and implementation -#******************************************************************************* - -set -e - -docker push eclipse/platformreleng-ubuntu-gtk3-metacity:22.04