Skip to content

Commit e41f6fa

Browse files
authored
Migrate from DockerHub to ACR (#27)
* gh: bump code version to make sure we pull from the right container registry * docker: tag images w/ new container registry * gha: use credentials for acr * cpp: bump after merge
1 parent 28f4e35 commit e41f6fa

File tree

6 files changed

+19
-13
lines changed

6 files changed

+19
-13
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ jobs:
2424
- name: "Log in to DockerHub"
2525
uses: docker/login-action@v2
2626
with:
27-
username: ${{ secrets.DOCKER_USERNAME }}
28-
password: ${{ secrets.DOCKER_TOKEN }}
27+
registry: faasm.azurecr.io
28+
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
29+
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
2930
- name: "Build and push cpython container"
3031
id: docker_build
3132
uses: docker/build-push-action@v3
3233
with:
3334
push: true
3435
context: .
35-
tags: faasm/cpython:${{ env.TAG_VERSION }}
36+
tags: faasm.azurecr.io/cpython:${{ env.TAG_VERSION }}
3637
build-args: FAASM_PYTHON_VERSION=${{ env.TAG_VERSION }}

.github/workflows/tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ jobs:
2020
if: github.event.pull_request.draft == false
2121
runs-on: ubuntu-latest
2222
container:
23-
image: faasm/cpython:0.2.4
23+
image: faasm.azurecr.io/cpython:0.2.5
24+
credentials:
25+
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
26+
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
2427
steps:
2528
- name: "Fetch code"
2629
uses: actions/checkout@v3
@@ -41,7 +44,10 @@ jobs:
4144
REDIS_QUEUE_HOST: redis
4245
REDIS_STATE_HOST: redis
4346
container:
44-
image: faasm/cpython:0.2.4
47+
image: faasm.azurecr.io/cpython:0.2.5
48+
credentials:
49+
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
50+
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
4551
services:
4652
redis:
4753
image: redis

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM faasm/cpp-sysroot:0.2.3
1+
FROM faasm.azurecr.io/cpp-sysroot:0.2.4
22
ARG FAASM_PYTHON_VERSION
33

44
SHELL ["/bin/bash", "-c"]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.4
1+
0.2.5

tasks/docker.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
from invoke import task
2-
from os.path import join
3-
41
from faasmtools.docker import (
2+
ACR_NAME,
53
build_container,
64
push_container,
75
)
8-
6+
from invoke import task
7+
from os.path import join
98
from tasks.env import (
109
PROJ_ROOT,
1110
get_version,
1211
)
1312

14-
CONTAINER_IMAGE = "faasm/cpython"
13+
CONTAINER_IMAGE = "{}/cpython".format(ACR_NAME)
1514
DOCKERFILE = join(PROJ_ROOT, "Dockerfile")
1615

1716

0 commit comments

Comments
 (0)