diff --git a/4.1.5/CHANGELOG.md b/4.1.5/CHANGELOG.md
new file mode 100644
index 0000000..9c79f56
--- /dev/null
+++ b/4.1.5/CHANGELOG.md
@@ -0,0 +1,23 @@
+# 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.1.0] - 2021-12-02
+### Fixed
+- Add missing dependencies to build MicroEJ Platforms with MICROEJ SDK 4.1.5
+
+### Changed
+- Change path for buildkit home to ``/opt/tool-cli-build``
+- Update user and group to ``microej`` and ``microej``
+
+## [1.0.0] - 2021-10-07
+### Added
+- Add Dockerfile for sdk 4.1.5
+
+---
+_Markdown_
+_Copyright 2021 MicroEJ Corp. All rights reserved._
+_This library is provided in source code for use, modification and test, subject to license terms._
+_Any modification of the source code will break MicroEJ Corp. warranties on the whole library._
\ No newline at end of file
diff --git a/4.1.5/Dockerfile b/4.1.5/Dockerfile
index 48be716..20a5d67 100644
--- a/4.1.5/Dockerfile
+++ b/4.1.5/Dockerfile
@@ -24,7 +24,8 @@ RUN apt-get update && \
ssh \
sshpass \
# Required for Eclipse-based SDK to run
- libwebkit2gtk-4.0-37 && \
+ libxtst6 \
+ libgtk2.0-0 && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
@@ -37,25 +38,22 @@ RUN echo 'ACTION!="add", GOTO="usbdongle_end"\n' \
'LABEL="usbdongle_end"' > /etc/udev/rules.d/91-usbdongle.rules
# Set the new user parameter.
-ARG user=jenkins
-ARG group=jenkins
+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}
-# Good practice, switch back to user.
-USER ${user}
-
# Set env
ENV HOME /home/${user}
-ENV ECLIPSE_HOME=$HOME/ECLIPSE
+ENV ECLIPSE_HOME=/opt/eclipse
ENV MICROEJ_BUILD_JDK_HOME=$JAVA_HOME
-ENV MICROEJ_BUILDKIT_HOME=${HOME}/Tool-CommandLineBuild
+ENV MICROEJ_BUILDKIT_HOME=/opt/tool-cli-build
ENV PATH=$MICROEJ_BUILDKIT_HOME:$PATH
# Set workdir
-WORKDIR ${HOME}
+WORKDIR $HOME
# I) Install SDK
RUN curl -O https://repository.microej.com/packages/SDK/4.1.5/zip/microej-sdk-4.1.5-linux_x86_64.zip && \
@@ -63,20 +61,25 @@ RUN curl -O https://repository.microej.com/packages/SDK/4.1.5/zip/microej-sdk-4.
unzip microej-sdk-4.1.5-linux_x86_64.zip -d $ECLIPSE_HOME && \
rm -f microej-sdk-4.1.5-linux_x86_64.zip && \
# II) Install Tool-CommandLineBuild
- git clone --recursive https://github.com/MicroEJ/Tool-CommandLineBuild.git && \
+ git clone --recursive https://github.com/MicroEJ/Tool-CommandLineBuild.git $MICROEJ_BUILDKIT_HOME && \
# III) Extract BuildKit from SDK
- mkdir -p Tool-CommandLineBuild/buildKit/ && \
- unzip ${ECLIPSE_HOME}/plugins/com.is2t.eclipse.plugin.easyant4e_1.7.3.20180621-1638.jar 'lib/*' -d Tool-CommandLineBuild/buildKit/ant && \
+ mkdir -p $MICROEJ_BUILDKIT_HOME/buildKit/ && \
+ unzip ${ECLIPSE_HOME}/plugins/com.is2t.eclipse.plugin.easyant4e_1.7.3.20180621-1638.jar 'lib/*' -d $MICROEJ_BUILDKIT_HOME/buildKit/ant && \
unzip ${ECLIPSE_HOME}/plugins/com.is2t.eclipse.plugin.easyant4e.offlinerepo_1.6.0.20180621-1638.jar repositories/is2t_repo.zip && \
- unzip repositories/is2t_repo.zip -d Tool-CommandLineBuild/buildKit/microej-build-repository && \
+ unzip repositories/is2t_repo.zip -d $MICROEJ_BUILDKIT_HOME/buildKit/microej-build-repository && \
rm -rf repositories && \
# IV) Install jdtCompiler from SDK 20.12
curl -O https://repository.microej.com/packages/SDK/20.12/zip/microej-sdk-20.12-linux_x86_64.zip && \
unzip microej-sdk-20.12-linux_x86_64.zip 'plugins/com.is2t.eclipse.plugin.easyant4e_2.3.1.202012101611.jar' && \
- unzip plugins/com.is2t.eclipse.plugin.easyant4e_2.3.1.202012101611.jar lib/jdtCompilerAdapter.jar lib/org.eclipse.jdt.compiler.apt.jar lib/org.eclipse.jdt.core.jar -d Tool-CommandLineBuild/buildKit/ant/ && \
+ unzip plugins/com.is2t.eclipse.plugin.easyant4e_2.3.1.202012101611.jar lib/jdtCompilerAdapter.jar lib/org.eclipse.jdt.compiler.apt.jar lib/org.eclipse.jdt.core.jar -d $MICROEJ_BUILDKIT_HOME/buildKit/ant/ && \
rm -rf microej-sdk-20.12-linux_x86_64.zip plugins && \
# V) Configure BuildKit
- echo "\neasyant.inject.build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter" >> Tool-CommandLineBuild/local-build.properties && \
- echo "\neasyant.inject.eclipse.home=\"${ECLIPSE_HOME}\"" >> Tool-CommandLineBuild/local-build.properties && \
- echo 'sdk.version=4.1.5' > $MICROEJ_BUILDKIT_HOME/release.properties
+ echo "\neasyant.inject.build.compiler=org.eclipse.jdt.core.JDTCompilerAdapter" >> $MICROEJ_BUILDKIT_HOME/local-build.properties && \
+ echo "\neasyant.inject.eclipse.home=${ECLIPSE_HOME}" >> $MICROEJ_BUILDKIT_HOME/local-build.properties && \
+ echo 'sdk.version=4.1.5' > $MICROEJ_BUILDKIT_HOME/release.properties && \
+ chown $user:$group $MICROEJ_BUILDKIT_HOME/local-build.properties && \
+ chown -R $user:$group $MICROEJ_BUILDKIT_HOME/ivy && \
+ mkdir $MICROEJ_BUILDKIT_HOME/cache && chown $user:$group $MICROEJ_BUILDKIT_HOME/cache
+# Good practice, switch back to user.
+USER ${user}
\ No newline at end of file
diff --git a/5.4.1/CHANGELOG.md b/5.4.1/CHANGELOG.md
new file mode 100644
index 0000000..9e91dd2
--- /dev/null
+++ b/5.4.1/CHANGELOG.md
@@ -0,0 +1,20 @@
+# 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.1.0] - 2021-12-02
+### Changed
+- Change path for buildkit home to ``/opt/buildKit``
+- Update user and group to ``microej`` and ``microej``
+
+## [1.0.0] - 2021-10-07
+### Added
+- Add Dockerfile for sdk 5.4.1
+
+---
+_Markdown_
+_Copyright 2021 MicroEJ Corp. All rights reserved._
+_This library is provided in source code for use, modification and test, subject to license terms._
+_Any modification of the source code will break MicroEJ Corp. warranties on the whole library._
\ No newline at end of file
diff --git a/5.4.1/Dockerfile b/5.4.1/Dockerfile
index 24c5768..4b3833f 100644
--- a/5.4.1/Dockerfile
+++ b/5.4.1/Dockerfile
@@ -37,20 +37,17 @@ RUN echo 'ACTION!="add", GOTO="usbdongle_end"\n' \
'LABEL="usbdongle_end"' > /etc/udev/rules.d/91-usbdongle.rules
# Set the new user parameter.
-ARG user=jenkins
-ARG group=jenkins
+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}
-# Good practice, switch back to user.
-USER ${user}
-
# Set env
ENV HOME /home/${user}
-ENV ECLIPSE_HOME=$HOME/ECLIPSE
-ENV BUILD_KIT_HOME=$HOME/buildKit
+ENV ECLIPSE_HOME=/opt/eclipse
+ENV BUILD_KIT_HOME=/opt/buildKit
ENV PATH=$BUILD_KIT_HOME/bin:$PATH
# Set workdir
@@ -63,6 +60,7 @@ RUN curl -O https://repository.microej.com/packages/SDK/21.03/zip/microej-sdk-21
rm -f microej-sdk-21.03-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.4.1
# 1. Uninstall SDK 5.4.0
@@ -95,6 +93,10 @@ RUN curl -O https://repository.microej.com/packages/SDK/21.03/zip/microej-sdk-21
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.4.1' > $BUILD_KIT_HOME/release.properties
-
+ echo 'sdk.version=5.4.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}
\ No newline at end of file
diff --git a/5.5.0/CHANGELOG.md b/5.5.0/CHANGELOG.md
new file mode 100644
index 0000000..5b67c28
--- /dev/null
+++ b/5.5.0/CHANGELOG.md
@@ -0,0 +1,15 @@
+# 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.1.0] - 2021-12-02
+### Added
+- Add Dockerfile for sdk 5.5.0 based on 5.4.1
+
+---
+_Markdown_
+_Copyright 2021 MicroEJ Corp. All rights reserved._
+_This library is provided in source code for use, modification and test, subject to license terms._
+_Any modification of the source code will break MicroEJ Corp. warranties on the whole library._
diff --git a/5.5.0/Dockerfile b/5.5.0/Dockerfile
new file mode 100644
index 0000000..56ba8ee
--- /dev/null
+++ b/5.5.0/Dockerfile
@@ -0,0 +1,79 @@
+# Dockerfile
+#
+# Copyright 2021 MicroEJ Corp. All rights reserved.
+# This library is provided in source code for use, modification and test, subject to license terms.
+# Any modification of the source code will break MicroEJ Corp. warranties on the whole library.
+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) 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.202111121727.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.4.0.202111121727.jar cli/mmm-cli.zip && \
+ unzip cli/mmm-cli.zip -d $BUILD_KIT_HOME/ && \
+ rm -rf cli && \
+# 3. Extract ivysettings
+ unzip $ECLIPSE_HOME/plugins/com.is2t.eclipse.plugin.easyant4e_2.4.0.202111121727.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.5.0' > $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}
\ No newline at end of file
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
deleted file mode 100644
index 7d12ea7..0000000
--- a/CHANGELOG.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-..
- Copyright 2021 MicroEJ Corp. All rights reserved.
- This library is provided in source code for use, modification and test, subject to license terms.
- Any modification of the source code will break MicroEJ Corp. warranties on the whole library.
-
-===========
- Changelog
-===========
-
-----------------------
- [1.0.0] - 2021-10-07
-----------------------
-
-- Add ``Dockerfile`` of MicroEJ BuildKit Docker Image for MicroEJ SDK 4.1.5 and 5.4.1
diff --git a/Jenkinsfile b/Jenkinsfile
index db71f42..bb92ffb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,181 +1,153 @@
// Copyright 2021 MicroEJ Corp. All rights reserved.
// This library is provided in source code for use, modification and test, subject to license terms.
// Any modification of the source code will break MicroEJ Corp. warranties on the whole library.
-pipeline {
- agent { label 'docker' }
- stages {
- stage('Git clean') {
- steps { sh 'git clean -fdx' }
- }
- stage('Lint check 5.4.1') {
- agent { docker {
- image 'hadolint/hadolint:latest-alpine'
- reuseNode true
- }
- }
- steps {
- sh 'hadolint --no-fail 5.4.1/Dockerfile'
- }
- }
- stage('Lint check 4.1.5') {
- agent { docker {
- image 'hadolint/hadolint:latest-alpine'
- reuseNode true
- }
- }
- steps {
- sh 'hadolint --no-fail 4.1.5/Dockerfile'
- }
- }
- stage('Build 5.4.1') {
- steps {
- sh 'docker build -t sdk:5.4.1 5.4.1'
- }
- }
- stage('Test: ensure sdk:5.4.1 can run docker') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- args '-u root -v/var/run/docker.sock:/var/run/docker.sock'
- }
- }
- steps { sh 'docker run --rm -t hello-world' }
- }
- stage('Build 4.1.5') {
- steps {
- sh 'docker build -t sdk:4.1.5 4.1.5'
- }
- }
- stage('Test: ensure sdk:4.1.5 can run docker') {
- agent { docker {
- image 'sdk:4.1.5'
- reuseNode true
- args '-u root -v/var/run/docker.sock:/var/run/docker.sock'
- }
- }
- steps { sh 'docker run --rm -t hello-world' }
- }
- stage('Test: build microej-studio-rebrand') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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 -Dizpack.microej.product.location=${ECLIPSE_HOME} -Dproduct.target.os=linux64'
- }
- }
- stage('Test: build microej-javalib') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build addon-processor') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build microej-javaapi') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build microej-javaimpl') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build microej-meta-build') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build microej-mock') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build artifact-repository') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build application') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
-
- steps {
- 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'
- }
- }
- stage('Test: build platform and firmware-singleapp') {
- agent { docker {
- image 'sdk:5.4.1'
- reuseNode true
- }
- }
- steps {
- sh 'rm -rf Platform-Espressif-ESP-WROVER-KIT-V4.1'
- sh 'git clone --depth 1 https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT-V4.1'
- sh 'cd Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/ && mmm'
- 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 -D"platform-loader.target.platform.dir=$(pwd)/../Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32WROVER-Platform-GNUv52b96_xtensa-esp32-psram-1.7.1/source" -D"virtual.device.sim.only=SET"'
- }
- }
- }
-}
+node('docker') {
+ def image
+
+ stage('Checkout') {
+ cleanWs()
+ checkout scm
+ }
+ stage('Lint check 4.1.5') {
+ docker.image('hadolint/hadolint:latest-alpine').inside {
+ sh 'hadolint --no-fail 4.1.5/Dockerfile'
+ }
+ }
+ stage('Build 4.1.5') {
+ image = docker.build("sdk:4.1.5", "4.1.5")
+ }
+ stage('Test: ensure sdk:4.1.5 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: Prepare central-repo') {
+ image.inside {
+ sh 'mkdir central-repo'
+ sh 'curl -LO https://developer.microej.com/4.1/ivy/microej-4.1-1.10.0.zip'
+ sh 'unzip microej-4.1-1.10.0.zip -d central-repo'
+ }
+ }
+ stage('Test: snapshot is correctly published') {
+ image.inside {
+ sh 'mkdir snapshot'
+ sh 'sed -e s~^microej.central.repository.dir=.*~microej.central.repository.dir=$(pwd)/central-repo~ $MICROEJ_BUILDKIT_HOME/local-build.properties > /tmp/local-build && cat /tmp/local-build > $MICROEJ_BUILDKIT_HOME/local-build.properties'
+ sh 'sed -e s~^snapshot.repository.dir=.*~snapshot.repository.dir=$(pwd)/snapshot~ $MICROEJ_BUILDKIT_HOME/local-build.properties > /tmp/local-build && cat /tmp/local-build > $MICROEJ_BUILDKIT_HOME/local-build.properties'
+ sh 'rm -rf Demo-Widget'
+ sh 'git clone --branch 6.1.1 https://github.com/MicroEJ/Demo-Widget.git'
+ sh 'build_module_local.sh Demo-Widget/com.microej.demo.widget/ snapshot'
+ sh 'ls snapshot/com/microej/demo/widget/6.1.1-RC*/ivy-6.1.1-RC*.xml'
+ }
+ }
+ stage('Test: release is correctly published') {
+ image.inside {
+ sh 'mkdir release'
+ sh 'sed -e s~^microej.central.repository.dir=.*~microej.central.repository.dir=$(pwd)/central-repo~ $MICROEJ_BUILDKIT_HOME/local-build.properties > /tmp/local-build && cat /tmp/local-build > $MICROEJ_BUILDKIT_HOME/local-build.properties'
+ sh 'sed -e s~^release.repository.dir=.*~release.repository.dir=$(pwd)/release~ $MICROEJ_BUILDKIT_HOME/local-build.properties > /tmp/local-build && cat /tmp/local-build > $MICROEJ_BUILDKIT_HOME/local-build.properties'
+ sh 'echo "skip.license.checker=true\nskip.readme.checker=true\nskip.changelog.checker=true" > build.properties'
+ sh 'build_module_local.sh Demo-Widget/com.microej.demo.widget/ release build.properties'
+ sh 'ls release/com/microej/demo/widget/6.1.1/ivy-6.1.1.xml'
+ }
+ }
+ stage('Test: build platform') {
+ image.inside {
+ sh 'rm -rf Platform-Espressif-ESP-WROVER-KIT-V4.1'
+ sh 'git clone --depth 1 https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT-V4.1'
+ // Remove mccom-install not provided by SDK:4.1.5
+ sh 'sed \'/mccom-install/d\' -i Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/module.ivy'
+ // Override mccom-install targets with empty ones
+ sh 'sed \'/\' -i Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/module.ant'
+ sh 'sed \'/\' -i Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/module.ant'
+ // Add microEJCentral to the list of resolvers to fetch the dependencies
+ sh 'sed \'//a \' -i $MICROEJ_BUILDKIT_HOME/ivy/ivysettings.xml'
+ // This fails because we don't have an eval license, but the build per see is started with eclipse
+ sh 'build_module_local.sh Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/ | grep "No license found"'
+ }
+ }
+
+ // For each directory building a 5.+ image
+ def subfolders = sh(returnStdout: true, script: 'ls -d 5.*').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") {
+ image.inside {
+ sh 'rm -rf Platform-Espressif-ESP-WROVER-KIT-V4.1'
+ sh 'git clone --depth 1 https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT-V4.1'
+ sh 'cd Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32-WROVER-Xtensa-FreeRTOS-configuration/ && mmm'
+ 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 -D"platform-loader.target.platform.dir=$(pwd)/../Platform-Espressif-ESP-WROVER-KIT-V4.1/ESP32WROVER-Platform-GNUv52b96_xtensa-esp32-psram-1.7.1/source" -D"virtual.device.sim.only=SET"'
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..70647da
--- /dev/null
+++ b/README.md
@@ -0,0 +1,114 @@
+![SDK 5.4 Compatible](https://shields.microej.com/endpoint?url=https://repository.microej.com/packages/badges/sdk_5.4.json)
+
+![SDK 4.1 Compatible](https://shields.microej.com/endpoint?url=https://repository.microej.com/packages/badges/sdk_4.1.json)
+
+# Docker for MicroEJ BuildKit SDK
+
+## Overview
+
+This is the git repository to build the MicroEJ BuildKit Docker Image
+for various MicroEJ SDK versions.
+
+## Documentation
+
+All images referenced in this document are available in our [Docker Hub repository](https://hub.docker.com/u/microej/).
+You can also build them yourself following build instruction bellow and our [Github repository](https://github.com/MicroEJ/Tool-SDK-Docker).
+
+### MicroEJ SDK version `5.4.1` and above
+
+For MicroEJ SDK version `5.4.1` and above, please refer to
+.
+
+Start the image for interactive usage:
+
+``` console
+$ docker run --rm -it microej/sdk:5.4.1 bash
+```
+
+Build a project from a local folder:
+
+``` console
+$ docker run --rm -v PATH/TO/PROJECT:/project -w /project microej/sdk:5.4.1 mmm build
+```
+
+You can also build the image yourself from `Dockerfile`:
+
+``` console
+$ docker build -t microej/sdk:5.4.1 5.4.1
+```
+
+### MicroEJ SDK version `4.1.5` to `5.3.1`
+
+For MicroEJ SDK version `4.1.5` to `5.3.1`, please refer to
+.
+
+Start the image for interactive usage:
+
+``` console
+$ docker run --rm -it microej/sdk:4.1.5 bash
+```
+
+Build a project from a local folder:
+
+``` console
+$ docker run --rm -v PATH/TO/PROJECT:/project -w /project microej/sdk:4.1.5 build_module_local.sh ./
+```
+
+You can also build the image yourself from `Dockerfile`:
+
+``` console
+$ docker build -t microej/sdk:4.1.5 4.1.5
+```
+
+### Automated tests
+
+A Jenkinsfile is at the root of this project to automatically test project Dockerfiles. You can launch it using Jenkins CI. \
+We followed the Jenkins recommendations to write this Jenkinsfile : [Using Docker with Pipeline](https://www.jenkins.io/doc/book/pipeline/docker/). \
+If you want to run it, you need to have at least one node labelled `docker`.
+
+## F.A.Q
+
+### How can I add my custom certificate to fetch my company dependencies using mmm ?
+
+You can either :
+
+#### Update existing keystore
+
+Add your custom CA certificate to the docker image by adding these lines
+to the `Dockerfile` you want to build :
+
+``` console
+USER root
+COPY company.cer $JAVA_HOME/jre/lib/security
+RUN \
+ cd $JAVA_HOME/jre/lib/security \
+ && keytool -keystore cacerts -storepass changeit -noprompt -trustcacerts -importcert -alias companycert -file company.cer
+```
+
+#### Use custom keystore
+
+Mount your keystore using -v in the docker container and use it with mmm
+by adding `-Djavax.net.ssl.trustStore=keystore_path_in_container` to
+your build
+
+### How can I use my custom ivysettings to use my company maven repository ?
+
+The recommended way to do that is to mount your ivysettings into your
+docker container and use MMM-CLI with parameter `-r` to specify the
+module repository settings file location.
+
+Please refer to [MicroEJ Module Manager
+documentation](https://docs.microej.com/en/latest/SDKUserGuide/mmm.html)
+for more information.
+
+## Where to get help?
+
+- [MicroEJ Forum](https://forum.microej.com)
+- [MicroEJ Documentation Center](https://docs.microej.com)
+- [MicroEJ Technical Hot-line](https://www.microej.com/contact/#form_2)
+
+---
+_Markdown_
+_Copyright 2021 MicroEJ Corp. All rights reserved._
+_This library is provided in source code for use, modification and test, subject to license terms._
+_Any modification of the source code will break MicroEJ Corp. warranties on the whole library._
\ No newline at end of file
diff --git a/README.rst b/README.rst
deleted file mode 100644
index 9f2ea43..0000000
--- a/README.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-..
- Copyright 2021 MicroEJ Corp. All rights reserved.
- This library is provided in source code for use, modification and test, subject to license terms.
- Any modification of the source code will break MicroEJ Corp. warranties on the whole library.
-
-.. image:: https://shields.microej.com/endpoint?url=https://repository.microej.com/packages/badges/sdk_5.4.json
- :alt: SDK 5.4 Compatible
-
-.. image:: https://shields.microej.com/endpoint?url=https://repository.microej.com/packages/badges/sdk_4.1.json
- :alt: SDK 4.1 Compatible
-
-=================================
- Docker for MicroEJ BuildKit SDK
-=================================
-
-Overview
-========
-
-This is the git repository to build the MicroEJ BuildKit Docker Image for various MicroEJ SDK versions.
-
-Documentation
-=============
-
-MicroEJ SDK version ``5.4.1`` and above
----------------------------------------
-
-For MicroEJ SDK version ``5.4.1`` and above, please refer to https://docs.microej.com/en/latest/ApplicationDeveloperGuide/mmm.html#command-line-interface.
-
-Build the image from ``Dockerfile``:
-
-.. code-block:: console
-
- $ docker build -t sdk:5.4.1 5.4.1
-
-Start the image for interactive usage:
-
-.. code-block:: console
-
- $ docker run --rm -it sdk:5.4.1 bash
-
-Build a project from a local folder:
-
-.. code-block:: console
-
- $ docker run --rm -v PATH/TO/PROJECT:/project -w /project sdk:5.4.1 mmm build
-
-MicroEJ SDK version ``4.1.5`` to ``5.3.1``
-------------------------------------------
-
-For MicroEJ SDK version ``4.1.5`` to ``5.3.1``, please refer to https://github.com/MicroEJ/Tool-CommandLineBuild.
-
-Build the image from ``Dockerfile``:
-
-.. code-block:: console
-
- $ docker build -t sdk:4.1.5 4.1.5
-
-Start the image for interactive usage:
-
-.. code-block:: console
-
- $ docker run --rm -it sdk:4.1.5 bash
-
-Build a project from a local folder:
-
-.. code-block:: console
-
- $ docker run --rm -v PATH/TO/PROJECT:/project -w /project sdk:4.1.5 build_module_local.sh ./
-
-Automated tests
----------------
-
-| A Jenkinsfile is at the root of this project to automatically test project Dockerfiles. You can launch it using Jenkins CI.
-| We followed the Jenkins recommendations to write this Jenkinsfile : `Using Docker with Pipeline `_.
-| If you want to run it, you need to have at least one node labelled "docker".
-
-Where to get help?
-==================
-
-- `MicroEJ Forum `_
-- `MicroEJ Documentation Center `_
-- `MicroEJ Technical Hot-line `_