Skip to content

Commit

Permalink
fix(openfaas): builder now works on all platforms
Browse files Browse the repository at this point in the history
And considerably more elegant too!
  • Loading branch information
edvald committed Oct 28, 2018
1 parent 641a07c commit 529f63c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
7 changes: 3 additions & 4 deletions garden-service/src/plugins/openfaas/openfaas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function gardenPlugin({ config }: { config: OpenFaasConfig }): GardenPlug
config = validate(config, configSchema, { context: "OpenFaaS provider config" })

return {
modules: [join(STATIC_DIR, "openfaas", "builder")],
modules: [join(STATIC_DIR, "openfaas", "templates")],
actions: {
async getEnvironmentStatus({ ctx }: GetEnvironmentStatusParams) {
const ofGarden = await getOpenFaasGarden(ctx)
Expand Down Expand Up @@ -155,10 +155,10 @@ export function gardenPlugin({ config }: { config: OpenFaasConfig }): GardenPlug
)

moduleConfig.build.dependencies.push({
name: "builder",
name: "templates",
plugin: "openfaas",
copy: [{
source: "templates/template",
source: "template",
target: ".",
}],
})
Expand Down Expand Up @@ -187,7 +187,6 @@ export function gardenPlugin({ config }: { config: OpenFaasConfig }): GardenPlug
getBuildStatus: getGenericModuleBuildStatus,

async build({ ctx, module }: BuildModuleParams<OpenFaasModule>) {
// prepare the stack.yml file, before handing off the build to the generic handler
await writeStackFile(ctx, module, {})

const buildLog = await faasCli.stdout({
Expand Down
6 changes: 0 additions & 6 deletions garden-service/static/openfaas/builder/Dockerfile

This file was deleted.

14 changes: 0 additions & 14 deletions garden-service/static/openfaas/builder/garden.yml

This file was deleted.

5 changes: 5 additions & 0 deletions garden-service/static/openfaas/templates/garden.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module:
description: OpenFaaS templates for building functions
name: templates
type: generic
repositoryUrl: https://github.com/openfaas/templates.git#master

0 comments on commit 529f63c

Please sign in to comment.