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

Remove duplicate docker build script #DBACLD-125072 #350

Merged
merged 12 commits into from
Mar 22, 2024
Merged
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ PREFIXIMAGE=odm
# Liberty Version
FROMLIBERTY=ibmcom/websphere-liberty:23.0.0.12-kernel-java17-openj9-ubi

PACKAGELIST="mpMetrics-3.0 openidconnectclient-1.0 collectiveMember-1.0 sessionCache-1.0 ldapRegistry-3.0 localConnector-1.0 mpOpenAPI-2.0 mpOpenTracing-2.0 microProfile-4.0 microProfile-1.0 microProfile-1.2 microProfile-1.3 microProfile-1.4 monitor-1.0 restConnector-1.0 requestTiming-1.0 restConnector-2.0 sessionDatabase-1.0 ssl-1.0 transportSecurity-1.0 webCache-1.0 webProfile-7.0"

# Postgres Version
FROMPOSTGRES=postgres:15
POSTGRESUID=999
6 changes: 1 addition & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build and test
on: [push]
env:
DOCKER_COMPOSE_VERSION: 1.29.2
ODM_FILE_NAME: odm-for-docker.zip
ODM_VERSION: 8.12.0.0
jobs:
Expand All @@ -15,17 +14,14 @@ jobs:
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
- run: sudo apt update
- run: sudo apt full-upgrade
- name: Get docker-compose
run: sudo curl --insecure --location --output /usr/local/bin/docker-compose --retry 5 --retry-delay 10 https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)
- run: docker-compose --version
- run: docker info
# - run: sh -c "! egrep -ri '(LICENSE[D]?).*(IBM)' --exclude='*.tar.gz' --exclude=.travis.yml --exclude-dir=licenses --exclude=index.jsp --exclude-dir=.git --exclude-dir=.github --exclude=error.jsp --exclude-dir=dockerhub ."
- run: bash build.sh
env:
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ODM_URL: ${{ secrets.ODM_URL }}
- run: sudo docker-compose up -d
- run: sudo docker compose up -d
- run: sh test/suite.sh
- name: Report Status by slack
if: always()
Expand Down
12 changes: 4 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,16 @@ 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 mpMetrics-3.0 openidconnectclient-1.0 collectiveMember-1.0 sessionCache-1.0 ldapRegistry-3.0 localConnector-1.0 \
mpOpenAPI-2.0 mpOpenTracing-2.0 microProfile-4.0 microProfile-1.0 microProfile-1.2 microProfile-1.3 microProfile-1.4 monitor-1.0 restConnector-1.0 \
requestTiming-1.0 restConnector-2.0 sessionDatabase-1.0 ssl-1.0 transportSecurity-1.0 webCache-1.0 \
webProfile-7.0 webProfile-7.0 --location=/opt/wlp"

installUtility download $PACKAGELIST --location=/opt/wlp"

echo "build ODM standard docker images..."
DOCKER_BUILDKIT=1 docker-compose -f docker-compose.yml build
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
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
DOCKER_BUILDKIT=1 docker compose -f odm-cluster.yml build
3 changes: 0 additions & 3 deletions common/script/installFeatures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# Install the driver for Derby
echo "Install the feature list for ODM on Liberty"
ROOTFEATUREDIR=/opt/wlppackage
PACKAGELIST="mpMetrics-3.0 openidconnectclient-1.0 collectiveMember-1.0 sessionCache-1.0 ldapRegistry-3.0 localConnector-1.0 \
mpOpenAPI-2.0 mpOpenTracing-2.0 microProfile-4.0 microProfile-1.0 microProfile-1.2 microProfile-1.3 microProfile-1.4 monitor-1.0 restConnector-1.0 \
requestTiming-1.0 restConnector-2.0 sessionDatabase-1.0 ssl-1.0 transportSecurity-1.0 webCache-1.0 webProfile-7.0"

