Skip to content

Commit

Permalink
WIP: build entrypoint image for Windows
Browse files Browse the repository at this point in the history
This uses the cmd/combine tool in the plumbing repo to build a combined
base image from distroless and Windows, which cmd/entrypoint will build
on.
  • Loading branch information
imjasonh committed Oct 12, 2021
1 parent 02a2c15 commit 5f80a75
Show file tree
Hide file tree
Showing 31 changed files with 1,940 additions and 38 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/jenkins-x/go-scm v1.10.10
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/tektoncd/plumbing v0.0.0-20210514044347-f8a9689d5bd5
github.com/tektoncd/plumbing v0.0.0-20210924144626-7cb097aa9f95
go.opencensus.io v0.23.0
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions hack/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package tools

import (
_ "github.com/tektoncd/plumbing"
_ "github.com/tektoncd/plumbing/cmd/combine"
_ "github.com/tektoncd/plumbing/scripts"

_ "k8s.io/code-generator/cmd/client-gen"
Expand Down
15 changes: 11 additions & 4 deletions tekton/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
default: "true"
- name: platforms
description: Platforms to publish for the images (e.g. linux/amd64,linux/arm64)
default: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
default: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le,windows/amd64
- name: serviceAccountPath
description: The name of the service account path within the release-secret workspace
workspaces:
Expand Down Expand Up @@ -61,19 +61,26 @@ spec:
steps:

- name: create-ko-yaml
image: busybox
image: golang:1.16
script: |
#!/bin/sh
set -ex
# Combine Distroless with a Windows base image, used for the entrypoint image.
COMBINED_BASE_IMAGE=$(go run ./vendor/github.com/tektoncd/plumbing/cmd/combine/main.go \
gcr.io/distroless/base:debug-nonroot \
mcr.microsoft.com/windows/nanoserver:1809 \
${CONTAINER_REGISTRY}/$(params.package)/combined-base-image:latest)
cat <<EOF > ${PROJECT_ROOT}/.ko.yaml
# This matches the value configured in .ko.yaml
defaultBaseImage: gcr.io/distroless/static:nonroot
baseImageOverrides:
$(params.package)/cmd/git-init: ${CONTAINER_REGISTRY}/$(params.package)/git-init-build-base:latest
# Use the combined base image for entrypoint.
$(params.package)/cmd/entrypoint: ${COMBINED_BASE_IMAGE}
$(params.package)/cmd/git-init: ${CONTAINER_REGISTRY}/$(params.package)/git-init-build-base:latest
# These match values configured in .ko.yaml
$(params.package)/cmd/entrypoint: gcr.io/distroless/base:debug-nonroot
$(params.package)/cmd/pullrequest-init: ${CONTAINER_REGISTRY}/$(params.package)/pullrequest-init-build-base:latest
EOF
Expand Down
27 changes: 27 additions & 0 deletions third_party/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions third_party/github.com/golang/snappy/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

164 changes: 164 additions & 0 deletions third_party/github.com/hashicorp/go-multierror/.circleci/config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions third_party/github.com/hashicorp/go-multierror/.travis.yml

This file was deleted.

29 changes: 24 additions & 5 deletions third_party/github.com/hashicorp/go-multierror/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions third_party/github.com/hashicorp/go-multierror/append.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion third_party/github.com/hashicorp/go-multierror/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions third_party/github.com/hashicorp/go-multierror/multierror.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5f80a75

Please sign in to comment.