diff --git a/jenkins.eclipse/Dockerfile b/jenkins.eclipse/Dockerfile deleted file mode 100644 index 8f08349403..0000000000 --- a/jenkins.eclipse/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Bosch.IO GmbH 2021. -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 - -# This file is the basis for building SW360 in the Eclipse Foundation Jenkins Infrastructure. -# The image has to be published to Docker Hub with the tag eclipse/sw360buildenv. -# To publish the image, you need write access to the repository in the Docker Hub eclipse organization. -# Versioning is done by a single number, e.g., eclipse/sw360buildenv:1 -# -# Build and push it from the jenkins-eclipse folder with -# $ docker build -t eclipse/sw360buildenv: --rm=true --force-rm=true . -# $ docker login --username=yourhubuser --password-stdin -# $ sudo docker push eclipse/sw360buildenv -# -# See the Jenkinsfile for usage within the Jenkins environment. - -FROM maven:3.6.3-jdk-11 - -ADD install-thrift.sh /install-thrift.sh -RUN /install-thrift.sh - -CMD /bin/bash diff --git a/jenkins.eclipse/Jenkinsfile b/jenkins.eclipse/Jenkinsfile deleted file mode 100644 index 6a1f52aea3..0000000000 --- a/jenkins.eclipse/Jenkinsfile +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Bosch.IO GmbH 2021. - * - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v2.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v20.html - * - * SPDX-License-Identifier: EPL-2.0 - */ - -pipeline { - agent { - kubernetes { - label 'sw360-agent-pod' - yaml """ -apiVersion: v1 -kind: Pod -spec: - containers: - - name: sw360buildenv - image: eclipse/sw360buildenv:2 - tty: true - command: - - cat - env: - - name: "MAVEN_OPTS" - value: "-Duser.home=/home/jenkins -Xms2G -Xmx2G" - resources: - requests: - memory: "2048Mi" - limits: - memory: "2048Mi" - volumeMounts: - - name: settings-xml - mountPath: /home/jenkins/.m2/settings.xml - subPath: settings.xml - readOnly: true - - name: settings-security-xml - mountPath: /home/jenkins/.m2/settings-security.xml - subPath: settings-security.xml - readOnly: true - - name: m2-repo - mountPath: /home/jenkins/.m2/repository - volumes: - - name: settings-xml - secret: - secretName: m2-secret-dir - items: - - key: settings.xml - path: settings.xml - - name: settings-security-xml - secret: - secretName: m2-secret-dir - items: - - key: settings-security.xml - path: settings-security.xml - - name: m2-repo - emptyDir: {} -""" - } - } - - environment { - COUNT = sh( - script: "printf \$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)", - returnStdout: true - ) - } - - parameters { - booleanParam( - name: 'RELEASE', - defaultValue: false, - description: 'If true, it is a milestone build with a m1 version suffix, or, if false, an intermediate build with a version suffix based on the commit count') - } - stages { - stage('Deploy SW360') { - steps { - container('sw360buildenv') { - script { - if (params.RELEASE) { - VERSION_SUFFIX = "0-m1" - } else { - VERSION_SUFFIX = "0-" + COUNT - } - } - // FIXME: Removed the frontend from the build, because it does not build in the Container environment - // Plugin liferay-themes breaks the build - // FIXME: Removed backend utils form the build, it causes issues with signing the fat jar - sh """ - mvn --batch-mode -Peclipse-ci \ - clean deploy \ - -pl '!frontend/sw360-portlet,!frontend/liferay-theme,!frontend,!backend/utils' \ - -DskipTests -DskipITs -Dpatchlevel=$VERSION_SUFFIX - """ - } - } - } - } -} diff --git a/jenkins.eclipse/buildContainer.sh b/jenkins.eclipse/buildContainer.sh deleted file mode 100755 index 8d0509eb3e..0000000000 --- a/jenkins.eclipse/buildContainer.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# Copyright (c) Bosch.IO GmbH 2021. -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 - -# Usage ./buildContainer.sh - -if [ -z "$1" ] - then - echo "No version supplied" - exit 1 -fi - -echo "Script assumes that you are already logged into docker hub for pushing the new image." -echo "If not, please run 'docker login --username= --password-stdin' prior to running the script." - -cp ../scripts/install-thrift.sh . -docker build -t eclipse/sw360buildenv:$1 --rm=true --force-rm=true . -sudo docker push eclipse/sw360buildenv:$1 -sudo docker push eclipse/sw360buildenv -rm -f install-thrift.sh - -echo "Please update Jenkinsfile to new version and push the change." diff --git a/sw360BackendRest.Dockerfile b/scripts/sw360BackendRest.Dockerfile similarity index 100% rename from sw360BackendRest.Dockerfile rename to scripts/sw360BackendRest.Dockerfile diff --git a/sw360dev.Dockerfile b/sw360dev.Dockerfile deleted file mode 100644 index caea0de00d..0000000000 --- a/sw360dev.Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) Bosch Software Innovations GmbH 2016. -# Part of the SW360 Portal Project. -# -# This program and the accompanying materials are made -# available under the terms of the Eclipse Public License 2.0 -# which is available at https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 - -# This can be used to compile SW360 via: -# $ docker build -f sw360dev.Dockerfile -t sw360/sw360dev --rm=true --force-rm=true . -# $ docker run -i -v $(pwd):/sw360portal -w /sw360portal --net=host -u $(id -u):$(id -g) sw360/sw360dev mvn package -DskipTests - -FROM maven:3.6.3-openjdk-11-slim -MAINTAINER Maximilian Huber - -ADD scripts/install-thrift.sh /install-thrift.sh -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends git \ - && /install-thrift.sh \ - && apt-get purge -y --auto-remove build-essential libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev \ - && apt-get install -y --no-install-recommends libfl2 \ - && apt-get -y clean \ - && rm -rf /var/lib/apt/lists/* /var/cache/debconf/* - -CMD /bin/bash