add skipBuild for non-Node/Python images
This commit is contained in:
12
app.go
12
app.go
@@ -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 {
|
||||
|
||||
2
build.sh
2
build.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user