From 014aa15378e8be742935e2c1beafff51cc01e5c7 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Tue, 19 Dec 2023 14:43:20 +0100 Subject: [PATCH] Update images --- .github/workflows/onCodeChanges.yml | 3 ++- .../basic/superbuild-icubhead/Dockerfile | 11 +++-------- .../basic/superbuild-icubhead/conf_build.ini | 1 - .../basic/superbuild-icubtest/Dockerfile | 5 +++-- dockerfile_images/basic/superbuild/Dockerfile | 8 +++----- dockerfile_images/basic/superbuild/conf_build.ini | 3 ++- .../{basic => deprecated}/gazebo/Dockerfile | 0 .../gazebo/Dockerfile4Production | 0 .../{basic => deprecated}/gazebo/conf_build.ini | 0 .../{basic => deprecated}/gazebo/entrypoint.sh | 0 .../{basic => deprecated}/gazebo/setup.sh | 0 11 files changed, 13 insertions(+), 18 deletions(-) rename dockerfile_images/{basic => deprecated}/gazebo/Dockerfile (100%) rename dockerfile_images/{basic => deprecated}/gazebo/Dockerfile4Production (100%) rename dockerfile_images/{basic => deprecated}/gazebo/conf_build.ini (100%) rename dockerfile_images/{basic => deprecated}/gazebo/entrypoint.sh (100%) rename dockerfile_images/{basic => deprecated}/gazebo/setup.sh (100%) diff --git a/.github/workflows/onCodeChanges.yml b/.github/workflows/onCodeChanges.yml index 1d9165f..df694d5 100644 --- a/.github/workflows/onCodeChanges.yml +++ b/.github/workflows/onCodeChanges.yml @@ -333,10 +333,11 @@ jobs: ##################### Command to set the tag for the date argument ###################### - name: set date argument for Docker build + id: get_date run: | echo "$(date +'%d/%m/%Y')" > DATE_ echo "metadata=$(cat DATE_)" > DATE_TAG - echo $(cat DATE_TAG) + echo $(cat DATE_TAG) >> $GITHUB_OUTPUT ##################### Here we check the release version and replace Custom with stable only for the image name ###################### - name: Get release / master version diff --git a/dockerfile_images/basic/superbuild-icubhead/Dockerfile b/dockerfile_images/basic/superbuild-icubhead/Dockerfile index 63b4e4f..fc5871b 100644 --- a/dockerfile_images/basic/superbuild-icubhead/Dockerfile +++ b/dockerfile_images/basic/superbuild-icubhead/Dockerfile @@ -26,13 +26,7 @@ ARG INSTALL_DIR="/usr/local" ARG release ARG sbtag ARG METADATA_FILE - - -# Setup entrypoint ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh -COPY entrypoint.sh /usr/local/bin/entrypoint.sh -COPY setup.sh ${ROBOTOLOGY_INITIALIZATION_FILE} -ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] RUN mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ @@ -77,8 +71,6 @@ EXPOSE 10000/tcp 10000/udp ENV QT_X11_NO_MITSHM 1 ENV YARP_COLORED_OUTPUT 1 - - ARG metadata="none" ENV img_metadata=${metadata} @@ -86,6 +78,9 @@ ENV img_metadata=${metadata} RUN echo 'export img_metadata=${metadata}' > $METADATA_FILE RUN echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> $METADATA_FILE +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +COPY setup.sh ${ROBOTOLOGY_INITIALIZATION_FILE} +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD ["bash"] diff --git a/dockerfile_images/basic/superbuild-icubhead/conf_build.ini b/dockerfile_images/basic/superbuild-icubhead/conf_build.ini index fa3de7c..80e5698 100644 --- a/dockerfile_images/basic/superbuild-icubhead/conf_build.ini +++ b/dockerfile_images/basic/superbuild-icubhead/conf_build.ini @@ -14,5 +14,4 @@ START_IMG=ubuntu:jammy [superbuild] [children] -superbuild-ros1 superbuild-ros2 \ No newline at end of file diff --git a/dockerfile_images/basic/superbuild-icubtest/Dockerfile b/dockerfile_images/basic/superbuild-icubtest/Dockerfile index 1cabcdd..31432be 100644 --- a/dockerfile_images/basic/superbuild-icubtest/Dockerfile +++ b/dockerfile_images/basic/superbuild-icubtest/Dockerfile @@ -12,7 +12,6 @@ ARG PROJECTS_DIR=/projects ARG CMAKE_GENERATOR="Unix Makefiles" ARG BUILD_TYPE=Release ARG CMAKE_EXTRA_OPTIONS=-j4 -ARG INSTALL_DIR="/usr/local/" ARG release ARG sbtag ARG METADATA_FILE @@ -39,9 +38,11 @@ RUN cd ${PROJECTS_DIR}/robotology-superbuild &&\ cd build &&\ cmake .. \ -G "$CMAKE_GENERATOR" \ + -DBUILD_TESTING:BOOL=ON \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DNON_INTERACTIVE_BUILD:BOOL=ON \ -DROBOTOLOGY_ENABLE_CORE:BOOL=ON \ + -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON \ -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON \ -DROBOTOLOGY_USES_GAZEBO=OFF \ -DROBOTOLOGY_PROJECT_TAGS=${sbtag} \ @@ -58,7 +59,7 @@ ENV img_metadata=${metadata} RUN echo 'export img_metadata=${metadata}' > $METADATA_FILE RUN echo 'echo 'This image was built on $metadata ' ' >> $METADATA_FILE -COPY entrypoint.sh /usr/local/bin/entrypoint.sh +# COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] diff --git a/dockerfile_images/basic/superbuild/Dockerfile b/dockerfile_images/basic/superbuild/Dockerfile index b3af224..7829a0a 100644 --- a/dockerfile_images/basic/superbuild/Dockerfile +++ b/dockerfile_images/basic/superbuild/Dockerfile @@ -8,8 +8,8 @@ LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" ARG INSTALL_DIR="/usr/local" ARG PROJECTS_DIR=/projects -ARG release="master" -ARG sbtag="Stable" +ARG release="none" +ARG sbtag="none" ENV DEBIAN_FRONTEND=noninteractive @@ -92,9 +92,7 @@ RUN echo 'export img_metadata=${metadata}' > ${METADATA_FILE} &&\ RUN echo "source ${METADATA_FILE}" >> ${ROBOTOLOGY_INITIALIZATION_FILE} -FROM scratch - -COPY --from=secondstage / / +# COPY --from=secondstage / / #The EXPOSE instruction does not actually publish the port. diff --git a/dockerfile_images/basic/superbuild/conf_build.ini b/dockerfile_images/basic/superbuild/conf_build.ini index 8987064..8acb409 100644 --- a/dockerfile_images/basic/superbuild/conf_build.ini +++ b/dockerfile_images/basic/superbuild/conf_build.ini @@ -1,6 +1,7 @@ [sources] START_IMG=ubuntu:jammy -$(cat DATE_TAG) +; metadata=$(cat DATE_HOUR_TAG) +metadata={{steps.get_date.outputs.metadata}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} diff --git a/dockerfile_images/basic/gazebo/Dockerfile b/dockerfile_images/deprecated/gazebo/Dockerfile similarity index 100% rename from dockerfile_images/basic/gazebo/Dockerfile rename to dockerfile_images/deprecated/gazebo/Dockerfile diff --git a/dockerfile_images/basic/gazebo/Dockerfile4Production b/dockerfile_images/deprecated/gazebo/Dockerfile4Production similarity index 100% rename from dockerfile_images/basic/gazebo/Dockerfile4Production rename to dockerfile_images/deprecated/gazebo/Dockerfile4Production diff --git a/dockerfile_images/basic/gazebo/conf_build.ini b/dockerfile_images/deprecated/gazebo/conf_build.ini similarity index 100% rename from dockerfile_images/basic/gazebo/conf_build.ini rename to dockerfile_images/deprecated/gazebo/conf_build.ini diff --git a/dockerfile_images/basic/gazebo/entrypoint.sh b/dockerfile_images/deprecated/gazebo/entrypoint.sh similarity index 100% rename from dockerfile_images/basic/gazebo/entrypoint.sh rename to dockerfile_images/deprecated/gazebo/entrypoint.sh diff --git a/dockerfile_images/basic/gazebo/setup.sh b/dockerfile_images/deprecated/gazebo/setup.sh similarity index 100% rename from dockerfile_images/basic/gazebo/setup.sh rename to dockerfile_images/deprecated/gazebo/setup.sh