From 268c38883e9c74697d30dc9da358fb6c471c12da Mon Sep 17 00:00:00 2001 From: MicroEJ GitHub Delivery Date: Wed, 20 Sep 2023 10:41:16 +0000 Subject: [PATCH] Version 1.6.0 --- .gitmodules | 0 5.8.1-jdk11/CHANGELOG.md | 31 +++++++++++ 5.8.1-jdk11/Dockerfile | 95 +++++++++++++++++++++++++++++++++ 5.8.1/CHANGELOG.md | 31 +++++++++++ 5.8.1/Dockerfile | 96 ++++++++++++++++++++++++++++++++++ Jenkinsfile | 110 --------------------------------------- 6 files changed, 253 insertions(+), 110 deletions(-) create mode 100644 .gitmodules create mode 100644 5.8.1-jdk11/CHANGELOG.md create mode 100644 5.8.1-jdk11/Dockerfile create mode 100644 5.8.1/CHANGELOG.md create mode 100644 5.8.1/Dockerfile delete mode 100644 Jenkinsfile diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/5.8.1-jdk11/CHANGELOG.md b/5.8.1-jdk11/CHANGELOG.md new file mode 100644 index 0000000..8aedd33 --- /dev/null +++ b/5.8.1-jdk11/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.6.0] - 2023-09-20 +### Added +- Add Dockerfile for sdk 5.8.1 and 5.8.0 jdk11 + +## [1.5.0] - 2023-08-07 +### Added +- Add Dockerfile for sdk 5.8.0 + +## [1.4.0] - 2023-08-07 +### Added +- Add Dockerfile for sdk 5.8.0 jdk11 + +## [1.3.0] - 2023-03-10 +### Added +- Add Dockerfile for sdk 5.6.2 jdk11 +- Add Dockerfile for sdk 5.7.0 and 5.7.0-jdk11 based on 5.6.2 + +## [1.2.0] - 2022-09-06 +### Added +- Add Dockerfile for sdk 5.6.2 based on 5.5.0 + +--- +_Markdown_ +_Copyright 2021-2023 MicroEJ Corp. All rights reserved._ +_Use of this source code is governed by a BSD-style license that can be found with this software._ diff --git a/5.8.1-jdk11/Dockerfile b/5.8.1-jdk11/Dockerfile new file mode 100644 index 0000000..7649968 --- /dev/null +++ b/5.8.1-jdk11/Dockerfile @@ -0,0 +1,95 @@ +# Dockerfile +# +# Copyright 2023 MicroEJ Corp. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be found with this software. +FROM eclipse-temurin:11 + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg \ + lsb-release && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + unzip \ + udev \ + docker-ce-cli \ + ssh \ + sshpass \ + # Required for Eclipse-based SDK to run + libwebkit2gtk-4.0-37 && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get clean + +# Set the new user parameter. +ARG user=microej +ARG group=microej +ARG uid=1000 +ARG gid=1000 +RUN addgroup --gid ${gid} ${group} && \ + adduser --home /home/${user} --uid ${uid} --ingroup ${group} --disabled-password ${user} + +# Set env +ENV HOME /home/${user} +ENV ECLIPSE_HOME=/opt/eclipse +ENV BUILD_KIT_HOME=/opt/buildKit +ENV PATH=$BUILD_KIT_HOME/bin:$PATH + +# Set workdir +WORKDIR ${HOME} + +# I) Install SDK +RUN curl -O https://repository.microej.com/packages/SDK/23.07/zip/microej-sdk-23.07-linux_x86_64.zip && \ + mkdir -p $ECLIPSE_HOME && \ + unzip microej-sdk-23.07-linux_x86_64.zip -d $ECLIPSE_HOME && \ + rm -f microej-sdk-23.07-linux_x86_64.zip && \ +# II) Configure SDK location + mkdir -p $HOME/.microej && \ + chown $user:$group $HOME/.microej && \ + echo "[options]\neclipse.home=\"${ECLIPSE_HOME}\"" > $HOME/.microej/.mmmconfig && \ +# III) Update SDK to 5.8.1 +# 1. Uninstall SDK 5.8.0 + $ECLIPSE_HOME/MicroEJ-SDK \ + -application org.eclipse.equinox.p2.director \ + -noSplash \ + -uninstallIU \ + com.is2t.microej.sdk.feature.feature.group && \ +# 2. Remove plugins with multiple versions + rm -rf $ECLIPSE_HOME/plugins/com.is2t.microej.wadapps.workbench_3.8.1.20220831-1722.jar && \ +# 3. Install SDK 5.8.1 + $ECLIPSE_HOME/MicroEJ-SDK \ + -application org.eclipse.equinox.p2.director \ + -noSplash \ + -repository \ + https://repository.microej.com/p2/sdk/5.8.1 \ + -installIUs \ + com.is2t.microej.sdk.feature.feature.group && \ +# IV) Extract Build Kit from SDK + mkdir -p $BUILD_KIT_HOME && \ +# 1. Extract build repository + unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e.offlinerepo_1.6.1.202309181610.jar repositories/microej-build-repository.zip && \ + unzip repositories/microej-build-repository.zip -d $BUILD_KIT_HOME/microej-build-repository && \ + rm -rf repositories/ && \ +# 2. Extract mmm-cli + unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e_2.7.1.202309181610.jar cli/mmm-cli.zip && \ + unzip cli/mmm-cli.zip -d $BUILD_KIT_HOME/ && \ + rm -rf cli && \ +# 3. Extract ivysettings + unzip $ECLIPSE_HOME/plugins/org.apache.ivyde.eclipse_2.5.1.final-202307031339-RELEASE/ivyde-eclipse.jar resources/microej-ivysettings-5.4.xml && \ + mkdir -p $BUILD_KIT_HOME/microej-module-repository/ && \ + mv resources/microej-ivysettings-5.4.xml $BUILD_KIT_HOME/microej-module-repository/ivysettings.xml && \ + rm -rf resources/ && \ +# 4. Set SDK version + echo 'sdk.version=5.8.1' > $BUILD_KIT_HOME/release.properties && \ + mkdir -p $HOME/.microej/build-repository-cache && \ + ln -s $HOME/.microej/build-repository-cache $BUILD_KIT_HOME/microej-build-repository/cache && \ + chown $user:$group $BUILD_KIT_HOME/microej-build-repository/cache + +# Good practice, switch back to user. +USER ${user} diff --git a/5.8.1/CHANGELOG.md b/5.8.1/CHANGELOG.md new file mode 100644 index 0000000..8aedd33 --- /dev/null +++ b/5.8.1/CHANGELOG.md @@ -0,0 +1,31 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.6.0] - 2023-09-20 +### Added +- Add Dockerfile for sdk 5.8.1 and 5.8.0 jdk11 + +## [1.5.0] - 2023-08-07 +### Added +- Add Dockerfile for sdk 5.8.0 + +## [1.4.0] - 2023-08-07 +### Added +- Add Dockerfile for sdk 5.8.0 jdk11 + +## [1.3.0] - 2023-03-10 +### Added +- Add Dockerfile for sdk 5.6.2 jdk11 +- Add Dockerfile for sdk 5.7.0 and 5.7.0-jdk11 based on 5.6.2 + +## [1.2.0] - 2022-09-06 +### Added +- Add Dockerfile for sdk 5.6.2 based on 5.5.0 + +--- +_Markdown_ +_Copyright 2021-2023 MicroEJ Corp. All rights reserved._ +_Use of this source code is governed by a BSD-style license that can be found with this software._ diff --git a/5.8.1/Dockerfile b/5.8.1/Dockerfile new file mode 100644 index 0000000..c87c1a0 --- /dev/null +++ b/5.8.1/Dockerfile @@ -0,0 +1,96 @@ +# Dockerfile +# +# Copyright 2023 MicroEJ Corp. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be found with this software. +FROM eclipse-temurin:8 + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg \ + lsb-release && \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ + apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + git \ + unzip \ + udev \ + docker-ce-cli \ + ssh \ + sshpass \ + # Required for Eclipse-based SDK to run + libwebkit2gtk-4.0-37 && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get clean + +# Set the new user parameter. +ARG user=microej +ARG group=microej +ARG uid=1000 +ARG gid=1000 +RUN addgroup --gid ${gid} ${group} && \ + adduser --home /home/${user} --uid ${uid} --ingroup ${group} --disabled-password ${user} + +# Set env +ENV HOME /home/${user} +ENV ECLIPSE_HOME=/opt/eclipse +ENV BUILD_KIT_HOME=/opt/buildKit +ENV PATH=$BUILD_KIT_HOME/bin:$PATH + +# Set workdir +WORKDIR ${HOME} + +## I) Install SDK +RUN curl -O https://repository.microej.com/packages/SDK/21.11/zip/microej-sdk-21.11-linux_x86_64.zip && \ + mkdir -p $ECLIPSE_HOME && \ + unzip microej-sdk-21.11-linux_x86_64.zip -d $ECLIPSE_HOME && \ + rm -f microej-sdk-21.11-linux_x86_64.zip && \ +# II) Configure SDK location + mkdir -p $HOME/.microej && \ + chown $user:$group $HOME/.microej && \ + echo "[options]\neclipse.home=\"${ECLIPSE_HOME}\"" > $HOME/.microej/.mmmconfig && \ +# III) Update SDK to 5.8.1 +# 1. Uninstall SDK 5.6.0 + $ECLIPSE_HOME/MicroEJ-SDK \ + -application org.eclipse.equinox.p2.director \ + -noSplash \ + -uninstallIU \ + com.is2t.microej.sdk.feature.feature.group && \ +# 2. Remove plugins with multiple versions + rm -rf $ECLIPSE_HOME/plugins/com.is2t.microej.wadapps.workbench_3.8.0.20201030-1117.jar && \ + rm -rf $ECLIPSE_HOME/plugins/com.is2t.microEJ.fontGenerator_2.5.1.20211112-1727.jar && \ +# 3. Install SDK 5.8.1 + $ECLIPSE_HOME/MicroEJ-SDK \ + -application org.eclipse.equinox.p2.director \ + -noSplash \ + -repository \ + https://repository.microej.com/p2/sdk/5.8.1 \ + -installIUs \ + com.is2t.microej.sdk.feature.feature.group && \ +# IV) Extract Build Kit from SDK + mkdir -p $BUILD_KIT_HOME && \ +# 1. Extract build repository + unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e.offlinerepo_1.6.1.202309181610.jar repositories/microej-build-repository.zip && \ + unzip repositories/microej-build-repository.zip -d $BUILD_KIT_HOME/microej-build-repository && \ + rm -rf repositories/ && \ +# 2. Extract mmm-cli + unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e_2.7.1.202309181610.jar cli/mmm-cli.zip && \ + unzip cli/mmm-cli.zip -d $BUILD_KIT_HOME/ && \ + rm -rf cli && \ +# 3. Extract ivysettings + unzip $ECLIPSE_HOME/plugins/org.apache.ivyde.eclipse_2.5.1.final-202307031339-RELEASE/ivyde-eclipse.jar resources/microej-ivysettings-5.4.xml && \ + mkdir -p $BUILD_KIT_HOME/microej-module-repository/ && \ + mv resources/microej-ivysettings-5.4.xml $BUILD_KIT_HOME/microej-module-repository/ivysettings.xml && \ + rm -rf resources/ && \ +# 4. Set SDK version + echo 'sdk.version=5.8.1' > $BUILD_KIT_HOME/release.properties && \ + mkdir -p $HOME/.microej/build-repository-cache && \ + ln -s $HOME/.microej/build-repository-cache $BUILD_KIT_HOME/microej-build-repository/cache && \ + chown $user:$group $BUILD_KIT_HOME/microej-build-repository/cache + +# Good practice, switch back to user. +USER ${user} diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 8d31082..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2021-2022 MicroEJ Corp. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be found with this software. -node('docker') { - def image - - def platform_dir = "Platform-Espressif-ESP-WROVER-KIT-V4.1" - def platform_url = "https://github.com/MicroEJ/${platform_dir}" - def platform_tag = "2.2.0" - def platform_target = "ESP32WROVER-Platform-GNUv84_xtensa-esp32-psram-${platform_tag}" - - stage('Checkout') { - cleanWs() - checkout scm - } - - /////////////////////// - / Build of images 5.+ / - /////////////////////// - - def subfolders = sh(returnStdout: true, script: 'ls -d 5.8*').trim().split("\n") - subfolders.each { folder -> - stage("Lint check ${folder}") { - docker.image('hadolint/hadolint:latest-alpine').inside { - sh "hadolint --no-fail ${folder}/Dockerfile" - } - } - stage("Build ${folder}") { - image = docker.build("sdk:${folder}", "${folder}") - } - stage("Test: ensure sdk:${folder} can run docker") { - image.inside('-u root -v/var/run/docker.sock:/var/run/docker.sock') { - sh 'docker run --rm -t hello-world' - } - } - stage("Test(${folder}): build microej-studio-rebrand") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-studio-rebrand" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=microej-studio-rebrand -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-studio-rebrand' - sh 'cd microej-studio-rebrand && mmm publish local -Dizpack.microej.product.location=${ECLIPSE_HOME} -Dproduct.target.os=linux64 -Dpublish.main.type=zip' - sh 'ls microej-studio-rebrand/target~/artifacts/microej-studio-rebrand.zip' - } - } - stage("Test(${folder}): build microej-javalib") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-javalib" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-javalib' - sh 'cd microej-javalib && mmm publish local' - sh 'ls microej-javalib/target~/artifacts/myjavalib.jar' - } - } - stage("Test(${folder}): build addon-processor") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=addon-processor" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=addon-processor' - sh 'cd addon-processor && mmm publish local' - sh 'ls addon-processor/target~/artifacts/myjavalib.adp' - } - } - stage("Test(${folder}): build microej-javaapi") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-javaapi" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-javaapi' - sh 'cd microej-javaapi && mmm publish local' - sh 'ls microej-javaapi/target~/artifacts/myjavalib.jar' - } - } - stage("Test(${folder}): build microej-javaimpl") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-javaimpl" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-javaimpl' - sh 'cd microej-javaimpl && mmm publish local' - sh 'ls microej-javaimpl/target~/artifacts/myjavalib.rip' - } - } - stage("Test(${folder}): build microej-meta-build") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-meta-build" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-meta-build' - sh 'cd microej-meta-build && mmm publish local' - } - } - stage("Test(${folder}): build microej-mock") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=microej-mock" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=microej-mock' - sh 'cd microej-mock && mmm publish local' - } - } - stage("Test(${folder}): build artifact-repository") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=artifact-repository" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=artifact-repository' - sh 'cd artifact-repository && mmm publish local' - } - } - stage("Test(${folder}): build application") { - image.inside { - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=application" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=myjavalib -Dproject.rev=1.0.0 -Dskeleton.target.dir=application' - sh 'cd application && mmm publish local' - } - } - stage("Test(${folder}): build platform and firmware-singleapp") { - try { - image.inside { - sh "rm -rf ${platform_dir}" - sh "git clone --depth 1 --branch ${platform_tag} ${platform_url}" - sh "cd ${platform_dir}/ESP32-WROVER-Xtensa-FreeRTOS-configuration/ && mmm -v" - sh 'mmm init -D"skeleton.org=com.is2t.easyant.skeletons" -D"skeleton.module=firmware-singleapp" -D"skeleton.rev=+" -D"project.org=com.mycompany" -Dproject.module=firmware-singleapp -Dproject.rev=1.0.0 -Dskeleton.target.dir=firmware-singleapp' - sh "cd firmware-singleapp && mmm publish local -Dplatform-loader.target.platform.dir=../${platform_dir}/${platform_target}/source -Dvirtual.device.sim.only=SET" - } - } - catch (Exception e) { - echo 'Exception occurred: ' + e.toString() - sh 'cat /home/microej/.eclipse/com.is2t.microej.mpp.product.product_23.07_1473617060_linux_gtk_x86_64/configuration/*.log' - } - } - } -}