Skip to content

Commit

Permalink
add skipBuild for non-Node/Python images
Browse files Browse the repository at this point in the history
  • Loading branch information
alexellis committed Jun 1, 2017
1 parent 949e450 commit 5b57b46
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 8 additions & 4 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,14 @@ func main() {
case "build":
if len(services.Functions) > 0 {
for k, function := range services.Functions {
function.Name = k
// fmt.Println(k, function)
fmt.Printf("Building: %s.\n", function.Name)
buildImage(function.Image, function.Handler, function.Name, function.Language, nocache)
if function.SkipBuild {
fmt.Printf("Skipping build of: %s.\n", function.Name)
} else {
function.Name = k
// fmt.Println(k, function)
fmt.Printf("Building: %s.\n", function.Name)
buildImage(function.Image, function.Handler, function.Name, function.Language, nocache)
}
}
} else {
if len(image) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

docker build -t faas-cli . && \
docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t faas-cli . && \
docker create --name faas-cli faas-cli && \
docker cp faas-cli:/root/faas-cli . && \
docker rm -f faas-cli
Expand Down
2 changes: 2 additions & 0 deletions schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type Function struct {
FProcess string `yaml:"fprocess"`

Environment map[string]string `yaml:"environment"`

SkipBuild bool `yaml:"skipBuild"`
}

// Services root level YAML file to define FaaS function-set
Expand Down

0 comments on commit 5b57b46

Please sign in to comment.