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

Add new command: hal build #24

Open
cmoulliard opened this issue Sep 11, 2019 · 6 comments
Open

Add new command: hal build #24

cmoulliard opened this issue Sep 11, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@cmoulliard
Copy link
Contributor

New feature

I'm thinking that we need a command hal new-build able to start/trigger a new taskrun build.

hal new-build -c fruit-client-sb

The easiest approach is to delete the taskrun resource which has been created by the operator for the specified component and then a new one will be re-created automatically.
Of course, this approach means that we will not use any update of the buildConfig and that we will deploy a new Task/TaskRun

oc get taskruns
NAME               SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
fruit-backend-sb   True        Succeeded   31m         28m
fruit-client-sb    True        Succeeded   31m         28m

oc delete taskruns/fruit-backend-sb
taskrun.tekton.dev "fruit-backend-sb" deleted

oc get taskruns
NAME               SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
fruit-backend-sb   Unknown     Pending     4s
fruit-client-sb    True        Succeeded   31m         28m
@cmoulliard cmoulliard added the enhancement New feature or request label Sep 11, 2019
@metacosm
Copy link
Contributor

If such a command is introduced, it will be as hal component build. Why is such a command needed? What's the point of re-doing a build if the build config isn't changed?

@cmoulliard
Copy link
Contributor Author

What's the point of re-doing a build if the build config isn't changed?

Simply if you commit a new change within your git hub repo and would like to update the image with this change

@metacosm
Copy link
Contributor

@cmoulliard shouldn't Tekton take care of that scenario?

@cmoulliard
Copy link
Contributor Author

shouldn't Tekton take care of that scenario?

Tekton has developed a client but it don't support to trigger a new build, will also imply that you install another tool after kubectl, hal ,... https://github.com/tektoncd/cli

@metacosm
Copy link
Contributor

shouldn't Tekton take care of that scenario?

Tekton has developed a client but it don't support to trigger a new build, will also imply that you install another tool after kubectl, hal ,... https://github.com/tektoncd/cli

I meant, shouldn't Tekton rebuild images automatically when the associated repo has changed? Isn't that the whole point?

@cmoulliard
Copy link
Contributor Author

Tekton rebuild images automatically when the associated repo

This is not supported by the existing Tekton operator which just creates
a pod from task + taskrun where initcontainers = steps of the build

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

No branches or pull requests

2 participants