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

Include vendored source in release-built images #1338

Merged
merged 1 commit into from
Sep 20, 2019
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# MacOS file viewer garbage.
.DS_Store
imjasonh marked this conversation as resolved.
Show resolved Hide resolved

# Compiled Object files
*.slo
*.lo
Expand Down Expand Up @@ -39,3 +42,7 @@

# Python
*.pyc

# Release-generated source archives, just in case they get committed
# accidentally.
cmd/*/kodata/source.tar.gz
13 changes: 13 additions & 0 deletions tekton/publish-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,19 @@ spec:
# Change to directory with our .ko.yaml
cd /workspace/go/src/github.com/tektoncd/pipeline

# For each cmd/* directory, include a full gzipped tar of all source in
# vendor/. This is overkill. Some deps' licenses require the source to be
# included in the container image when they're used as a dependency.
# Rather than trying to determine which deps have this requirement (and
# probably get it wrong), we'll just targz up the whole vendor tree and
# include it. As of 9/20/2019, this amounts to about 11MB of additional
imjasonh marked this conversation as resolved.
Show resolved Hide resolved
# data in each image.
TMPDIR=$(mktemp -d)
tar cvfz ${TMPDIR}/source.tar.gz vendor/
imjasonh marked this conversation as resolved.
Show resolved Hide resolved
for d in cmd/*; do
ln -s ${TMPDIR}/source.tar.gz ${d}/kodata/
imjasonh marked this conversation as resolved.
Show resolved Hide resolved
done

# Publish images and create release.yaml
ko resolve --preserve-import-paths -f /workspace/go/src/github.com/tektoncd/pipeline/config/ > /workspace/bucket/latest/release.yaml
volumeMounts:
Expand Down