This commit is contained in:
parent
881d9e55f5
commit
e4093b908f
@ -442,7 +442,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
build_args:
|
build_args:
|
||||||
- HELM_VERSION=${DRONE_TAG}
|
- GOSEC_VERSION=${DRONE_TAG}
|
||||||
no_cache: true
|
no_cache: true
|
||||||
|
|
||||||
- name: email-notification
|
- name: email-notification
|
||||||
@ -491,7 +491,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
build_args:
|
build_args:
|
||||||
- HELM_VERSION=${DRONE_TAG}
|
- GOSEC_VERSION=${DRONE_TAG}
|
||||||
no_cache: true
|
no_cache: true
|
||||||
|
|
||||||
- name: email-notification
|
- name: email-notification
|
||||||
@ -540,7 +540,7 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: container_image_registry_password
|
from_secret: container_image_registry_password
|
||||||
build_args:
|
build_args:
|
||||||
- HELM_VERSION=${DRONE_TAG}
|
- GOSEC_VERSION=${DRONE_TAG}
|
||||||
no_cache: true
|
no_cache: true
|
||||||
|
|
||||||
- name: email-notification
|
- name: email-notification
|
||||||
|
28
Makefile
28
Makefile
@ -5,18 +5,18 @@ GOSEC_VERSION?=v2.12.0 # renovate: datasource=github-releases depName=securego/g
|
|||||||
# CONTAINER_RUNTIME
|
# CONTAINER_RUNTIME
|
||||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
# The CONTAINER_RUNTIME variable will be used to specified the path to a
|
||||||
# container runtime. This is needed to start and run a container image.
|
# container runtime. This is needed to start and run a container image.
|
||||||
CONTAINER_RUNTIME?=$(shell which docker)
|
CONTAINER_RUNTIME?=$(shell which podman)
|
||||||
|
|
||||||
# HELM_IMAGE_REGISTRY_NAME
|
# GOSEC_IMAGE_REGISTRY_NAME
|
||||||
# Defines the name of the new container to be built using several variables.
|
# Defines the name of the new container to be built using several variables.
|
||||||
HELM_IMAGE_REGISTRY_NAME:=docker.io
|
GOSEC_IMAGE_REGISTRY_NAME:=docker.io
|
||||||
HELM_IMAGE_REGISTRY_USER:=volkerraschek
|
GOSEC_IMAGE_REGISTRY_USER:=volkerraschek
|
||||||
|
|
||||||
HELM_IMAGE_NAMESPACE?=${HELM_IMAGE_REGISTRY_USER}
|
GOSEC_IMAGE_NAMESPACE?=${GOSEC_IMAGE_REGISTRY_USER}
|
||||||
HELM_IMAGE_NAME:=gosec
|
GOSEC_IMAGE_NAME:=gosec
|
||||||
HELM_IMAGE_VERSION?=latest
|
GOSEC_IMAGE_VERSION?=latest
|
||||||
HELM_IMAGE_FULLY_QUALIFIED=${HELM_IMAGE_REGISTRY_NAME}/${HELM_IMAGE_NAMESPACE}/${HELM_IMAGE_NAME}:${HELM_IMAGE_VERSION}
|
GOSEC_IMAGE_FULLY_QUALIFIED=${GOSEC_IMAGE_REGISTRY_NAME}/${GOSEC_IMAGE_NAMESPACE}/${GOSEC_IMAGE_NAME}:${GOSEC_IMAGE_VERSION}
|
||||||
HELM_IMAGE_UNQUALIFIED=${HELM_IMAGE_NAMESPACE}/${HELM_IMAGE_NAME}:${HELM_IMAGE_VERSION}
|
GOSEC_IMAGE_UNQUALIFIED=${GOSEC_IMAGE_NAMESPACE}/${GOSEC_IMAGE_NAME}:${GOSEC_IMAGE_VERSION}
|
||||||
|
|
||||||
# BUILD CONTAINER IMAGE
|
# BUILD CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
@ -27,23 +27,23 @@ container-image/build:
|
|||||||
--file Dockerfile \
|
--file Dockerfile \
|
||||||
--no-cache \
|
--no-cache \
|
||||||
--pull \
|
--pull \
|
||||||
--tag ${HELM_IMAGE_FULLY_QUALIFIED} \
|
--tag ${GOSEC_IMAGE_FULLY_QUALIFIED} \
|
||||||
--tag ${HELM_IMAGE_UNQUALIFIED} \
|
--tag ${GOSEC_IMAGE_UNQUALIFIED} \
|
||||||
.
|
.
|
||||||
|
|
||||||
# DELETE CONTAINER IMAGE
|
# DELETE CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY:=container-image/delete
|
PHONY:=container-image/delete
|
||||||
container-image/delete:
|
container-image/delete:
|
||||||
- ${CONTAINER_RUNTIME} image rm ${HELM_IMAGE_FULLY_QUALIFIED} ${HELM_IMAGE_UNQUALIFIED}
|
- ${CONTAINER_RUNTIME} image rm ${GOSEC_IMAGE_FULLY_QUALIFIED} ${GOSEC_IMAGE_UNQUALIFIED}
|
||||||
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULL}
|
- ${CONTAINER_RUNTIME} image rm ${BASE_IMAGE_FULL}
|
||||||
|
|
||||||
# PUSH CONTAINER IMAGE
|
# PUSH CONTAINER IMAGE
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
PHONY+=container-image/push
|
PHONY+=container-image/push
|
||||||
container-image/push:
|
container-image/push:
|
||||||
echo ${HELM_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${HELM_IMAGE_REGISTRY_NAME} --username ${HELM_IMAGE_REGISTRY_USER} --password-stdin
|
echo ${GOSEC_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${GOSEC_IMAGE_REGISTRY_NAME} --username ${GOSEC_IMAGE_REGISTRY_USER} --password-stdin
|
||||||
${CONTAINER_RUNTIME} push ${HELM_IMAGE_FULLY_QUALIFIED}
|
${CONTAINER_RUNTIME} push ${GOSEC_IMAGE_FULLY_QUALIFIED}
|
||||||
|
|
||||||
# PHONY
|
# PHONY
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user