Skip to content

Commit

Permalink
dynamic holodeck ci instance name
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>

dynamic holodeck ci instance name

Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Dec 13, 2024
1 parent d3280cd commit 3d43889
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: 2
updates:
- package-ecosystem: "gomod"
target-branch: main
target-branch: ci-dynamicname
directory: "/"
schedule:
interval: "weekly"
Expand All @@ -19,7 +19,7 @@ updates:
- k8s.io/klog/*

- package-ecosystem: "github-actions"
target-branch: main
target-branch: ci-dynamicname
directory: "/"
schedule:
interval: "daily"
10 changes: 6 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ on:
- opened
- synchronize
branches:
- main
- release-*
# - main
# - release-*
- ci-dynamicname
push:
branches:
- main
- release-*
# - main
# - release-*
- ci-dynamicname
schedule:
- cron: '31 11 * * 4'

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ on:
- completed
branches:
- "pull-request/[0-9]+"
- main
- release-*
# - main
# - release-*
- ci-dynamicname

jobs:
e2e-test:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ name: Go
on:
push:
branches:
- main
- release-*
# - main
# - release-*
- ci-dynamicname
pull_request:
branches:
- main
- release-*
# - main
# - release-*
- ci-dynamicname

jobs:
build:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ name: Image
on:
pull_request:
branches:
- 'main'
- 'release-*'
# - 'main'
# - 'release-*'
- ci-dynamicname
push:
tags:
- 'v*.*.*'
branches:
- 'main'
- 'release-*'
# - 'main'
# - 'release-*'
- ci-dynamicname

jobs:
docker:
Expand Down
6 changes: 5 additions & 1 deletion cmd/action/ci/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ func setCfgName(cfg *v1alpha1.Environment) {
// uid is unique for each run
uid := generateUID()

cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid)
if cfg.Name != "" {
cfg.Name = fmt.Sprintf("%s-ci%s-%s-%s", cfg.Name, attempt, sha, uid)
} else {
cfg.Name = fmt.Sprintf("ci%s-%s-%s", attempt, sha, uid)
}
}

func generateUID() string {
Expand Down

0 comments on commit 3d43889

Please sign in to comment.