if [ ! -d $ROOTFEATUREDIR/features ]; then
mkdir -p $ROOTFEATUREDIR
Expand Down
2 changes: 2 additions & 0 deletions decisioncenter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ FROM ${FROMLIBERTYBUILD} AS oidc-liberty-builder
ARG ODMDOCKERDIR
ARG CP4BAVERSION
ARG ODMVERSION
ARG PACKAGELIST
ENV ODMDOCKERDIR $ODMDOCKERDIR
ENV CP4BAVERSION $CP4BAVERSION
ENV ODMVERSION $ODMVERSION
ENV PACKAGELIST $PACKAGELIST
USER root
ENV SCRIPT /script
COPY $ODMDOCKERDIR/common/script $ODMDOCKERDIR/wlp* /opt/wlppackage/
Expand Down
2 changes: 2 additions & 0 deletions decisionserver/decisionrunner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ FROM ${FROMLIBERTYBUILD} AS oidc-liberty-builder
ARG ODMDOCKERDIR
ARG CP4BAVERSION
ARG ODMVERSION
ARG PACKAGELIST
ENV ODMDOCKERDIR $ODMDOCKERDIR
ENV CP4BAVERSION $CP4BAVERSION
ENV ODMVERSION $ODMVERSION
ENV PACKAGELIST $PACKAGELIST
USER root
ENV SCRIPT /script
COPY $ODMDOCKERDIR/common/script $ODMDOCKERDIR/wlp* /opt/wlppackage/
Expand Down
2 changes: 2 additions & 0 deletions decisionserver/decisionserverconsole/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ FROM ${FROMLIBERTYBUILD} AS oidc-liberty-builder
ARG ODMDOCKERDIR
ARG CP4BAVERSION
ARG ODMVERSION
ARG PACKAGELIST
ENV ODMDOCKERDIR $ODMDOCKERDIR
ENV CP4BAVERSION $CP4BAVERSION
ENV ODMVERSION $ODMVERSION
ENV PACKAGELIST $PACKAGELIST
USER root
ENV SCRIPT /script
COPY $ODMDOCKERDIR/common/script $ODMDOCKERDIR/wlp* /opt/wlppackage/
Expand Down
2 changes: 2 additions & 0 deletions decisionserver/decisionserverruntime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ FROM ${FROMLIBERTYBUILD} AS oidc-liberty-builder
ARG ODMDOCKERDIR
ARG CP4BAVERSION
ARG ODMVERSION
ARG PACKAGELIST
ENV ODMDOCKERDIR $ODMDOCKERDIR
ENV CP4BAVERSION $CP4BAVERSION
ENV ODMVERSION $ODMVERSION
ENV PACKAGELIST $PACKAGELIST
USER root
ENV SCRIPT /script
COPY $ODMDOCKERDIR/common/script $ODMDOCKERDIR/wlp* /opt/wlppackage/
Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
dbserver:
image: $REPOSITORY/dbserver:$ODMVERSION
Expand Down Expand Up @@ -39,6 +38,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
depends_on:
Expand All @@ -60,6 +60,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
- odm-decisionserverconsole
Expand All @@ -82,6 +83,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMLIBERTYBUILD=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- PACKAGELIST=$PACKAGELIST
environment:
- DECISIONSERVERCONSOLE_NAME=odm-decisionserverconsole
links:
Expand All @@ -107,6 +109,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
depends_on:
Expand Down
4 changes: 4 additions & 0 deletions odm-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
environment:
Expand All @@ -57,6 +58,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
- odm-decisionserverconsole
Expand All @@ -76,6 +78,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
- odm-decisionserverconsole
Expand All @@ -97,6 +100,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- FROMLIBERTYBUILD=$FROMLIBERTY
- PACKAGELIST=$PACKAGELIST
links:
- dbserver
depends_on:
Expand Down
1 change: 1 addition & 0 deletions odm-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- FROMLIBERTY=$FROMLIBERTY
- FROMLIBERTYBUILD=$FROMLIBERTY
- FROMDOCKERBUILD=$FROMDOCKERBUILD
- PACKAGELIST=$PACKAGELIST
user: "1001:0"
environment:
- SAMPLE=false
Expand Down
2 changes: 2 additions & 0 deletions standalone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ RUN set -ex; \

FROM ${FROMLIBERTYBUILD} AS liberty-builder
ARG ODMDOCKERDIR
ARG PACKAGELIST
ENV ODMDOCKERDIR ${ODMDOCKERDIR}
ENV PACKAGELIST $PACKAGELIST
USER root
ENV SCRIPT /script
ENV APPS /config/apps
Expand Down