mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Revert "Do not run clone step if no pipeline step will run (#877)"
This reverts commit f05f918b8d.
This commit is contained in:
@@ -37,16 +37,15 @@ import (
|
||||
|
||||
// ProcBuilder Takes the hook data and the yaml and returns in internal data model
|
||||
type ProcBuilder struct {
|
||||
Repo *model.Repo
|
||||
Curr *model.Build
|
||||
Last *model.Build
|
||||
Netrc *model.Netrc
|
||||
Secs []*model.Secret
|
||||
Regs []*model.Registry
|
||||
Link string
|
||||
Yamls []*remote.FileMeta
|
||||
Envs map[string]string
|
||||
IncludeEmpty bool
|
||||
Repo *model.Repo
|
||||
Curr *model.Build
|
||||
Last *model.Build
|
||||
Netrc *model.Netrc
|
||||
Secs []*model.Secret
|
||||
Regs []*model.Registry
|
||||
Link string
|
||||
Yamls []*remote.FileMeta
|
||||
Envs map[string]string
|
||||
}
|
||||
|
||||
type BuildItem struct {
|
||||
@@ -115,7 +114,7 @@ func (b *ProcBuilder) Build() ([]*BuildItem, error) {
|
||||
|
||||
ir := b.toInternalRepresentation(parsed, environ, metadata, proc.ID)
|
||||
|
||||
if len(ir.Stages) == 0 && !b.IncludeEmpty {
|
||||
if len(ir.Stages) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -139,6 +138,7 @@ func (b *ProcBuilder) Build() ([]*BuildItem, error) {
|
||||
items = filterItemsWithMissingDependencies(items)
|
||||
|
||||
// check if at least one proc can start, if list is not empty
|
||||
procListContainsItemsToRun(items)
|
||||
if len(items) > 0 && !procListContainsItemsToRun(items) {
|
||||
return nil, fmt.Errorf("build has no startpoint")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user