Skip to content

Commit

Permalink
WIP: build entrypoint image for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
imjasonh committed Sep 26, 2021
1 parent 5681ce9 commit 2b0405c
Show file tree
Hide file tree
Showing 13 changed files with 1,319 additions and 21 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
2 changes: 2 additions & 0 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/ \
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
2 changes: 1 addition & 1 deletion vendor/github.com/tektoncd/plumbing/DEVELOPMENT.md

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

1 change: 0 additions & 1 deletion vendor/github.com/tektoncd/plumbing/OWNERS

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

65 changes: 65 additions & 0 deletions vendor/github.com/tektoncd/plumbing/cmd/combine/README.md

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

120 changes: 120 additions & 0 deletions vendor/github.com/tektoncd/plumbing/cmd/combine/main.go

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

3 changes: 2 additions & 1 deletion vendor/github.com/tektoncd/plumbing/go.mod

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

Loading

0 comments on commit 2b0405c

Please sign in to comment.