mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 17:25:52 +00:00
a bit of prep-work for adding caching
This commit is contained in:
@@ -6,6 +6,10 @@ import (
|
||||
)
|
||||
|
||||
type Repo struct {
|
||||
// The name of the Repository. This should be the
|
||||
// canonical name, for example, github.com/drone/drone.
|
||||
Name string
|
||||
|
||||
// The path of the Repoisotry. This could be
|
||||
// the remote path of a Git repository or the path of
|
||||
// of the repository on the local file system.
|
||||
|
@@ -61,6 +61,10 @@ type Build struct {
|
||||
// hostname mappings.
|
||||
Hosts []string
|
||||
|
||||
// Cache lists a set of directories that should
|
||||
// persisted between builds.
|
||||
Cache []string
|
||||
|
||||
// Services specifies external services, such as
|
||||
// database or messaging queues, that should be
|
||||
// linked to the build environment.
|
||||
@@ -108,6 +112,12 @@ func (b *Build) WriteBuild(f *buildfile.Buildfile) {
|
||||
f.WriteEnv(parts[0], parts[1])
|
||||
}
|
||||
|
||||
// add hostfile definitions
|
||||
//for _, mapping := range b.Hosts {
|
||||
// f.WriteCmdSilent(fmt.Sprintf("[ -f /usr/bin/sudo ] || echo %q | tee -a /etc/hosts", mapping))
|
||||
// f.WriteCmdSilent(fmt.Sprintf("[ -f /usr/bin/sudo ] && echo %q | sudo tee -a /etc/hosts", mapping))
|
||||
//}
|
||||
|
||||
// append build commands
|
||||
for _, cmd := range b.Script {
|
||||
f.WriteCmd(cmd)
|
||||
|
Reference in New Issue
Block a user