Skip to content
Snippets Groups Projects
Commit 88656575 authored by Andre Sterba's avatar Andre Sterba Committed by Fabian Seidl
Browse files

Build cli image on CI


See merge request !378

Co-authored-by: default avatarFabian Seidl <fabian.seidl@h-da.de>
parent cfac891c
No related branches found
No related tags found
2 merge requests!378Build cli image on CI,!333WIP: Develop
Pipeline #116161 passed
......@@ -24,6 +24,18 @@ build-controller-image:
- docker push "$CI_REGISTRY_IMAGE:$NEWTAG"
<<: *build
build-cli-image:
script:
- CLI_IMAGE_NAME="${CI_REGISTRY_IMAGE}/gosdnc"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker buildx build -t "$CLI_IMAGE_NAME:$TAG" -f "${CI_PROJECT_DIR}/cli/cli.Dockerfile" --build-arg "GOLANG_VERSION=$GOLANG_VERSION" --build-arg "BUILDARGS=$BUILDARGS" --build-arg "GITLAB_PROXY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/" .
- docker push "$CLI_IMAGE_NAME:$TAG"
# replace all slashes in the tag with hyphen, because slashes are not allowed in tags
- NEWTAG=${CI_COMMIT_BRANCH//\//-}
- docker tag "$CLI_IMAGE_NAME:$TAG" "$CLI_IMAGE_NAME:$NEWTAG"
- docker push "$CLI_IMAGE_NAME:$NEWTAG"
<<: *build
build-venv-manager-image:
script:
- VENV_MANAGER_IMAGE_NAME="${CI_REGISTRY_IMAGE}/venv-manager"
......
......@@ -10,8 +10,5 @@ RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build-gosdnc
FROM scratch as gosdnc
FROM ubuntu:22.04
COPY --from=builder /gosdn/artifacts/gosdnc /
ENTRYPOINT ["./gosdnc"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment