Skip to content

Commit

Permalink
cmd/konflux: track upstream for update-sources…
Browse files Browse the repository at this point in the history
… instead of the same repository...

Signed-off-by: Vincent Demeester <[email protected]>
  • Loading branch information
vdemeester committed Sep 18, 2024
1 parent ac01d2e commit 87c98a3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmd/konflux/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var templateFS embed.FS
type Application struct {
Name string
Repository string
Upstream string
Branch string
Components []string
}
Expand All @@ -32,6 +33,7 @@ type Component struct {

type Config struct {
Repository string
Upstream string
Components []string
}

Expand All @@ -52,6 +54,7 @@ func main() {
app := Application{
Name: c.Repository,
Repository: path.Join("openshift-pipelines", c.Repository),
Upstream: c.Upstream,
Components: c.Components,
Branch: "main",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Clone {{.Repository}}
uses: actions/checkout@v4
with:
repository: {{.Repository}}
repository: {{.Upstream}}
revision: {{"${{matrix.branch}}"}}
path: upstream

Expand Down
2 changes: 1 addition & 1 deletion cmd/konflux/templates/github/workflows/update-sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Clone {{.Repository}}
uses: actions/checkout@v4
with:
repository: {{.Repository}}
repository: {{.Upstream}}
path: upstream

- name: Commit new changes
Expand Down
1 change: 1 addition & 0 deletions config/konflux/tektoncd-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
repository: tektoncd-pipeline
upstream: tektoncd/pipeline
components:
- controller
- entrypoint
Expand Down

0 comments on commit 87c98a3

Please sign in to comment.