From e0498d91357926a2a67e2d5a64c81b190e2aa144 Mon Sep 17 00:00:00 2001 From: Chris Hubbard Date: Wed, 17 Jul 2024 10:42:43 -0400 Subject: [PATCH] Update how AppBuilders is installed --- Dockerfile | 16 +++++++++++++++- ansible/roles/app-builders/tasks/main.yml | 16 ++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 938e0ac..c97938c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +FROM ghcr.io/sillsdev/app-builders:latest as builder + FROM --platform=linux/amd64 phusion/baseimage:jammy-1.0.1 LABEL maintainer="chris_hubbard@sil.org" LABEL refreshed_at="2024-01-11" @@ -12,6 +14,18 @@ RUN apt-get update && apt-get install -y\ pip install ansible &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/* +RUN mkdir -p /app-builders +WORKDIR /app-builders + +COPY --from=builder / /app-builders/ + +#RUN tar -xvf /app-builders.tgz && rm /app-builders.tgz &&\ +RUN chmod +x /app-builders/*.sh &&\ + ln -s /app-builders/sab.sh /usr/local/bin/scripture-app-builder &&\ + ln -s /app-builders/rab.sh /usr/local/bin/reading-app-builder &&\ + ln -s /app-builders/dab.sh /usr/local/bin/dictionary-app-builder &&\ + ln -s /app-builders/kab.sh /usr/local/bin/keyboard-app-builder + COPY ansible /ansible WORKDIR /ansible @@ -19,7 +33,7 @@ WORKDIR /ansible RUN mkdir -p /etc/ansible && echo local > /etc/ansible/hosts &&\ ansible-playbook playbook.yml -c local &&\ apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/* /tmp/*.* /App \Builder/Scripture\ Apps/App\ Projects/* /tmp/App\ Builder/* /root/App\ Builder/Scripture\ Apps/PWA\ Output - +# #COPY patch /patch #WORKDIR /patch # diff --git a/ansible/roles/app-builders/tasks/main.yml b/ansible/roles/app-builders/tasks/main.yml index 2253a36..d00ae15 100644 --- a/ansible/roles/app-builders/tasks/main.yml +++ b/ansible/roles/app-builders/tasks/main.yml @@ -6,11 +6,12 @@ shell: echo android-sdk-installer android-sdk-installer/accepted-android-sdk-eula boolean true | debconf-set-selections -v - name: Install packages - apt: + apt: pkg: - android-sdk-installer - - app-builders - state: latest + - openjfx + # - app-builders // changed to copying from ghcr.io/sillsdev/app-builders docker container + state: latest update_cache: yes - name: Make directory for files @@ -28,9 +29,8 @@ - about.txt - ab-001-black-144.png - ab-001-black-72.png +# - name: Prime gradle cache with build +# shell: HOME=/root scripture-app-builder -new -n web -p org.ebible -b /root/prime/eng-web_usfm.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -- name: Prime gradle cache with build - shell: HOME=/root scripture-app-builder -new -n web -p org.ebible -b /root/prime/eng-web_usfm.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build - -- name: Prime npm cache with build - shell: HOME=/root scripture-app-builder -new -n bsb -p org.bsb -b /root/prime/eng-bsb_usx.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -build-modern-pwa +# - name: Prime npm cache with build +# shell: HOME=/root scripture-app-builder -new -n bsb -p org.bsb -b /root/prime/eng-bsb_usx.zip -ks /root/prime/keystore_prime.keystore -i /root/prime/keystore_prime.txt -a /root/prime/about.txt -ic /root/prime/ab-001-black-144.png -ic /root/prime/ab-001-black-72.png -fp build=/tmp/build -build-modern-pwa