Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Правка образа под EDT #14

Open
wants to merge 1 commit into
base: feature/first-bit
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .onec.env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
export ONEC_USERNAME=onec
export ONEC_PASSWORD=onec
export ONEC_VERSION=8.3.18.1520
export EDT_VERSION=2021.2.7
export EDT_VERSION=2021.3.4

export DOCKER_USERNAME=jugatsu
export DOCKER_LOGIN=login
export DOCKER_PASSWORD=password

export DOCKER_SYSTEM_PRUNE=false
export NO_CACHE=false

export JDK_VERSION=11
27 changes: 25 additions & 2 deletions build-edt-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,41 @@ fi
edt_version=$EDT_VERSION
edt_escaped="${edt_version// /_}"

docker build \
--pull \
--build-arg JDK_VERSION=$JDK_VERSION \
-t $DOCKER_USERNAME/liberica-jdk-full:$JDK_VERSION \
-f jdk/liberica-full.Dockerfile \
$last_arg

docker push $DOCKER_USERNAME/liberica-jdk-full:$JDK_VERSION

docker build \
--pull \
--build-arg ONEC_USERNAME=$ONEC_USERNAME \
--build-arg ONEC_PASSWORD=$ONEC_PASSWORD \
--build-arg EDT_VERSION="$EDT_VERSION" \
--build-arg EDT_VERSION=$EDT_VERSION \
--build-arg DOCKER_USERNAME=$DOCKER_USERNAME \
--build-arg BASE_IMAGE="liberica-jdk-full" \
--build-arg BASE_TAG="11" \
-t $DOCKER_USERNAME/edt:$edt_escaped \
-f edt/Dockerfile \
$last_arg

# тут для каждого плагина просто наследуем предыдущий
docker build \
--build-arg EDT_VERSION=$EDT_VERSION \
--build-arg DOCKER_USERNAME=$DOCKER_USERNAME \
--build-arg BASE_IMAGE="edt" \
--build-arg REPOSITORY_URL='https://marmyshev.gitlab.io/edt-editing/update/' \
--build-arg PACKAGE_NAMES='org.mard.dt.editing.feature.feature.group' \
-t $DOCKER_USERNAME/edt-editing-plugin:$edt_escaped \
-f edt/edt-plugins.Dockerfile \
$last_arg

docker build \
--build-arg DOCKER_USERNAME=$DOCKER_USERNAME \
--build-arg BASE_IMAGE=edt \
--build-arg BASE_IMAGE=edt-editing-plugin \
--build-arg BASE_TAG=$edt_escaped \
-t $DOCKER_USERNAME/edt-agent:$edt_escaped \
-f jenkins-agent/Dockerfile \
Expand Down
2 changes: 1 addition & 1 deletion edt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL maintainer="Nikita Gryzlov <[email protected]>, FirstBit"

ARG ONEC_USERNAME
ARG ONEC_PASSWORD
ARG EDT_VERSION=2021.3
ARG EDT_VERSION=2021.3.4

ENV installer_type=edt \
ONEC_VERSION=${EDT_VERSION}
Expand Down
16 changes: 16 additions & 0 deletions edt/edt-plugins.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG EDT_VERSION=2021.3.4
ARG BASE_IMAGE=edt
ARG DOCKER_USERNAME

FROM ${DOCKER_USERNAME}/${BASE_IMAGE}:${EDT_VERSION}

ARG REPOSITORY_URL
ARG PACKAGE_NAMES

RUN edt_path=$(ring edt locations list) \
&& $edt_path/1cedt \
-clean -purgeHistory \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository ${REPOSITORY_URL} \
-installIUs ${PACKAGE_NAMES}
24 changes: 24 additions & 0 deletions jdk/liberica-full.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM debian:11-slim

ARG JDK_VERSION=11

WORKDIR /tmp

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
# downloader dependencies
curl \
gpg \
gpg-agent \
ca-certificates \
locales \
&& curl -s https://download.bell-sw.com/pki/GPG-KEY-bellsoft | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/bellsoft.gpg --import \
&& echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" | tee /etc/apt/sources.list.d/bellsoft.list \
&& chmod 755 /etc/apt/trusted.gpg.d/bellsoft.gpg \
&& apt-get update \
&& apt-get install bellsoft-java${JDK_VERSION}-full --no-install-recommends -y \
&& rm -rf \
/var/lib/apt/lists/* \
/var/cache/debconf \
/tmp/* \
&& localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8