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

Update tekton task to Platform API 0.2 #2

Closed
jromero opened this issue Sep 3, 2019 · 5 comments
Closed

Update tekton task to Platform API 0.2 #2

jromero opened this issue Sep 3, 2019 · 5 comments
Assignees

Comments

@jromero
Copy link
Member

jromero commented Sep 3, 2019

Update tekton template to adhere to Platform API version 0.2.

Additional Considerations

Acceptance Criteria

AC1. Platform API verification

Given the tekton task is configured for Platform API version 0.2
When I provide a builder with lifecycle implementing to Platform API version 0.3
Then task should fail with error message:
`Lifecycle's Platform API version is 0.3 which is incompatible with Platform API version 0.2`

Notes

Relates to:

Blocked by:

@zmackie
Copy link

zmackie commented Jan 12, 2020

Is there any sort of versioning associated with the template? Maybe that's something we should do (if possible).

@jromero
Copy link
Member Author

jromero commented Jan 14, 2020

I was thinking about this... We could create a yaml file per platform API version (or keep older versions in a directory). Otherwise I can't think of a versioning mechanism since it's not our repository.

@zmackie zmackie transferred this issue from buildpacks/lifecycle Jan 21, 2020
@jromero jromero changed the title Update tekton template for new lifecycle Update tekton task to Platform API 0.2 Jan 27, 2020
@natalieparellano
Copy link
Member

natalieparellano commented Feb 4, 2020

Acceptance steps:

  • Setup a local k8s cluster
    • Docker > Preferences > Kubernetes > Enable Kubernetes > Apply & Restart
    • kubectl config current-context should be docker-desktop
  • Run a local registry
    • docker run --detach -p5000:5000 registry:2
  • Permit insecure registry:
    • Docker > Preferences > Docker Engine > add the line "insecure-registries" : ["localhost:5000"] > Apply & Restart
  • Install tekton
    • kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
  • Install buildpacks task
    • kubectl apply -f ./buildpacks-v3.yaml
  • Apply taskrun
    • Edit the example under Usage in the README
    • output url will look like <your external ip>:5000/some-output-image
    • kubectl apply -f <path to task run yaml>
  • See task succeed
  • See output image written to registry
    • docker pull localhost:5000/some-output-image

To test persistent cache:

  • Create a persistent volume pointing to local cache directory
    • mkdir <some dir>
    • ensure the directory is writable by the world: chmod 777 <some dir>
    • edit pv-volume.yaml to have the correct host path
    • kubectl apply -f <path to volume yaml>
  • Create a persistent volume claim
    • kubectl apply -f https://k8s.io/examples/pods/storage/pv-claim.yaml
  • Update the taskrun
    • Uncomment the lines that pertain to caching
  • Apply taskrun
    • kubectl apply -f <path to task run yaml>
  • See task succeed
  • See items in the cache directory

cc @micahyoung

@dfreilich
Copy link
Member

@natalieparellano Was this taken care of?

@natalieparellano
Copy link
Member

Yep!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants