Skip to content

Commit

Permalink
Version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroEJ GitHub Delivery committed Dec 3, 2021
1 parent 8170fe4 commit 6fc08cc
Show file tree
Hide file tree
Showing 10 changed files with 432 additions and 300 deletions.
23 changes: 23 additions & 0 deletions 4.1.5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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._
37 changes: 20 additions & 17 deletions 4.1.5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -37,46 +38,48 @@ 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 && \
mkdir -p $ECLIPSE_HOME && \
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}
20 changes: 20 additions & 0 deletions 5.4.1/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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._
20 changes: 11 additions & 9 deletions 5.4.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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}
15 changes: 15 additions & 0 deletions 5.5.0/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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._
79 changes: 79 additions & 0 deletions 5.5.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
14 changes: 0 additions & 14 deletions CHANGELOG.rst

This file was deleted.

Loading

0 comments on commit 6fc08cc

Please sign in to comment.