-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Use image outputs in examples #217
Use image outputs in examples #217
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
wut |
- name: deploy-bundle-test # 2. Deploy GuestBook and Redis to test cluster | ||
taskRef: | ||
name: deploy-with-kubectl | ||
inputSourceBindings: | ||
- name: workspace | ||
- name: imageToDeploy1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, these should be redisImage
and guestbookImage
/test pull-knative-build-pipeline-integration-tests |
2 similar comments
/test pull-knative-build-pipeline-integration-tests |
/test pull-knative-build-pipeline-integration-tests |
@bobcatfish everything looks fine to me in the yaml examples. but the test is failing for what seems to be an infrastructure issue |
I think there are 2 problems, 1 is an infrastructure problem, the other is that the k8s clusters were upgraded to 1.11 and I think we're running into something similar to kubevirt/kubevirt#1279 |
Since 5AM all CI flows are failing when creating a k8s cluster. I'll investigate. |
Thanks @adrcunha - looks like https://status.cloud.google.com//incident/compute/18012?_ga=2.196962540.-1744253383.1524667138 is over now, so we'll maybe be back to the 1.11 issue which I can look into: /test pull-knative-build-pipeline-integration-tests |
- "'s/image: k8s.gcr.io\/redis:e2e/image: ${inputs.resources.redisImage.url}@{inputs.resources.redisImage.digest}/' ${inputs.params.pathToFiles}" | ||
- name: replaceGuestbookImage | ||
image: busybox | ||
command: ['sed'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feedback from @jonjohnsonjr : I'm going to at least TRY using kustomize before I resign myself to sed
here :D
Should be fixed by #226 🤞 /test pull-knative-build-pipeline-integration-tests |
@@ -34,9 +34,8 @@ spec: | |||
resources: | |||
- name: workspace | |||
type: git | |||
- name: testImage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the test is failing because the testImage
here needs a type of image
cdf57d8
to
30e13da
Compare
PTAL @shashwathi @pivotal-nader-ziada |
30e13da
to
09d4d46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few minor comments
examples/deploy_tasks.yaml
Outdated
- '--namespace' | ||
- '${inputs.clusters.targetCluster.namespace}' | ||
- 'apply' | ||
- '-c' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this -c
be -f
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops!
- name: url | ||
value: https://github.com/grafeas/kritis-test | ||
--- | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are use cases when having tests in a separate repo is valid, for example having acceptance test that make sure products from different repos integrate and deploy properly. Anyways doesn't have to be part of our example, but it was good way to show using multiple git repos in the same task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think that makes perfect sense - I'd like to go ahead with this change since https://github.com/grafeas/kritis-test
doesn't exist, and it's kinda nice to have the examples use real world repos, but if you feel strongly I can leave it as is (with a comment maybe!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m okay with your change :)
- name: cloudconfig | ||
hostPath: | ||
path: ${workspace}/config/gcloud | ||
path: /workspace/config/gcloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the path here refers to /workspace
while the volume mount int the step refers to /root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm I think that's okay, the docs for hostPath
(here) say:
HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.
So I think what this is doing is creating a volume from a dir that exists already on the host (which was mounted into /workspace
via the resource), then in volume mounts it's mounting this dir into a specific location in /root
examples/build_task.yaml
Outdated
@@ -23,5 +23,5 @@ spec: | |||
command: | |||
- /kaniko/executor | |||
args: | |||
- --dockerfile=${pathToDockerFile} | |||
- --destination=$builtImage | |||
- --dockerfile=${inputs.resources.pathToDockerFile} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be inputs.params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
While talking with @jonjohnsonjr about tektoncd#216 I wanted to show him an example of a Pipeline wherein there are Tasks that output Images Resources, which are then used as inputs for subsequent Tasks. Our examples Pipelines were meant to do that, but unfortunately when I looked at them, I realized these were not actually hooked up properly. The Tasks were not actually using the Images that were built by previous Tasks, so I have updated them to do that. I also discovered that the templating was incorrect (#108 - adding tests for these examples - and tektoncd#212 - making sure templated variables are actually used - can't come quickly enough!) so I've updated that in the examples as well.
09d4d46
to
3e4657c
Compare
/lgtm |
While talking with @jonjohnsonjr about #216 I wanted to show him an
example of a Pipeline wherein there are Tasks that output Images
Resources, which are then used as inputs for subsequent Tasks. Our
examples Pipelines were meant to do that, but unfortunately when I
looked at them, I realized these were not actually hooked up properly.
The Tasks were not actually using the Images that were built by previous
Tasks, so I have updated them to do that.
I also discovered that the templating was incorrect (#108 - adding tests
for these examples - and #212 - making sure templated variables are
actually used - can't come quickly enough!) so I've updated that in the
examples as well.