mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-22 07:08:58 +00:00
Pipeline path configurable
This commit is contained in:
parent
e411893c62
commit
580b7b272f
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/laszlocph/drone-oss-08/model"
|
"github.com/laszlocph/drone-oss-08/model"
|
||||||
|
@ -18,7 +19,8 @@ func (cf *configFetcher) Fetch() ([]*remote.FileMeta, error) {
|
||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Second * time.Duration(i)):
|
case <-time.After(time.Second * time.Duration(i)):
|
||||||
file, fileerr := cf.remote_.File(cf.user, cf.repo, cf.build, cf.repo.Config) // either a file
|
// either a file
|
||||||
|
file, fileerr := cf.remote_.File(cf.user, cf.repo, cf.build, cf.repo.Config)
|
||||||
if fileerr == nil {
|
if fileerr == nil {
|
||||||
return []*remote.FileMeta{&remote.FileMeta{
|
return []*remote.FileMeta{&remote.FileMeta{
|
||||||
Name: cf.repo.Config,
|
Name: cf.repo.Config,
|
||||||
|
@ -26,7 +28,8 @@ func (cf *configFetcher) Fetch() ([]*remote.FileMeta, error) {
|
||||||
}}, nil
|
}}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
dir, direrr := cf.remote_.Dir(cf.user, cf.repo, cf.build, ".drone") // or a folder
|
// or a folder
|
||||||
|
dir, direrr := cf.remote_.Dir(cf.user, cf.repo, cf.build, strings.TrimSuffix(cf.repo.Config, "/"))
|
||||||
if direrr != nil {
|
if direrr != nil {
|
||||||
return nil, direrr
|
return nil, direrr
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue