From 6bc3bd671418df3bfd03c03c16e6a025f46f3eca Mon Sep 17 00:00:00 2001 From: Alfredo Oliviero Date: Tue, 7 May 2024 15:02:57 +0200 Subject: [PATCH 1/4] buildDistribution.sh output --- buildDistribution.sh | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/buildDistribution.sh b/buildDistribution.sh index ec3be55..d6d861e 100755 --- a/buildDistribution.sh +++ b/buildDistribution.sh @@ -21,8 +21,12 @@ Help() echo "-u p[u]sh image to dockerhub (with docker login already done)" echo "-h Print this [h]elp." echo + echo "to build a multiplatform image and push on d4science harbor" + echo "./buid ./buildDistribution.sh -m -l -p" } + + ################################################################################ ################################################################################ # Main program # @@ -62,21 +66,27 @@ done IMAGE_VERSION=${SMARTGEARS_VERSION}-java${JAVA_VERSION}-tomcat${TOMCAT_VERSION} echo "IMAGE_VERSION=$IMAGE_VERSION" +BUILD_NAME=smartgears-distribution:$IMAGE_VERSION + if [ -z $GOAL ]; then mvn clean package; else mvn clean ${GOAL}; fi if [ -z $MULTI_PLATFORM ]; - then docker build -t smartgears-distribution:$IMAGE_VERSION --build-arg JAVA_VERSION=${JAVA_VERSION} .; - else docker build -t smartgears-distribution:$IMAGE_VERSION --build-arg JAVA_VERSION=${JAVA_VERSION} --platform=linux/amd64,linux/arm64,linux/arm/v7 . ; + then docker build -t $BUILD_NAME --build-arg JAVA_VERSION=${JAVA_VERSION} .; + else docker build -t $BUILD_NAME --build-arg JAVA_VERSION=${JAVA_VERSION} --platform=linux/amd64,linux/arm64,linux/arm/v7 . ; + echo ">>> generated docker image ${IMAGE_VERSION}" fi if [ ${PUSH_DOCKER} = true ]; then - docker tag smartgears-distribution:$IMAGE_VERSION d4science/smartgears-distribution:$IMAGE_VERSION; - docker push d4science/smartgears-distribution:$IMAGE_VERSION; + DOCKER_NAME = d4science/$BUILD_NAME + docker tag $BUILD_NAME $DOCKER_NAME; + docker push $DOCKER_NAME; + echo ">>> pushed on dockerhub the image $DOCKER_NAME" + fi if [ ${LOGIN_HARBOR} = true ]; @@ -86,8 +96,9 @@ fi if [ ${PUSH_HARBOR} = true ]; then - docker tag smartgears-distribution:$IMAGE_VERSION hub.dev.d4science.org/gcube/smartgears-distribution:$IMAGE_VERSION; - docker push hub.dev.d4science.org/gcube/smartgears-distribution:$IMAGE_VERSION; + HARBOR_NAME=hub.dev.d4science.org/gcube/$BUILD_NAME + docker tag $BUILD_NAME $HARBOR_NAME; + docker push $HARBOR_NAME; + echo ">>> pushed on hub.dev.d4science.org the image $HARBOR_NAME" fi -echo "generated docker image ${IMAGE_VERSION}" \ No newline at end of file From 9d52aef7cb77ea3f7bbe2a27d3d86e6cf483f86a Mon Sep 17 00:00:00 2001 From: Alfredo Oliviero Date: Tue, 7 May 2024 18:20:15 +0200 Subject: [PATCH 2/4] aggiornato readme come da template --- FUNDING.md | 26 ++++++++++++++++++++++++++ README.md | 24 +++--------------------- 2 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 FUNDING.md diff --git a/FUNDING.md b/FUNDING.md new file mode 100644 index 0000000..9e48b94 --- /dev/null +++ b/FUNDING.md @@ -0,0 +1,26 @@ +# Acknowledgments + +The projects leading to this software have received funding from a series of European Union programmes including: + +- the Sixth Framework Programme for Research and Technological Development + - [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260). +- the Seventh Framework Programme for research, technological development and demonstration + - [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488); + - [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019); + - [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465); + - [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644); + - [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754). +- the H2020 research and innovation programme + - [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024); + - [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119); + - [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142); + - [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182); + - [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680); + - [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610); + - [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001); + - [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194); + - [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914); + - [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091); + - [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650); + - [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409); + - [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042); diff --git a/README.md b/README.md index 3ba97eb..6cd5008 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ A set of gCube library which empower a servlet container (e.g. tomcat) with a se - authorization - accounting +## Structure of the project + ## Built With @@ -55,26 +57,6 @@ open-source software toolkit used for building and operating Hybrid Data Infrastructures enabling the dynamic deployment of Virtual Research Environments by favouring the realisation of reuse oriented policies. -The projects leading to this software have received funding from a series of European Union programmes including: - -- the Sixth Framework Programme for Research and Technological Development - - DILIGENT (grant no. 004260). -- the Seventh Framework Programme for research, technological development and demonstration - - D4Science (grant no. 212488); - - D4Science-II (grant no.239019); - - ENVRI (grant no. 283465); - - iMarine(grant no. 283644); - - EUBrazilOpenBio (grant no. 288754). -- the H2020 research and innovation programme - - SoBigData (grant no. 654024); - - PARTHENOS (grant no. 654119); - - EGIEngage (grant no. 654142); - - ENVRIplus (grant no. 654182); - - BlueBRIDGE (grant no. 675680); - - PerformFish (grant no. 727610); - - AGINFRAplus (grant no. 731001); - - DESIRA (grant no. 818194); - - ARIADNEplus (grant no. 823914); - - RISIS2 (grant no. 824091); +The projects leading to this software have received funding from a series of European Union programmes see [FUNDING.md](FUNDING.md) From dcecfe224c92f157eda45e0b84315f4d10e2b904 Mon Sep 17 00:00:00 2001 From: Alfredo Oliviero Date: Tue, 7 May 2024 18:20:47 +0200 Subject: [PATCH 3/4] dockerfile con versione parametrica --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7dfbb58..d32ba1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ ARG JAVA_VERSION=11 -FROM tomcat:10.1.19-jdk$JAVA_VERSION-temurin-jammy - ARG filename=smartgears-distribution-4.0.0-SNAPSHOT - ARG version=4.0.0-SNAPSHOT - COPY ./target/$filename.tar.gz /smartgears-distro.tar.gz + +FROM tomcat:10.1.19-jdk${JAVA_VERSION}-temurin-jammy + ARG SMARTGEARS_VERSION="" + ENV FILENAME=smartgears-distribution-${SMARTGEARS_VERSION} + + COPY ./target/${FILENAME}.tar.gz /smartgears-distro.tar.gz WORKDIR / # all file and folder in etc/config are moved to the smartgears applications configuration directory # for specific application configuration ( configuration file for app with contextPath "contextPath" must be placed in /etc/config/contextPath) @@ -11,7 +13,7 @@ FROM tomcat:10.1.19-jdk$JAVA_VERSION-temurin-jammy RUN rm /smartgears-distro.tar.gz RUN export CATALINA_HOME=/usr/local/tomcat RUN ln -s /usr/local/tomcat tomcat - RUN mv smartgears-distribution-$version smartgears-distribution + RUN mv smartgears-distribution-$SMARTGEARS_VERSION smartgears-distribution ENV GHN_HOME=./smartgears-distribution RUN ./smartgears-distribution/install -s tomcat COPY tomcat_files/startContainer.sh /startContainer.sh From d381f2bc3055039e3e6a95ac188407777338ebf5 Mon Sep 17 00:00:00 2001 From: Alfredo Oliviero Date: Tue, 7 May 2024 18:21:13 +0200 Subject: [PATCH 4/4] passato a versione 4.0.1 per indagare un conflitto --- CHANGELOG.md | 4 ++++ buildDistribution.sh | 32 +++++++++++++++++--------------- pom.xml | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9200994..0390b4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for Smartgears Distribution +## [v4.0.1-SNAPSHOT] - 2022-03-30 + +- new version number + ## [v4.0.0-SNAPSHOT] - 2022-03-30 - moving to smartgears-4.0.0 diff --git a/buildDistribution.sh b/buildDistribution.sh index d6d861e..fc32812 100755 --- a/buildDistribution.sh +++ b/buildDistribution.sh @@ -1,6 +1,17 @@ #!/bin/bash +set -e + ACCEPTED_JAVA_VERSIONS=(11 17) +SMARTGEARS_VERSION=4.0.1-SNAPSHOT + +JAVA_VERSION=11 +TOMCAT_VERSION=10.1.19 +PUSH_DOCKER=false +PUSH_HARBOR=false +LOGIN_HARBOR=false +MULTI_PLATFORM=false + ################################################################################ # Help # @@ -22,11 +33,9 @@ Help() echo "-h Print this [h]elp." echo echo "to build a multiplatform image and push on d4science harbor" - echo "./buid ./buildDistribution.sh -m -l -p" + echo " ./buildDistribution.sh -m -l -p" } - - ################################################################################ ################################################################################ # Main program # @@ -34,15 +43,6 @@ Help() ################################################################################ -set -e - -SMARTGEARS_VERSION=4.0.0-SNAPSHOT - -JAVA_VERSION=11 -TOMCAT_VERSION=10.1.19 -PUSH_DOCKER=false -PUSH_HARBOR=false -LOGIN_HARBOR=false while getopts g:muplj:h flag do @@ -74,15 +74,15 @@ if [ -z $GOAL ]; fi if [ -z $MULTI_PLATFORM ]; - then docker build -t $BUILD_NAME --build-arg JAVA_VERSION=${JAVA_VERSION} .; - else docker build -t $BUILD_NAME --build-arg JAVA_VERSION=${JAVA_VERSION} --platform=linux/amd64,linux/arm64,linux/arm/v7 . ; + then docker build -t $BUILD_NAME --build-arg="JAVA_VERSION=${JAVA_VERSION}" --build-arg="SMARTGEARS_VERSION=${SMARTGEARS_VERSION}" .; + else docker build -t $BUILD_NAME --build-arg="JAVA_VERSION=${JAVA_VERSION}" --build-arg="SMARTGEARS_VERSION=${SMARTGEARS_VERSION}" --platform=linux/amd64,linux/arm64,linux/arm/v7 . ; echo ">>> generated docker image ${IMAGE_VERSION}" fi if [ ${PUSH_DOCKER} = true ]; then - DOCKER_NAME = d4science/$BUILD_NAME + DOCKER_NAME=d4science/$BUILD_NAME docker tag $BUILD_NAME $DOCKER_NAME; docker push $DOCKER_NAME; echo ">>> pushed on dockerhub the image $DOCKER_NAME" @@ -97,6 +97,8 @@ fi if [ ${PUSH_HARBOR} = true ]; then HARBOR_NAME=hub.dev.d4science.org/gcube/$BUILD_NAME + echo ">>> PUSHING on hub.dev.d4science.org the image $HARBOR_NAME" + docker tag $BUILD_NAME $HARBOR_NAME; docker push $HARBOR_NAME; echo ">>> pushed on hub.dev.d4science.org the image $HARBOR_NAME" diff --git a/pom.xml b/pom.xml index 7a1fa91..89197c2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.gcube.distribution smartgears-distribution - 4.0.0-SNAPSHOT + 4.0.1-SNAPSHOT pom A distribution for the SmartGears Framework