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

Build entrypoint image for Windows #4260

Merged
merged 1 commit into from
Oct 12, 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
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-20211012143332-c7cc43d9bc0c
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 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a comment on the 1809 tag?

${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