2022-04-07 06:48:54 -05:00
|
|
|
build:
|
|
|
|
from:
|
|
|
|
type: docker
|
2022-10-05 05:21:14 -05:00
|
|
|
url: docker://ghcr.io/project-zot/golang:1.19
|
2022-04-07 06:48:54 -05:00
|
|
|
binds:
|
2022-11-11 00:55:07 -05:00
|
|
|
- ../. -> /zotcopy
|
2022-04-07 06:48:54 -05:00
|
|
|
run: |
|
|
|
|
export GO111MODULE=on
|
|
|
|
export GOPATH='/go'
|
|
|
|
export HOME='/root'
|
|
|
|
export PATH='/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
|
|
|
|
mkdir -p /go/src/github.com/project-zot
|
|
|
|
cd /go/src/github.com/project-zot
|
|
|
|
git clone /zotcopy zot
|
|
|
|
cd /go/src/github.com/project-zot/zot
|
|
|
|
make COMMIT=${{COMMIT}} OS=${{OS}} ARCH=${{ARCH}} clean exporter-minimal
|
|
|
|
|
|
|
|
cat > config.json << EOF
|
|
|
|
{
|
|
|
|
"Server":{
|
|
|
|
"protocol":"http",
|
|
|
|
"host": "127.0.0.1",
|
|
|
|
"port": "5000"
|
|
|
|
},
|
|
|
|
"Exporter":{
|
|
|
|
"port":"5001",
|
|
|
|
"log":{
|
|
|
|
"level":"debug"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat config.json
|
2022-05-25 10:53:02 -05:00
|
|
|
|
2022-11-11 00:55:07 -05:00
|
|
|
mkdir -p /zotcopy/.build/${{REPO_NAME}}/binary
|
|
|
|
mkdir -p /zotcopy/.build/${{REPO_NAME}}/config
|
|
|
|
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/${{REPO_NAME}}/config
|
2022-04-07 06:48:54 -05:00
|
|
|
build_only: true
|
|
|
|
|
|
|
|
"${{REPO_NAME:zxp}}":
|
2022-11-12 04:08:45 -05:00
|
|
|
os: ${{OS}}
|
|
|
|
arch: ${{ARCH}}
|
2022-04-07 06:48:54 -05:00
|
|
|
from:
|
|
|
|
type: docker
|
2022-11-10 15:09:39 -05:00
|
|
|
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
|
2022-05-25 10:53:02 -05:00
|
|
|
overlay_dirs:
|
2022-11-11 00:55:07 -05:00
|
|
|
- source: ../.build/${{REPO_NAME}}/binary
|
2022-05-25 10:53:02 -05:00
|
|
|
dest: /usr/local/bin
|
2022-11-11 00:55:07 -05:00
|
|
|
- source: ../.build/${{REPO_NAME}}/config
|
2022-05-25 10:53:02 -05:00
|
|
|
dest: /etc/zxp
|
2022-04-07 06:48:54 -05:00
|
|
|
entrypoint:
|
2022-05-25 10:53:02 -05:00
|
|
|
- /usr/local/bin/zxp-${{OS}}-${{ARCH}}
|
2022-04-07 06:48:54 -05:00
|
|
|
cmd:
|
|
|
|
- config
|
|
|
|
- /etc/zxp/config.json
|