-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathbuild.sh
executable file
·40 lines (31 loc) · 1.28 KB
/
build.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
#!/bin/bash
set -ex
echo "start building odm-ondocker..."
echo "current build directory:"
pwd
cd ..
mkdir ${HOME}/.cache
echo "ODM distribution: Starting download..."
ODM_ZIP_URL=${ODM_URL}/${ODM_VERSION}/icp-docker-compose-build-images-${ODM_VERSION}.zip
curl ${ODM_ZIP_URL} -u "${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWORD}" -o ${HOME}/.cache/${ODM_FILE_NAME}
echo "ODM distribution: download finished..."
echo "unzip odm distribution..."
unzip -q ${HOME}/.cache/${ODM_FILE_NAME}
echo "copy odm-ondocker into ODM distribution..."
cp -R odm-ondocker install
cd install/odm-ondocker
cp resources/.dockerignore ../
# Optimizing the build to download webprofile package.
source .env
echo "Using this properties from .env file."
cat .env
docker run --user 'root' -v $PWD/wlp:/opt/wlp $FROMLIBERTY /bin/sh -c "mkdir -p /opt/wlp ;\
installUtility download $PACKAGELIST --location=/opt/wlp"
echo "build ODM standard docker images..."
DOCKER_BUILDKIT=1 docker compose -f docker-compose.yml build
echo "build ODM standalone docker image..."
DOCKER_BUILDKIT=1 docker compose -f odm-standalone.yml build
# echo "build ODM standalone tomcat8 docker image..."
# docker-compose -f odm-standalone-tomcat.yml build
echo "build ODM cluster docker images..."
DOCKER_BUILDKIT=1 docker compose -f odm-cluster.yml build