Skip to content

Commit

Permalink
No longer push images to CCF ACR (#219)
Browse files Browse the repository at this point in the history
* No longer push images to CCF ACR

* Other files

* fmt

* python format

---------

Co-authored-by: Julien Maffre <[email protected]>
Co-authored-by: Andrew Jeffery <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2023
1 parent 90a0d00 commit f6c7ed0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 100 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ concurrency:
cancel-in-progress: true

env:
ACR_REGISTRY: ccfmsrc.azurecr.io
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/

jobs:
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:latest-virtual -f Dockerfile.virtual .
run: docker build -t lskv:latest-virtual -f Dockerfile.virtual .

build-docker-sgx:
runs-on: ubuntu-20.04
Expand All @@ -68,7 +67,7 @@ jobs:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:latest-sgx -f Dockerfile.sgx .
run: docker build -t lskv:latest-sgx -f Dockerfile.sgx .

checks:
runs-on: ubuntu-latest
Expand Down
54 changes: 6 additions & 48 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

env:
ACR_REGISTRY: ccfmsrc.azurecr.io
ACR_TOKEN_NAME: lskv-push-token
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/

jobs:
publish-docker-virtual:
publish:
runs-on: ubuntu-20.04

steps:
Expand All @@ -22,58 +20,18 @@ jobs:
with:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:latest-virtual -f Dockerfile.virtual .

- name: Log in to registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_LSKV_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY

- name: Push virtual image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker push $ACR_REGISTRY/public/lskv:latest-virtual

publish-docker-sgx:
runs-on: ubuntu-20.04

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:latest-sgx -f Dockerfile.sgx .

- name: Log in to registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_LSKV_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY

- name: Push sgx image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: docker push $ACR_REGISTRY/public/lskv:latest-sgx

publish-binaries:
runs-on: ubuntu-20.04
needs:
- publish-docker-virtual
- publish-docker-sgx
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Download images
- name: Build containers
run: |
docker pull $ACR_REGISTRY/public/lskv:latest-virtual
docker pull $ACR_REGISTRY/public/lskv:latest-sgx
docker build -t lskv:latest-virtual -f Dockerfile.virtual .
docker build -t lskv:latest-sgx -f Dockerfile.sgx .
- name: Copy files out of images
run: |
docker create --name lskv-virtual $ACR_REGISTRY/public/lskv:latest-virtual
docker create --name lskv-virtual lskv:latest-virtual
docker cp lskv-virtual:/app/liblskv.virtual.so liblskv.virtual.so
docker rm lskv-virtual
docker create --name lskv-sgx $ACR_REGISTRY/public/lskv:latest-sgx
docker create --name lskv-sgx lskv:latest-sgx
docker cp lskv-sgx:/app/liblskv.enclave.so.signed liblskv.enclave.so.signed
docker rm lskv-sgx
Expand Down
50 changes: 6 additions & 44 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+*"

env:
ACR_REGISTRY: ccfmsrc.azurecr.io
ACR_TOKEN_NAME: lskv-push-token
DOCKER_BUILDKIT: 1 # https://docs.docker.com/develop/develop-images/build_enhancements/

jobs:
publish-docker-virtual:
publish:
runs-on: ubuntu-20.04

steps:
Expand All @@ -20,54 +18,18 @@ jobs:
with:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:${{ github.ref }}-virtual -f Dockerfile.virtual .

- name: Log in to registry
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_LSKV_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY

- name: Push virtual image
run: docker push $ACR_REGISTRY/public/lskv:${{ github.ref }}-virtual

publish-docker-sgx:
runs-on: ubuntu-20.04

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build container
run: docker build -t $ACR_REGISTRY/public/lskv:${{ github.ref }}-sgx -f Dockerfile.sgx .

- name: Log in to registry
run: docker login -u $ACR_TOKEN_NAME -p ${{ secrets.ACR_LSKV_PUSH_TOKEN_PASSWORD }} $ACR_REGISTRY

- name: Push sgx image
run: docker push $ACR_REGISTRY/public/lskv:${{ github.ref }}-sgx

publish-binaries:
runs-on: ubuntu-20.04
needs:
- publish-docker-virtual
- publish-docker-sgx
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Download images
- name: Build containers
run: |
docker pull $ACR_REGISTRY/public/lskv:${{ github.ref }}-virtual
docker pull $ACR_REGISTRY/public/lskv:${{ github.ref }}-sgx
docker build -t lskv:${{ github.ref }}-virtual -f Dockerfile.virtual .
docker build -t lskv:${{ github.ref }}-sgx -f Dockerfile.sgx .
- name: Copy files out of images
run: |
docker create --name lskv-virtual $ACR_REGISTRY/public/lskv:${{ github.ref }}-virtual
docker create --name lskv-virtual lskv:${{ github.ref }}-virtual
docker cp lskv-virtual:/app/liblskv.virtual.so liblskv.virtual.so
docker rm lskv-virtual
docker create --name lskv-sgx $ACR_REGISTRY/public/lskv:${{ github.ref }}-sgx
docker create --name lskv-sgx lskv:${{ github.ref }}-sgx
docker cp lskv-sgx:/app/liblskv.enclave.so.signed liblskv.enclave.so.signed
docker rm lskv-sgx
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ build-sgx: .venv

.PHONY: build-docker-virtual
build-docker-virtual:
docker build -t ccfmsrc.azurecr.io/public/lskv:latest-virtual -f Dockerfile.virtual .
docker build -t lskv:latest-virtual -f Dockerfile.virtual .

.PHONY: build-docker-sgx
build-docker-sgx:
docker build -t ccfmsrc.azurecr.io/public/lskv:latest-sgx -f Dockerfile.sgx .
docker build -t lskv:latest-sgx -f Dockerfile.sgx .

.PHONY: build-docker
build-docker: build-docker-virtual build-docker-sgx
Expand Down
4 changes: 1 addition & 3 deletions benchmark/lskv_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,9 +682,7 @@ def main(
parser.add_argument("--workspace", type=str, default="workspace")
parser.add_argument("--nodes", type=int, default=1)
parser.add_argument("--enclave", type=str, default="virtual")
parser.add_argument(
"--image", type=str, default="ccfmsrc.azurecr.io/public/lskv:latest"
)
parser.add_argument("--image", type=str, default="lskv:latest")
parser.add_argument("--http-version", type=int, default="2")
parser.add_argument("--worker-threads", type=int, default="0")
parser.add_argument("--sig-tx-interval", type=int, default="5000")
Expand Down

0 comments on commit f6c7ed0

Please sign in to comment.