Skip to content

Commit

Permalink
refactor(ci): remove alpine ci build
Browse files Browse the repository at this point in the history
- We don't necessarily use it anywhere at the moment due to issues with
  the SavReaderWriter package
  • Loading branch information
DavisRayM committed Apr 24, 2023
1 parent ca0aa7e commit 6b40151
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 26 deletions.
28 changes: 4 additions & 24 deletions .github/workflows/ecr-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-20.04
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: echo "version=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

- name: (Ubuntu) Build and push
- name: Build and push
id: docker-build-ubuntu
uses: docker/build-push-action@v2
with:
Expand All @@ -69,29 +69,9 @@ jobs:
tags: |
${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version || github.ref_name }}
- name: (Alpine) Build and push
id: docker-build-alpine
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/onadata-uwsgi/Dockerfile.alpine
platforms: linux/amd64
cache-from: type=registry,ref=${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version }}-alpine
cache-to: type=inline
ssh: |
default=/tmp/ssh-agent.sock
build-args: |
optional_packages=PyYAML django-redis ${{ secrets.ECR_OPTIONAL_PACKAGES }}
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/onaio/onadata:${{ env.version || github.ref_name }}-alpine
- name: (Ubuntu) Image digest
- name: Image digest
run: echo ${{ steps.docker-build-ubuntu.outputs.digest }}

- name: (Alpine) Image digest
run: echo ${{ steps.docker-build-alpine.outputs.digest }}

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down
1 change: 1 addition & 0 deletions docker/onadata-uwsgi/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NOTE: This image currently does not work with the SAV export package
FROM python:3.9-alpine3.17

ENV PYTHONUNBUFFERED 1
Expand Down
2 changes: 0 additions & 2 deletions docker/onadata-uwsgi/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ RUN apt-get update -q &&\
libxslt1-dev \
zlib1g-dev \
ghostscript \
python3-celery \
python3-sphinx \
pkg-config \
gcc \
automake \
Expand Down

0 comments on commit 6b40151

Please sign in to comment.