diff --git a/calico-vpp-agent/Makefile b/calico-vpp-agent/Makefile index 217c7044..a81c5cd2 100644 --- a/calico-vpp-agent/Makefile +++ b/calico-vpp-agent/Makefile @@ -1,6 +1,5 @@ include ../common.mk -TAG ?= latest # Tag images with :$(TAG) ALSO_LATEST ?= n # If 'y' also tag images with :latest GENERATE_LOG_FILE=../vpplink/generated/generate.log VERSION_FILE=version diff --git a/common.mk b/common.mk index 37370408..206a1179 100644 --- a/common.mk +++ b/common.mk @@ -50,8 +50,11 @@ ifeq (${CODEBUILD_WEBHOOK_TRIGGER},branch/master) ALSO_LATEST := y endif -CLUSTER_NAME ?= kind-$(shell whoami)-$(shell git describe --always --abbrev=4) +CLUSTER_NAME ?= kind-$(shell whoami)-$(shell git rev-parse --short=4 HEAD) DOCKER_BUILD_ARGS = --network=host DOCKER_BUILD_ARGS += --build-arg http_proxy=${DOCKER_BUILD_PROXY} DOCKER_BUILD_ARGS += --build-arg https_proxy=${DOCKER_BUILD_PROXY} -DOCKER_BUILD_ARGS += --build-arg GIT_COMMIT="$(shell git log -1 --oneline)" +DOCKER_BUILD_ARGS += --build-arg GIT_COMMIT="$(shell git describe --always --abbrev=40 --dirty)" +ifeq (${NO_CACHE},true) + DOCKER_BUILD_ARGS += --no-cache +endif diff --git a/multinet-monitor/Makefile b/multinet-monitor/Makefile index 3f0983d1..7eca8bc9 100644 --- a/multinet-monitor/Makefile +++ b/multinet-monitor/Makefile @@ -1,6 +1,5 @@ include ../common.mk -TAG ?= latest # Tag images with :$(TAG) VERSION_FILE=version GENERATE_LOG_FILE=../vpplink/generated/generate.log ALSO_LATEST ?= n # If 'y' also tag images with :latest diff --git a/test/kind/Makefile b/test/kind/Makefile index 4b652715..9798decc 100644 --- a/test/kind/Makefile +++ b/test/kind/Makefile @@ -1,6 +1,5 @@ include ../../common.mk -TAG ?= latest # Tag images with :$(TAG) CPU_PINNING ?= false KIND_CALICO_VERSION ?= v3.31.0 DEBUG ?= false diff --git a/vpp-manager/Makefile b/vpp-manager/Makefile index 13434b7e..138bcb8f 100644 --- a/vpp-manager/Makefile +++ b/vpp-manager/Makefile @@ -11,7 +11,6 @@ VCLSIDECAR_IMAGE_DIR=images/vclsidecar VPPDEV_FILE=../test/scripts/vppdev.sh GENERATE_LOG_FILE=../vpplink/generated/generate.log -TAG ?= latest # Tag images with :$(TAG) ALSO_LATEST ?= n # If 'y' also tag images with :latest VPP_DIR ?= $(CURDIR)/vpp_build diff --git a/vpp-manager/images/ubuntu/Dockerfile b/vpp-manager/images/ubuntu/Dockerfile index e7fcaf95..eab1d9bd 100644 --- a/vpp-manager/images/ubuntu/Dockerfile +++ b/vpp-manager/images/ubuntu/Dockerfile @@ -2,9 +2,6 @@ FROM ubuntu:22.04 LABEL maintainer="nskrzypc@cisco.com" -ARG GIT_COMMIT=unknown -LABEL git-commit=$GIT_COMMIT - RUN apt-get update \ && apt-get install -y openssl libapr1 libnuma1 \ libmbedcrypto7 libmbedtls14 libmbedx509-1 libsubunit0 \ @@ -13,6 +10,9 @@ RUN apt-get update \ gdb \ && rm -rf /var/lib/apt/lists/* +ARG GIT_COMMIT=unknown +LABEL git-commit=$GIT_COMMIT + # set work directory WORKDIR /root/ diff --git a/vpp-manager/images/ubuntu/Dockerfile.debug b/vpp-manager/images/ubuntu/Dockerfile.debug index c6f3472a..1e24fe8a 100644 --- a/vpp-manager/images/ubuntu/Dockerfile.debug +++ b/vpp-manager/images/ubuntu/Dockerfile.debug @@ -2,9 +2,6 @@ FROM ubuntu:22.04 LABEL maintainer="nskrzypc@cisco.com" -ARG GIT_COMMIT=unknown -LABEL git-commit=$GIT_COMMIT - RUN apt-get update \ && apt-get install -y openssl libapr1 libnuma1 \ libmbedcrypto7 libmbedtls14 libmbedx509-1 libsubunit0 \ @@ -13,6 +10,9 @@ RUN apt-get update \ gdb \ && rm -rf /var/lib/apt/lists/* +ARG GIT_COMMIT=unknown +LABEL git-commit=$GIT_COMMIT + # set work directory WORKDIR /root/ diff --git a/vpp-manager/images/vclsidecar/Dockerfile b/vpp-manager/images/vclsidecar/Dockerfile index 4f7e1ba4..d77536f4 100644 --- a/vpp-manager/images/vclsidecar/Dockerfile +++ b/vpp-manager/images/vclsidecar/Dockerfile @@ -1,8 +1,5 @@ FROM ubuntu:22.04 -ARG GIT_COMMIT=unknown -LABEL git-commit=$GIT_COMMIT - RUN apt update && apt install -y \ libunwind8 \ libssh-4 \ @@ -10,6 +7,9 @@ RUN apt update && apt install -y \ && apt clean \ && rm -rf /var/lib/apt/lists/* +ARG GIT_COMMIT=unknown +LABEL git-commit=$GIT_COMMIT + ADD artifacts/release/libvppcom* /usr/local/lib/ ADD artifacts/release/libvppinfra* /usr/local/lib/ ADD artifacts/release/libvlibmemoryclient* /usr/local/lib/ diff --git a/vpp-manager/images/vclsidecar/Dockerfile.debug b/vpp-manager/images/vclsidecar/Dockerfile.debug index be488644..235d1b8f 100644 --- a/vpp-manager/images/vclsidecar/Dockerfile.debug +++ b/vpp-manager/images/vclsidecar/Dockerfile.debug @@ -1,8 +1,5 @@ FROM ubuntu:22.04 -ARG GIT_COMMIT=unknown -LABEL git-commit=$GIT_COMMIT - RUN apt update && apt install -y \ libunwind8 \ libssh-4 \ @@ -10,6 +7,9 @@ RUN apt update && apt install -y \ && apt clean \ && rm -rf /var/lib/apt/lists/* +ARG GIT_COMMIT=unknown +LABEL git-commit=$GIT_COMMIT + ADD artifacts/debug/libvppcom* /usr/local/lib/ ADD artifacts/debug/libvppinfra* /usr/local/lib/ ADD artifacts/debug/libvlibmemoryclient* /usr/local/lib/ diff --git a/yaml/Makefile b/yaml/Makefile index 393cfcd3..2c8d701f 100644 --- a/yaml/Makefile +++ b/yaml/Makefile @@ -8,7 +8,6 @@ # - on release branches of this repository, used by the tigera docs # TAG should the latest release tag for calicovpp images # -TAG ?= latest .PHONY: build build: clean