Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpromo: Use gcr.io/google.com/cloudsdktool/cloud-sdk:slim #415

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Dockerfile-kpromo
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# Build the manager binary
ARG GO_VERSION
ARG OS_CODENAME
# TODO(codename): Consider parameterizing in Makefile based on codename
ARG DISTROLESS_IMAGE
FROM golang:${GO_VERSION}-${OS_CODENAME} as builder

WORKDIR /go/src/sigs.k8s.io/k8s-container-image-promoter
Expand All @@ -40,7 +38,7 @@ RUN go build -trimpath -ldflags '-s -w -buildid= -extldflags "-static"' \
-o kpromo ${package}

# Production image
FROM gcr.io/distroless/${DISTROLESS_IMAGE}:latest
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:slim

LABEL maintainers="Kubernetes Authors"
LABEL description="kpromo: The Kubernetes project artifact promoter"
Expand Down
6 changes: 2 additions & 4 deletions Makefile-kpromo
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SHELL=/bin/bash -o pipefail

REGISTRY ?= gcr.io/k8s-staging-artifact-promoter
IMGNAME = kpromo
IMAGE_VERSION ?= v0.2.1-1
IMAGE_VERSION ?= v0.2.1-2

IMAGE = $(REGISTRY)/$(IMGNAME)

Expand All @@ -26,7 +26,6 @@ TAG ?= $(shell git describe --tags --always --dirty)
# Build args
GO_VERSION ?= 1.17
OS_CODENAME ?= buster
DISTROLESS_IMAGE ?= static-debian10

# Configuration
CONFIG = $(OS_CODENAME)
Expand All @@ -38,8 +37,7 @@ HOST_GOARCH ?= $(shell go env GOARCH)
GO_BUILD ?= go build

BUILD_ARGS = --build-arg=GO_VERSION=$(GO_VERSION) \
--build-arg=OS_CODENAME=$(OS_CODENAME) \
--build-arg=DISTROLESS_IMAGE=$(DISTROLESS_IMAGE)
--build-arg=OS_CODENAME=$(OS_CODENAME)

# Ensure support for 'docker buildx' and 'docker manifest' commands
export DOCKER_CLI_EXPERIMENTAL=enabled
Expand Down
5 changes: 1 addition & 4 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ steps:
- IMAGE_VERSION=$_IMAGE_VERSION
- GO_VERSION=$_GO_VERSION
- OS_CODENAME=$_OS_CODENAME
- DISTROLESS_IMAGE=$_DISTROLESS_IMAGE
args:
- '-c'
- |
Expand All @@ -42,10 +41,9 @@ substitutions:
# vYYYYMMDD-hash, and can be used as a substitution
_GIT_TAG: '12345'
_PULL_BASE_REF: 'dev'
_IMAGE_VERSION: 'v0.2.1-1'
_IMAGE_VERSION: 'v0.2.1-2'
_GO_VERSION: '1.17'
_OS_CODENAME: 'buster'
_DISTROLESS_IMAGE: 'static-debian10'

tags:
- 'cip'
Expand All @@ -55,7 +53,6 @@ tags:
- ${_IMAGE_VERSION}
- ${_GO_VERSION}
- ${_OS_CODENAME}
- ${_DISTROLESS_IMAGE}

images:
# TODO: Temporarily disabling this check, which is currently failing in
Expand Down
6 changes: 0 additions & 6 deletions cmd/kpromo/variants.yaml

This file was deleted.

11 changes: 1 addition & 10 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ dependencies:
- path: Makefile-kpromo
match: OS_CODENAME\ \?=\ (bullseye|buster)

- name: "distroless"
version: static-debian10
refPaths:
# Must match distroless Debian version as well
- path: cloudbuild.yaml
match: "_DISTROLESS_IMAGE: 'static-debian[0-9]{2}'"
- path: Makefile-kpromo
match: DISTROLESS_IMAGE\ \?=\ static-debian[0-9]{2}

# golangci-lint
- name: "golangci-lint"
version: 1.41.1
Expand Down Expand Up @@ -69,7 +60,7 @@ dependencies:
match: go \d+.\d+

- name: "k8s.gcr.io/artifact-promoter/kpromo"
version: v0.2.1-1
version: v0.2.1-2
refPaths:
- path: cloudbuild.yaml
match: v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)-([0-9]+)
Expand Down