Skip to content

Commit

Permalink
[ENHANCEMENT] CI: Configure a separate docker registry for dev images (
Browse files Browse the repository at this point in the history
…#5172)

# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->

See dev registry [here](https://hub.docker.com/search?q=argilladev)

**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->
- Improvement (change adding some improvement to an existing
functionality)

**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->

**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->

- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
  • Loading branch information
frascuchon authored Jul 8, 2024
1 parent a5eaa9b commit 93d3f87
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/argilla-server.build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,26 @@ jobs:
if [[ $IS_RELEASE == true ]]; then
echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
echo "IMAGE_TAG=v$PACKAGE_VERSION" >> $GITHUB_ENV
echo "SERVER_DOCKER_IMAGE=argilla/argilla-server" >> $GITHUB_ENV
echo "QUICKSTART_DOCKER_IMAGE=argilla/argilla-quickstart" >> $GITHUB_ENV
echo "DOCKER_USERNAME=$DOCKER_USERNAME" >> $GITHUB_ENV
echo "DOCKER_PASSWORD=$DOCKER_PASSWORD" >> $GITHUB_ENV
else
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
echo "IMAGE_TAG=$DOCKER_IMAGE_TAG" >> $GITHUB_ENV
echo "SERVER_DOCKER_IMAGE=argilladev/argilla-server" >> $GITHUB_ENV
echo "QUICKSTART_DOCKER_IMAGE=argilladev/argilla-quickstart" >> $GITHUB_ENV
echo "DOCKER_USERNAME=$DOCKER_USERNAME_DEV" >> $GITHUB_ENV
echo "DOCKER_PASSWORD=$DOCKER_PASSWORD_DEV" >> $GITHUB_ENV
fi
env:
IS_RELEASE: ${{ inputs.is_release }}
PACKAGE_VERSION: ${{ steps.package-info.outputs.PACKAGE_VERSION }}
DOCKER_IMAGE_TAG: ${{ steps.docker-image-tag-from-ref.outputs.docker-image-tag }}
DOCKER_USERNAME: ${{ secrets.AR_DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.AR_DOCKER_PASSWORD }}
DOCKER_USERNAME_DEV: ${{ secrets.AR_DOCKER_USERNAME_DEV }}
DOCKER_PASSWORD_DEV: ${{ secrets.AR_DOCKER_PASSWORD_DEV }}

- name: Set up QEMU
if: ${{ inputs.is_release }}
Expand All @@ -67,8 +79,8 @@ jobs:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.AR_DOCKER_USERNAME }}
password: ${{ secrets.AR_DOCKER_PASSWORD }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Download python package
uses: actions/download-artifact@v4
Expand All @@ -82,7 +94,7 @@ jobs:
context: argilla-server/docker/server
file: argilla-server/docker/server/Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: argilla/argilla-server:${{ env.IMAGE_TAG }}
tags: ${{ env.SERVER_DOCKER_IMAGE }}:${{ env.IMAGE_TAG }}
labels: ${{ steps.meta.outputs.labels }}
push: true

Expand All @@ -93,7 +105,7 @@ jobs:
context: argilla-server/docker/server
file: argilla-server/docker/server/Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: argilla/argilla-server:latest
tags: ${{ env.SERVER_DOCKER_IMAGE }}:latest
labels: ${{ steps.meta.outputs.labels }}
push: true

Expand All @@ -103,9 +115,10 @@ jobs:
context: argilla-server/docker/quickstart
file: argilla-server/docker/quickstart/Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: argilla/argilla-quickstart:${{ env.IMAGE_TAG }}
tags: ${{ env.QUICKSTART_DOCKER_IMAGE }}:${{ env.IMAGE_TAG }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ARGILLA_SERVER_IMAGE=${{ env.SERVER_DOCKER_IMAGE }}
ARGILLA_VERSION=${{ env.IMAGE_TAG }}
push: true

Expand All @@ -116,7 +129,7 @@ jobs:
context: argilla-server/docker/quickstart
file: argilla-server/docker/quickstart/Dockerfile
platforms: ${{ env.PLATFORMS }}
tags: argilla/argilla-quickstart:latest
tags: ${{ env.QUICKSTART_DOCKER_IMAGE }}:latest
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ARGILLA_VERSION=${{ env.IMAGE_TAG }}
Expand All @@ -126,8 +139,8 @@ jobs:
uses: peter-evans/dockerhub-description@v4
if: ${{ inputs.is_release && inputs.publish_latest }}
with:
username: ${{ secrets.AR_DOCKER_USERNAME }}
password: ${{ secrets.AR_DOCKER_PASSWORD }}
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
repository: argilla/argilla-server
readme-filepath: argilla-server/README.md

Expand Down
3 changes: 2 additions & 1 deletion argilla-server/docker/quickstart/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TODO(gabrielmbmb): update this `Dockerfile` to multi-staged build to reduce the image size
ARG ARGILLA_VERSION=latest
FROM argilla/argilla-server:${ARGILLA_VERSION}
ARG ARGILLA_SERVER_IMAGE=argilla/argilla-server
FROM ${ARGILLA_SERVER_IMAGE}:${ARGILLA_VERSION}

USER root

Expand Down

0 comments on commit 93d3f87

Please sign in to comment.