mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
build: move build artifacts into build/ (#986)
Unclutter the root dir by moving all docker/stacker build artifacts into build/ folder. Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
94d073ceab
commit
97e7f7f756
14 changed files with 24 additions and 15 deletions
8
.github/workflows/ci-cd.yml
vendored
8
.github/workflows/ci-cd.yml
vendored
|
@ -134,7 +134,7 @@ jobs:
|
|||
- name: Build and push zot container image
|
||||
uses: project-stacker/stacker-build-push-action@main
|
||||
with:
|
||||
file: 'stacker.yaml'
|
||||
file: 'build/stacker.yaml'
|
||||
build-args: |
|
||||
RELEASE_TAG=${{ github.event.release.tag_name }}
|
||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||
|
@ -180,7 +180,7 @@ jobs:
|
|||
- name: Build and push zot-minimal container image
|
||||
uses: project-stacker/stacker-build-push-action@main
|
||||
with:
|
||||
file: 'stacker.yaml'
|
||||
file: 'build/stacker.yaml'
|
||||
build-args: |
|
||||
RELEASE_TAG=${{ github.event.release.tag_name }}
|
||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||
|
@ -227,7 +227,7 @@ jobs:
|
|||
- name: Build and push zot-exporter container image
|
||||
uses: project-stacker/stacker-build-push-action@main
|
||||
with:
|
||||
file: 'stacker-zxp.yaml'
|
||||
file: 'build/stacker-zxp.yaml'
|
||||
build-args: |
|
||||
RELEASE_TAG=${{ github.event.release.tag_name }}
|
||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||
|
@ -273,7 +273,7 @@ jobs:
|
|||
- name: Build and push zb container image
|
||||
uses: project-stacker/stacker-build-push-action@main
|
||||
with:
|
||||
file: 'stacker-zb.yaml'
|
||||
file: 'build/stacker-zb.yaml'
|
||||
build-args: |
|
||||
RELEASE_TAG=${{ github.event.release.tag_name }}
|
||||
COMMIT=${{ github.event.release.tag_name }}-${{ github.sha }}
|
||||
|
|
5
Makefile
5
Makefile
|
@ -240,7 +240,7 @@ verify-gql-committed:
|
|||
|
||||
.PHONY: binary-container
|
||||
binary-container:
|
||||
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f Dockerfile -t zot-build:latest .
|
||||
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f build/Dockerfile -t zot-build:latest .
|
||||
|
||||
.PHONY: run-container
|
||||
run-container:
|
||||
|
@ -250,6 +250,7 @@ run-container:
|
|||
.PHONY: binary-stacker
|
||||
binary-stacker:
|
||||
${STACKER} build \
|
||||
-f build/stacker.yaml \
|
||||
--substitute COMMIT=$(PWD) \
|
||||
--substitute OS=$(OS) \
|
||||
--substitute ARCH=$(ARCH) \
|
||||
|
@ -257,7 +258,7 @@ binary-stacker:
|
|||
|
||||
.PHONY: image
|
||||
image:
|
||||
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f Dockerfile -t zot:latest .
|
||||
${CONTAINER_RUNTIME} build ${BUILD_ARGS} -f build/Dockerfile -t zot:latest .
|
||||
|
||||
$(BATS):
|
||||
rm -rf bats-core; \
|
||||
|
|
|
@ -125,7 +125,7 @@ Examples of config files are available in [examples/](examples/) dir.
|
|||
|
||||
# Container Image
|
||||
|
||||
The [Dockerfile](./Dockerfile) in this repo can be used to build a container image
|
||||
The [Dockerfile](./build/Dockerfile) in this repo can be used to build a container image
|
||||
that runs _zot_.
|
||||
|
||||
To build the image with ref `zot:latest`:
|
||||
|
|
|
@ -42,9 +42,11 @@ build:
|
|||
build_only: true
|
||||
|
||||
"${{REPO_NAME:zot}}":
|
||||
os: ${{OS}}
|
||||
arch: ${{ARCH}}
|
||||
from:
|
||||
type: docker
|
||||
url: docker://gcr.io/distroless/base
|
||||
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
|
||||
overlay_dirs:
|
||||
- source: ./build/binary
|
||||
dest: /usr/local/bin
|
|
@ -20,9 +20,11 @@ build:
|
|||
build_only: true
|
||||
|
||||
"${{REPO_NAME:zb}}":
|
||||
os: ${{OS}}
|
||||
arch: ${{ARCH}}
|
||||
from:
|
||||
type: docker
|
||||
url: docker://gcr.io/distroless/base
|
||||
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
|
||||
overlay_dirs:
|
||||
- source: ./build/binary
|
||||
dest: /usr/local/bin
|
|
@ -40,9 +40,11 @@ build:
|
|||
build_only: true
|
||||
|
||||
"${{REPO_NAME:zxp}}":
|
||||
os: ${{OS}}
|
||||
arch: ${{ARCH}}
|
||||
from:
|
||||
type: docker
|
||||
url: docker://gcr.io/distroless/base
|
||||
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
|
||||
overlay_dirs:
|
||||
- source: ./build/binary
|
||||
dest: /usr/local/bin
|
|
@ -39,9 +39,11 @@ build:
|
|||
build_only: true
|
||||
|
||||
"${{REPO_NAME:zot}}":
|
||||
os: ${{OS}}
|
||||
arch: ${{ARCH}}
|
||||
from:
|
||||
type: docker
|
||||
url: docker://gcr.io/distroless/base
|
||||
url: docker://gcr.io/distroless/base:latest-${{ARCH}}
|
||||
overlay_dirs:
|
||||
- source: ./build/binary
|
||||
dest: /usr/local/bin
|
|
@ -2,7 +2,7 @@ CONTAINER_RUNTIME := docker
|
|||
|
||||
.PHONY: binary-container
|
||||
binary-container:
|
||||
${CONTAINER_RUNTIME} build -f Dockerfile -t zot-build:latest ../../.
|
||||
${CONTAINER_RUNTIME} build -f build/Dockerfile -t zot-build:latest ../../.
|
||||
|
||||
.PHONY: run-container
|
||||
run-container:
|
||||
|
@ -11,7 +11,7 @@ run-container:
|
|||
|
||||
.PHONY: binary-minimal-container
|
||||
binary-minimal-container:
|
||||
${CONTAINER_RUNTIME} build -f Dockerfile-minimal -t zot-minimal:latest ../../.
|
||||
${CONTAINER_RUNTIME} build -f build/Dockerfile-minimal -t zot-minimal:latest ../../.
|
||||
|
||||
.PHONY: run-minimal-container
|
||||
run-minimal-container:
|
||||
|
@ -20,7 +20,7 @@ run-minimal-container:
|
|||
|
||||
.PHONY: binary-exporter-container
|
||||
binary-exporter-container:
|
||||
${CONTAINER_RUNTIME} build -f Dockerfile-zxp -t zxp:latest ../../.
|
||||
${CONTAINER_RUNTIME} build -f build/Dockerfile-zxp -t zxp:latest ../../.
|
||||
|
||||
.PHONY: run-exporter-container
|
||||
run-exporter-container:
|
||||
|
|
|
@ -66,7 +66,7 @@ function teardown_file() {
|
|||
}
|
||||
|
||||
@test "build image with podman and specify annotations" {
|
||||
run podman build -t 127.0.0.1:8080/annotations:latest . --format oci --annotation org.opencontainers.image.vendor="CentOS" --annotation org.opencontainers.image.licenses="GPLv2"
|
||||
run podman build -f build/Dockerfile -t 127.0.0.1:8080/annotations:latest . --format oci --annotation org.opencontainers.image.vendor="CentOS" --annotation org.opencontainers.image.licenses="GPLv2"
|
||||
[ "$status" -eq 0 ]
|
||||
run podman push 127.0.0.1:8080/annotations:latest --tls-verify=false --format=oci
|
||||
[ "$status" -eq 0 ]
|
||||
|
|
Loading…
Reference in a new issue