mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 08:49:15 +00:00
fixed some minor bugs in build
This commit is contained in:
@@ -102,7 +102,7 @@ func run(client dockerclient.Client, conf *dockerclient.ContainerConfig, pull bo
|
||||
id, err = client.CreateContainer(conf, "")
|
||||
// make sure the container is removed in
|
||||
// the event of a creation error.
|
||||
if len(id) != 0 {
|
||||
if err != nil && len(id) != 0 {
|
||||
client.RemoveContainer(id, true, true)
|
||||
}
|
||||
if err != nil {
|
||||
|
@@ -134,11 +134,12 @@ func runSteps(c *Context, steps map[string]*common.Step) (int, error) {
|
||||
|
||||
// verify the step matches the branch
|
||||
// and other specifications
|
||||
if step.Condition == nil ||
|
||||
!step.Condition.MatchOwner(c.Repo.Owner) ||
|
||||
!step.Condition.MatchBranch(c.Clone.Branch) ||
|
||||
!step.Condition.MatchMatrix(c.Build.Environment) {
|
||||
continue
|
||||
if step.Condition != nil {
|
||||
if !step.Condition.MatchOwner(c.Repo.Owner) ||
|
||||
!step.Condition.MatchBranch(c.Clone.Branch) ||
|
||||
!step.Condition.MatchMatrix(c.Build.Environment) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
conf := toContainerConfig(step)
|
||||
|
Reference in New Issue
Block a user