Skip to content

Commit

Permalink
fix(ci): fix release images workflow
Browse files Browse the repository at this point in the history
Store release binaries in different dirs
closes project-zot#988

Signed-off-by: Petu Eusebiu <[email protected]>
  • Loading branch information
eusebiu-constantin-petu-dbk committed Nov 10, 2022
1 parent 94d073c commit ae9e4e0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 27 deletions.
20 changes: 11 additions & 9 deletions stacker-conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,26 @@ build:
cat config.json
mkdir -p /zotcopy/build/binary
mkdir -p /zotcopy/build/cert
mkdir -p /zotcopy/build/config
cp /go/src/github.com/project-zot/zot/bin/zot-linux-amd64 /zotcopy/build/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config
cp /etc/ssl/certs/ca-certificates.crt /zotcopy/build/cert
mkdir -p /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
cd /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
mkdir -p binary/ config/ cert/
cp /go/src/github.com/project-zot/zot/bin/zot-linux-amd64 binary/
cp /go/src/github.com/project-zot/zot/config.json config/
cp /etc/ssl/certs/ca-certificates.crt cert/
build_only: true

"${{REPO_NAME:zot}}":
from:
type: docker
url: docker://gcr.io/distroless/base
overlay_dirs:
- source: ./build/binary
- source: ./build/${{OS}}-${{ARCH}}/binary
dest: /usr/local/bin
- source: ./build/cert
- source: ./build/${{OS}}-${{ARCH}}/cert
dest: /etc/ssl/certs
- source: ./build/config
- source: ./build/${{OS}}-${{ARCH}}/config
dest: /etc/zot
entrypoint:
- /usr/bin/zot-linux-amd64
Expand Down
9 changes: 6 additions & 3 deletions stacker-zb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ build:
cd /go/src/github.com/project-zot/zot
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean bench
mkdir -p /zotcopy/build/binary
cp /go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}} /zotcopy/build/binary
mkdir -p /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
cd /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
mkdir -p binary/
cp /go/src/github.com/project-zot/zot/bin/zb-${{OS}}-${{ARCH}} binary/
build_only: true

"${{REPO_NAME:zb}}":
from:
type: docker
url: docker://gcr.io/distroless/base
overlay_dirs:
- source: ./build/binary
- source: ./build/${{OS}}-${{ARCH}}/binary
dest: /usr/local/bin
entrypoint:
- /usr/local/bin/zb-${{OS}}-${{ARCH}}
15 changes: 9 additions & 6 deletions stacker-zxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,23 @@ build:
cat config.json
mkdir -p /zotcopy/build/binary
mkdir -p /zotcopy/build/config
cp /go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}} /zotcopy/build/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config
mkdir -p /zotcopy/build/${{OS}}-${{ARCH}}
cd /zotcopy/build/${{OS}}-${{ARCH}}
mkdir -p binary/ config/
cp /go/src/github.com/project-zot/zot/bin/zxp-${{OS}}-${{ARCH}} binary/
cp /go/src/github.com/project-zot/zot/config.json config/
build_only: true

"${{REPO_NAME:zxp}}":
from:
type: docker
url: docker://gcr.io/distroless/base
overlay_dirs:
- source: ./build/binary
- source: ./build/${{OS}}-${{ARCH}}/binary
dest: /usr/local/bin
- source: ./build/config
- source: ./build/${{OS}}-${{ARCH}}/config
dest: /etc/zxp
entrypoint:
- /usr/local/bin/zxp-${{OS}}-${{ARCH}}
Expand Down
20 changes: 11 additions & 9 deletions stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,26 @@ build:
EOF
cat config.json
mkdir -p /zotcopy/build/binary
mkdir -p /zotcopy/build/cert
mkdir -p /zotcopy/build/config
cp /go/src/github.com/project-zot/zot/bin/zot-${{OS}}-${{ARCH}}${{EXT:}} /zotcopy/build/binary
cp /go/src/github.com/project-zot/zot/config.json /zotcopy/build/config
cp /etc/ssl/certs/ca-certificates.crt /zotcopy/build/cert
mkdir -p /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
cd /zotcopy/build/${{OS}}-${{ARCH}}${{EXT:}}
mkdir -p binary/ config/ 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

"${{REPO_NAME:zot}}":
from:
type: docker
url: docker://gcr.io/distroless/base
overlay_dirs:
- source: ./build/binary
- source: ./build/${{OS}}-${{ARCH}}${{EXT:}}/binary
dest: /usr/local/bin
- source: ./build/cert
- source: ./build/${{OS}}-${{ARCH}}${{EXT:}}/cert
dest: /etc/ssl/certs
- source: ./build/config
- source: ./build/${{OS}}-${{ARCH}}${{EXT:}}/config
dest: /etc/zot
entrypoint:
- /usr/local/bin/zot-${{OS}}-${{ARCH}}${{EXT:}}
Expand Down

0 comments on commit ae9e4e0

Please sign in to comment.