0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-30 22:34:13 -05:00

fix(ci): fix releasing zot minimal image (#990)

closes #988

Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
peusebiu 2022-11-11 07:55:07 +02:00 committed by GitHub
parent 5eeba938ab
commit 08c8d493f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 39 deletions

View file

@ -3,7 +3,7 @@ build:
type: docker type: docker
url: docker://ghcr.io/project-zot/golang:1.19 url: docker://ghcr.io/project-zot/golang:1.19
binds: binds:
- . -> /zotcopy - ../. -> /zotcopy
run: | run: |
export GO111MODULE=on export GO111MODULE=on
export GOPATH='/go' export GOPATH='/go'
@ -33,26 +33,24 @@ build:
cat config.json cat config.json
mkdir -p /zotcopy/build/binary mkdir -p /zotcopy/.build/${{REPO_NAME}}/binary
mkdir -p /zotcopy/build/cert mkdir -p /zotcopy/.build/${{REPO_NAME}}/cert
mkdir -p /zotcopy/build/config mkdir -p /zotcopy/.build/${{REPO_NAME}}/config
cp /go/src/github.com/project-zot/zot/bin/zot-linux-amd64 /zotcopy/build/binary cp /go/src/github.com/project-zot/zot/bin/zot-linux-amd64 /zotcopy/.build/${{REPO_NAME}}/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config cp /go/src/github.com/project-zot/zot/config.json /zotcopy/.build/${{REPO_NAME}}/config
cp /etc/ssl/certs/ca-certificates.crt /zotcopy/build/cert cp /etc/ssl/certs/ca-certificates.crt /zotcopy/.build/${{REPO_NAME}}/cert
build_only: true build_only: true
"${{REPO_NAME:zot}}": "${{REPO_NAME:zot}}":
os: ${{OS}}
arch: ${{ARCH}}
from: from:
type: docker type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}} url: docker://gcr.io/distroless/base:latest-${{ARCH}}
overlay_dirs: overlay_dirs:
- source: ./build/binary - source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin dest: /usr/local/bin
- source: ./build/cert - source: ../.build/${{REPO_NAME}}/cert
dest: /etc/ssl/certs dest: /etc/ssl/certs
- source: ./build/config - source: ../.build/${{REPO_NAME}}/config
dest: /etc/zot dest: /etc/zot
entrypoint: entrypoint:
- /usr/bin/zot-linux-amd64 - /usr/bin/zot-linux-amd64

View file

@ -3,7 +3,7 @@ build:
type: docker type: docker
url: docker://ghcr.io/project-zot/golang:1.19 url: docker://ghcr.io/project-zot/golang:1.19
binds: binds:
- . -> /zotcopy - ../. -> /zotcopy
run: | run: |
export GO111MODULE=on export GO111MODULE=on
export GOPATH='/go' export GOPATH='/go'
@ -15,18 +15,16 @@ build:
cd /go/src/github.com/project-zot/zot cd /go/src/github.com/project-zot/zot
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean bench make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean bench
mkdir -p /zotcopy/build/binary mkdir -p /zotcopy/.build/${{REPO_NAME}}/binary
cp /go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}} /zotcopy/build/binary cp /go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}} /zotcopy/.build/${{REPO_NAME}}/binary
build_only: true build_only: true
"${{REPO_NAME:zb}}": "${{REPO_NAME:zb}}":
os: ${{OS}}
arch: ${{ARCH}}
from: from:
type: docker type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}} url: docker://gcr.io/distroless/base:latest-${{ARCH}}
overlay_dirs: overlay_dirs:
- source: ./build/binary - source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin dest: /usr/local/bin
entrypoint: entrypoint:
- /usr/local/bin/zb-${{OS}}-${{ARCH}} - /usr/local/bin/zb-${{OS}}-${{ARCH}}

View file

@ -3,7 +3,7 @@ build:
type: docker type: docker
url: docker://ghcr.io/project-zot/golang:1.19 url: docker://ghcr.io/project-zot/golang:1.19
binds: binds:
- . -> /zotcopy - ../. -> /zotcopy
run: | run: |
export GO111MODULE=on export GO111MODULE=on
export GOPATH='/go' export GOPATH='/go'
@ -33,22 +33,20 @@ build:
cat config.json cat config.json
mkdir -p /zotcopy/build/binary mkdir -p /zotcopy/.build/${{REPO_NAME}}/binary
mkdir -p /zotcopy/build/config mkdir -p /zotcopy/.build/${{REPO_NAME}}/config
cp /go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}} /zotcopy/build/binary cp /go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}} /zotcopy/.build/${{REPO_NAME}}/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config cp /go/src/github.com/project-zot/zot/config.json /zotcopy/.build/${{REPO_NAME}}/config
build_only: true build_only: true
"${{REPO_NAME:zxp}}": "${{REPO_NAME:zxp}}":
os: ${{OS}}
arch: ${{ARCH}}
from: from:
type: docker type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}} url: docker://gcr.io/distroless/base:latest-${{ARCH}}
overlay_dirs: overlay_dirs:
- source: ./build/binary - source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin dest: /usr/local/bin
- source: ./build/config - source: ../.build/${{REPO_NAME}}/config
dest: /etc/zxp dest: /etc/zxp
entrypoint: entrypoint:
- /usr/local/bin/zxp-${{OS}}-${{ARCH}} - /usr/local/bin/zxp-${{OS}}-${{ARCH}}

View file

@ -3,7 +3,7 @@ build:
type: docker type: docker
url: docker://ghcr.io/project-zot/golang:1.19 url: docker://ghcr.io/project-zot/golang:1.19
binds: binds:
- . -> /zotcopy - ../. -> /zotcopy
run: | run: |
export GO111MODULE=on export GO111MODULE=on
export GOPATH='/go' export GOPATH='/go'
@ -30,26 +30,26 @@ build:
EOF EOF
cat config.json cat config.json
mkdir -p /zotcopy/build/binary mkdir -p /zotcopy/.build/${{REPO_NAME}}
mkdir -p /zotcopy/build/cert cd /zotcopy/.build/${{REPO_NAME}}
mkdir -p /zotcopy/build/config
cp /go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}} /zotcopy/build/binary mkdir -p binary/ cert/ config/
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config
cp /etc/ssl/certs/ca-certificates.crt /zotcopy/build/cert cp /go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}} binary/
cp /go/src/github.com/project-zot/zot/config.json config/
cp /etc/ssl/certs/ca-certificates.crt cert/
build_only: true build_only: true
"${{REPO_NAME:zot}}": "${{REPO_NAME:zot}}":
os: ${{OS}}
arch: ${{ARCH}}
from: from:
type: docker type: docker
url: docker://gcr.io/distroless/base:latest-${{ARCH}} url: docker://gcr.io/distroless/base:latest-${{ARCH}}
overlay_dirs: overlay_dirs:
- source: ./build/binary - source: ../.build/${{REPO_NAME}}/binary
dest: /usr/local/bin dest: /usr/local/bin
- source: ./build/cert - source: ../.build/${{REPO_NAME}}/cert
dest: /etc/ssl/certs dest: /etc/ssl/certs
- source: ./build/config - source: ../.build/${{REPO_NAME}}/config
dest: /etc/zot dest: /etc/zot
entrypoint: entrypoint:
- /usr/local/bin/zot-${{OS}}-${{ARCH}}${{EXT:}} - /usr/local/bin/zot-${{OS}}-${{ARCH}}${{EXT:}}