-
-
Notifications
You must be signed in to change notification settings - Fork 371
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
Pipeline compiler should not alter specified image #1005
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1005 +/- ##
==========================================
- Coverage 50.47% 50.40% -0.08%
==========================================
Files 83 83
Lines 6363 6363
==========================================
- Hits 3212 3207 -5
- Misses 2965 2970 +5
Partials 186 186
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
let's wait ~1-2days and if no errors get reported it's fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will still need to remove the workaround here, which was added for the old behavior:
diff --git a/pipeline/backend/local/local.go b/pipeline/backend/local/local.go
index e1215a00..cc636fb9 100644
--- a/pipeline/backend/local/local.go
+++ b/pipeline/backend/local/local.go
@@ -62,7 +62,7 @@ func (e *local) Exec(ctx context.Context, proc *types.Step) error {
Command = append(Command, "plugin-git")
} else {
// Use "image name" as run command
- Command = append(Command, proc.Image[18:len(proc.Image)-7])
+ Command = append(Command, proc.Image)
Command = append(Command, "-c")
// Decode script and delete initial lines
Otherwise this happens:
panic: runtime error: slice bounds out of range [18:2]
goroutine 44 [running]:
github.com/woodpecker-ci/woodpecker/pipeline/backend/local.(*local).Exec(0x1400026b920, {0x1011d0758?, 0x14000596940}, 0x140005dcd20)
/Users/florian/dev/woodpecker/pipeline/backend/local/local.go:65 +0x8a0
github.com/woodpecker-ci/woodpecker/pipeline.(*Runtime).exec(0x1400052c070, 0x140005dcd20)
/Users/florian/dev/woodpecker/pipeline/pipeline.go:216 +0x140
github.com/woodpecker-ci/woodpecker/pipeline.(*Runtime).execAll.func1()
/Users/florian/dev/woodpecker/pipeline/pipeline.go:181 +0x1b8
golang.org/x/sync/errgroup.(*Group).Go.func1()
/Users/florian/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x5c
created by golang.org/x/sync/errgroup.(*Group).Go
/Users/florian/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:72 +0xa4
If the slicing is removed, the changes work for my use-cases.
Thanks a lot! |
address #1003
tested :)