Skip to content

Commit

Permalink
Update how AppBuilders is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvire committed Jul 17, 2024
1 parent f03f12e commit 56a0989
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
docker images
mkdir $HOME/out
id=$(docker create ${{ env.BUILD_TAG }})
docker cp $id:/usr/share/app-builders/VERSION $HOME/out
docker cp $id:/app-builders/VERSION $HOME/out
docker rm -v $id
echo "VersionTag=$(cat $HOME/out/VERSION)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -124,14 +124,13 @@ jobs:
uses: actions/delete-package-versions@v4
with:
package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}"
package-type: 'container'
package-type: "container"
min-versions-to-keep: 2
delete-only-untagged-versions: 'true'
delete-only-untagged-versions: "true"

- name: Cleanup older all packages, keep 6
uses: actions/delete-package-versions@v4
with:
package-name: "appbuilder-agent-${{ steps.meta.outputs.AppEnv }}"
package-type: 'container'
package-type: "container"
min-versions-to-keep: 6

16 changes: 15 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
LABEL refreshed_at="2024-01-11"
Expand All @@ -12,14 +14,26 @@ 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

# Clean up when done. (Preserve 'App Projects' directory!)
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
#
Expand Down
16 changes: 8 additions & 8 deletions ansible/roles/app-builders/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 56a0989

Please sign in to comment.