Closed michaelsauter closed 10 months ago
My first impression is this is going in the right direction.
The example at https://github.com/BIX-Digital/ods-pipeline-go does not verify that with build caching the second run works. I believe the code could be adjusted to allow for this. Would this be the way forward or do you have other thoughts on how this would be addressed with the tasks in their own repo?
My first impression is this is going in the right direction.
The example at https://github.com/BIX-Digital/ods-pipeline-go does not verify that with build caching the second run works. I believe the code could be adjusted to allow for this. Would this be the way forward or do you have other thoughts on how this would be addressed with the tasks in their own repo?
Cool!
I just left testing for build caching out to avoid initial effort. It should be possible to add this back in.
I like to reaffirm that I find these changes to be a great improvement. Awesome work :rocket: Before eventually merging this let's ensure that we only expose things publicly that we are comfortable with. My suggestion is to continue to keep this in mind, and also dedicate a bit of work at the end to make it so.
I have converted quite a few tasks (https://github.com/opendevstack/ods-pipeline-image, https://github.com/opendevstack/ods-pipeline-helm, https://github.com/opendevstack/ods-pipeline-npm, https://github.com/opendevstack/ods-pipeline-gradle, https://github.com/opendevstack/ods-pipeline-go, https://github.com/opendevstack/ods-pipeline-sonar) to this new structure and so far things are going smooth. However this is a lot of manual work so I am taking some shortcuts, e.g. just porting one test. Instead of waiting for everything to be fully done, I would merge this PR so that direction etc. is fully clear, and there is no duplicated work.
In regards to what is made public, you can browse the new packages at https://pkg.go.dev/github.com/opendevstack/ods-pipeline@v0.13.3-0.20230913064953-c7df840415df/pkg/tektontaskrun and https://pkg.go.dev/github.com/opendevstack/ods-pipeline@v0.13.3-0.20230913064953-c7df840415df/pkg/odstasktest. Is there anything in particular that you think should not be public?
Overall I think we are still pre-v1. I would expect some follow-up fixes from the refactoring that has been done, and once everything runs stable I think we can move the central repo to v1.
@henrjk What do you think?
I have converted quite a few tasks (https://github.com/opendevstack/ods-pipeline-image, https://github.com/opendevstack/ods-pipeline-helm, https://github.com/opendevstack/ods-pipeline-npm, https://github.com/opendevstack/ods-pipeline-gradle, https://github.com/opendevstack/ods-pipeline-go, https://github.com/opendevstack/ods-pipeline-sonar) to this new structure and so far things are going smooth. However this is a lot of manual work so I am taking some shortcuts, e.g. just porting one test. Instead of waiting for everything to be fully done, I would merge this PR so that direction etc. is fully clear, and there is no duplicated work.
In regards to what is made public, you can browse the new packages at https://pkg.go.dev/github.com/opendevstack/ods-pipeline@v0.13.3-0.20230913064953-c7df840415df/pkg/tektontaskrun and https://pkg.go.dev/github.com/opendevstack/ods-pipeline@v0.13.3-0.20230913064953-c7df840415df/pkg/odstasktest. Is there anything in particular that you think should not be public?
Overall I think we are still pre-v1. I would expect some follow-up fixes from the refactoring that has been done, and once everything runs stable I think we can move the central repo to v1.
@henrjk What do you think?
👍 As we believe this is a much better way forward we should make this the mainline quickly. I expect it to take some more exposure to the wider ecosystem of tasks ods-pipeline can use with this before we should commit to a v1. We should also work on upgrading the kubernetes/tekton versions used soon to enable task compatibility, but in my mind at least this could be done quicker after this is merged.
Provide Go package(s) allowing to develop tasks easily in external Git repositories. Eventually, the goal is to extract the build / package / deploy tasks from this repo and have them in separate Git repositories with independent lifecycle.
Package
tektontaskrun
provides ODS Pipeline independent functionality to run Tekton tasks in a KinD cluster. The code is mostly copied fromtest/tasks/common_test.go
andpkg/tasktesting
. Packageodstasktest
builds on top oftektontaskrun
and provides ODS Pipeline specific functionality to run ODS Pipeline tasks (e.g. installing ODS Pipeline, starting Nexus, etc.).As a side-effect, the new approach allows to just run the Go tests without requiring to prepare any state upfront. All dependencies will be taken care of by the Go packages. As an example, here is how an external repo can use this:
This is still very much in progress.
For two examples using this PR, see https://github.com/BIX-Digital/ods-pipeline-go and https://github.com/BIX-Digital/ods-pipeline-sonar.
Closes #163
Tasks:
docs/design
directory or not applicabledocs
directory or not applicablemake test
) or not applicable