Skip to content
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
10 changes: 5 additions & 5 deletions .github/workflows/build-julia-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:


# Log in to EOPF Container Registry
- name: Log in to GitHub Container Registry
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: https://harbor.user.eopf.eodc.eu/
username: ${{ secrets.HARBOR_ROBOT_USER }}
password: ${{ secrets.HARBOR_ROBOT_PWD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}


# Build and push image
Expand All @@ -36,5 +36,5 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: harbor.user.eopf.eodc.eu/jupyterdask/julia-base:latest
tags: ghcr.io/${{ github.repository }}/julia-base:latest
file: eopf-jupyterlab/eopf-jupyterlab-julia-base.dockerfile
10 changes: 5 additions & 5 deletions .github/workflows/build-jupyter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ jobs:
uses: docker/setup-buildx-action@v3

# Log in to EOPF Container Registry
- name: Log in to GitHub Container Registry
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: https://harbor.user.eopf.eodc.eu/
username: ${{ secrets.HARBOR_ROBOT_USER }}
password: ${{ secrets.HARBOR_ROBOT_PWD }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push image
- name: Build and push
Expand All @@ -53,5 +53,5 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: harbor.user.eopf.eodc.eu/jupyterdask/eopf-jupyterlab:latest
tags: ghcr.io/${{ github.repository }}/eopf-jupyterlab:latest
file: eopf-jupyterlab/eopf-jupyterlab.dockerfile
215 changes: 50 additions & 165 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,67 +52,28 @@ jobs:

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Log in to EOPF Container Registry with retry logic
- name: Log in to Harbor Registry
env:
HARBOR_USER: ${{ secrets.HARBOR_ROBOT_USER }}
HARBOR_PWD: ${{ secrets.HARBOR_ROBOT_PWD }}
DOCKER_CLIENT_TIMEOUT: 300
COMPOSE_HTTP_TIMEOUT: 300
run: |
max_attempts=10
attempt=1

while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts..."

if timeout 120 bash -c 'echo "$HARBOR_PWD" | docker login harbor.user.eopf.eodc.eu --username "$HARBOR_USER" --password-stdin'; then
echo "Login successful!"
exit 0
else
echo "Login failed (attempt $attempt)"
if [ $attempt -lt $max_attempts ]; then
sleep 5
fi
fi

attempt=$((attempt + 1))
done

echo "Failed to login after $max_attempts attempts"
exit 1
timeout-minutes: 15


# Build and push image with buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
uses: docker/login-action@v3
with:
driver-opts: |
network=host

- name: Build and push multi-platform image
env:
DOCKER_CLIENT_TIMEOUT: 600
COMPOSE_HTTP_TIMEOUT: 600
run: |
SHOULD_PUSH="${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}"

if [ "$SHOULD_PUSH" = "true" ]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-jupyterlab:latest \
--file eopf-jupyterlab/eopf-jupyterlab.dockerfile \
.
else
echo "Skipping push - not on main branch or not a push/workflow_dispatch event"
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-jupyterlab:latest \
--file eopf-jupyterlab/eopf-jupyterlab.dockerfile \
.
fi
timeout-minutes: 60
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push image
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
tags: ghcr.io/${{ github.repository }}/eopf-jupyterlab:latest
file: eopf-jupyterlab/eopf-jupyterlab.dockerfile


build-dask-image:
Expand All @@ -134,36 +95,6 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Log in to EOPF Container Registry with retry logic
- name: Log in to Harbor Registry
env:
HARBOR_USER: ${{ secrets.HARBOR_ROBOT_USER }}
HARBOR_PWD: ${{ secrets.HARBOR_ROBOT_PWD }}
DOCKER_CLIENT_TIMEOUT: 300
COMPOSE_HTTP_TIMEOUT: 300
run: |
max_attempts=10
attempt=1

while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts..."

if timeout 120 bash -c 'echo "$HARBOR_PWD" | docker login harbor.user.eopf.eodc.eu --username "$HARBOR_USER" --password-stdin'; then
echo "Login successful!"
exit 0
else
echo "Login failed (attempt $attempt)"
if [ $attempt -lt $max_attempts ]; then
sleep 5
fi
fi

attempt=$((attempt + 1))
done

echo "Failed to login after $max_attempts attempts"
exit 1
timeout-minutes: 15

# Build and push image with buildx
- name: Set up Docker Buildx
Expand All @@ -172,29 +103,22 @@ jobs:
driver-opts: |
network=host

- name: Build and push multi-platform image
env:
DOCKER_CLIENT_TIMEOUT: 600
COMPOSE_HTTP_TIMEOUT: 600
run: |
SHOULD_PUSH="${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}"

if [ "$SHOULD_PUSH" = "true" ]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-dask:latest \
--file eopf-dask/eopf-dask.dockerfile \
.
else
echo "Skipping push - not on main branch or not a push/workflow_dispatch event"
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-dask:latest \
--file eopf-dask/eopf-dask.dockerfile \
.
fi
timeout-minutes: 60
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push image
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch'}}
tags: ghcr.io/${{ github.repository }}/eopf-dask:latest
file: eopf-dask/eopf-dask.dockerfile

build-zarr-driver-image:
runs-on: ubuntu-latest
Expand All @@ -206,64 +130,25 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Log in to EOPF Container Registry with retry logic
- name: Log in to Harbor Registry
env:
HARBOR_USER: ${{ secrets.HARBOR_ROBOT_USER }}
HARBOR_PWD: ${{ secrets.HARBOR_ROBOT_PWD }}
DOCKER_CLIENT_TIMEOUT: 300
COMPOSE_HTTP_TIMEOUT: 300
run: |
max_attempts=10
attempt=1

while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts..."

if timeout 120 bash -c 'echo "$HARBOR_PWD" | docker login harbor.user.eopf.eodc.eu --username "$HARBOR_USER" --password-stdin'; then
echo "Login successful!"
exit 0
else
echo "Login failed (attempt $attempt)"
if [ $attempt -lt $max_attempts ]; then
sleep 5
fi
fi

attempt=$((attempt + 1))
done

echo "Failed to login after $max_attempts attempts"
exit 1
timeout-minutes: 15

# Build and push image with buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# Log in to EOPF Container Registry
- name: Log in to GHCR
uses: docker/login-action@v3
with:
driver-opts: |
network=host

- name: Build and push multi-platform image
env:
DOCKER_CLIENT_TIMEOUT: 600
COMPOSE_HTTP_TIMEOUT: 600
run: |
SHOULD_PUSH="${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}"

if [ "$SHOULD_PUSH" = "true" ]; then
docker buildx build \
--platform linux/amd64,linux/arm64 \
--push \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-zarr-driver:latest \
--file eopf-zarr-driver/Dockerfile \
.
else
echo "Skipping push - not on main branch or not a push/workflow_dispatch event"
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag harbor.user.eopf.eodc.eu/jupyterdask/eopf-zarr-driver:latest \
--file eopf-zarr-driver/Dockerfile \
.
fi
timeout-minutes: 60
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push image
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
tags: ghcr.io/${{ github.repository }}/eopf-zarr-driver:latest
file: eopf-zarr-driver/Dockerfile
4 changes: 2 additions & 2 deletions eopf-jupyterlab/eopf-jupyterlab.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG REGISTRY=harbor.user.eopf.eodc.eu
ARG OWNER=jupyterdask
ARG REGISTRY=ghcr.io
ARG OWNER=eopf-sample-service/eopf-container-images
ARG BASE_IMAGE=$REGISTRY/$OWNER/julia-base
FROM $BASE_IMAGE

Expand Down
Loading