forked from firstBitMarksistskaya/onec-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-edt-agent.sh
executable file
·58 lines (48 loc) · 1.69 KB
/
build-edt-agent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD $DOCKER_USERNAME
if [ $DOCKER_SYSTEM_PRUNE = 'true' ] ; then
docker system prune -af
fi
last_arg='.'
if [ $NO_CACHE = 'true' ] ; then
last_arg='--no-cache .'
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 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-editing-plugin \
--build-arg BASE_TAG=$edt_escaped \
-t $DOCKER_USERNAME/edt-agent:$edt_escaped \
-f jenkins-agent/Dockerfile \
$last_arg
docker push $DOCKER_USERNAME/edt-agent:$edt_escaped