Merge "Allow to override default entrypoint for airshipctl image"

This commit is contained in:
Zuul 2021-05-19 04:56:34 +00:00 committed by Gerrit Code Review
commit 3f5c7efd81
4 changed files with 8 additions and 2 deletions

View File

@ -37,4 +37,5 @@ ARG BINARY=airshipctl
ENV BINARY=${BINARY} ENV BINARY=${BINARY}
COPY --from=builder /usr/src/airshipctl/bin/${BINARY} /usr/local/bin/${BINARY} COPY --from=builder /usr/src/airshipctl/bin/${BINARY} /usr/local/bin/${BINARY}
USER 65534 USER 65534
ENTRYPOINT /usr/local/bin/${BINARY} ARG ENTRYPOINT=/usr/local/bin/${BINARY}
ENTRYPOINT ${ENTRYPOINT}

View File

@ -43,6 +43,9 @@ endif
ifneq ($(strip $(DOCKER_BASE_RELEASE_IMAGE)),) ifneq ($(strip $(DOCKER_BASE_RELEASE_IMAGE)),)
DOCKER_CMD_FLAGS += --build-arg RELEASE_IMAGE=$(strip $(DOCKER_BASE_RELEASE_IMAGE)) DOCKER_CMD_FLAGS += --build-arg RELEASE_IMAGE=$(strip $(DOCKER_BASE_RELEASE_IMAGE))
endif endif
ifneq ($(strip $(DOCKER_IMAGE_ENTRYPOINT)),)
DOCKER_CMD_FLAGS += --build-arg ENTRYPOINT=$(strip $(DOCKER_IMAGE_ENTRYPOINT))
endif
# use this variable for image labels added in internal build process # use this variable for image labels added in internal build process
COMMIT ?= $(shell git rev-parse HEAD) COMMIT ?= $(shell git rev-parse HEAD)
LABEL ?= org.airshipit.build=community LABEL ?= org.airshipit.build=community

View File

@ -10,7 +10,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Buid airshipctl Image - name: Build airshipctl Image
make: make:
chdir: "{{ zuul.project.src_dir }}" chdir: "{{ zuul.project.src_dir }}"
target: images target: images
@ -25,6 +25,7 @@
DOCKER_BASE_RELEASE_IMAGE: "{{ docker.base_release_image | default(omit) }}" DOCKER_BASE_RELEASE_IMAGE: "{{ docker.base_release_image | default(omit) }}"
DOCKER_BASE_PLUGINS_BUILD_IMAGE: "{{ docker.base_plugins_build_image | default(omit) }}" DOCKER_BASE_PLUGINS_BUILD_IMAGE: "{{ docker.base_plugins_build_image | default(omit) }}"
DOCKER_BASE_PLUGINS_RELEASE_IMAGE: "{{ docker.base_plugins_release_image | default(omit) }}" DOCKER_BASE_PLUGINS_RELEASE_IMAGE: "{{ docker.base_plugins_release_image | default(omit) }}"
DOCKER_IMAGE_ENTRYPOINT: "{{ docker.entrypoint | default(omit) }}"
- name: Verify Image Exists - name: Verify Image Exists
shell: docker image inspect "$(make DOCKER_REGISTRY={{ image_repo }} DOCKER_IMAGE_PREFIX={{ image_prefix }} DOCKER_IMAGE_TAG={{ zuul.change }} print-docker-image-tag)" shell: docker image inspect "$(make DOCKER_REGISTRY={{ image_repo }} DOCKER_IMAGE_PREFIX={{ image_prefix }} DOCKER_IMAGE_TAG={{ zuul.change }} print-docker-image-tag)"

View File

@ -43,6 +43,7 @@
DOCKER_BASE_RELEASE_IMAGE: "{{ docker.base_release_image | default(omit) }}" DOCKER_BASE_RELEASE_IMAGE: "{{ docker.base_release_image | default(omit) }}"
DOCKER_BASE_PLUGINS_BUILD_IMAGE: "{{ docker.base_plugins_build_image | default(omit) }}" DOCKER_BASE_PLUGINS_BUILD_IMAGE: "{{ docker.base_plugins_build_image | default(omit) }}"
DOCKER_BASE_PLUGINS_RELEASE_IMAGE: "{{ docker.base_plugins_release_image | default(omit) }}" DOCKER_BASE_PLUGINS_RELEASE_IMAGE: "{{ docker.base_plugins_release_image | default(omit) }}"
DOCKER_IMAGE_ENTRYPOINT: "{{ docker.entrypoint | default(omit) }}"
target: images target: images
loop: loop:
- "latest" - "latest"