Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Yarn support
Browse files Browse the repository at this point in the history
Florent Biville committed Mar 17, 2020
1 parent 4aed79a commit 02d1d4d
Showing 8 changed files with 37 additions and 3 deletions.
7 changes: 6 additions & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ func TestBuilder(t *testing.T) {
Common: fntesting.Testcase{
PackCmd: []string{"go", "run", "github.com/buildpacks/pack/cmd/pack"},
Repo: "https://github.com/projectriff/fats",
Refspec: "dc9e7758d15c669febee87d7f1801ce596348de1", // master as of 2019-09-19
Refspec: "766043f94a84e30d210258bdfdecb1bc9ca011f1", // master as of 2020-03-09
Input: "builder",
ContentType: "text/plain",
Accept: "text/plain",
@@ -53,6 +53,11 @@ func TestBuilder(t *testing.T) {
SubPath: "functions/uppercase/npm",
SkipRebuild: true,
},
{
Name: "yarn",
SubPath: "functions/uppercase/yarn",
SkipRebuild: true,
},
{
Name: "command",
SubPath: "functions/uppercase/command",
8 changes: 8 additions & 0 deletions builder-dev.toml.tpl
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ buildpacks = [

{ id = "org.cloudfoundry.buildsystem", uri = "https://storage.googleapis.com/cnb-buildpacks/build-system-cnb/org.cloudfoundry.buildsystem-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/build-system-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.node-engine", uri = "https://github.com/cloudfoundry/node-engine-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' }}/node-engine-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.yarn-install", uri = "https://github.com/cloudfoundry/yarn-install-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/yarn-install-cnb").Version' }}/yarn-install-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/yarn-install-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.npm", uri = "https://github.com/cloudfoundry/npm-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' }}/npm-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.openjdk", uri = "https://storage.googleapis.com/cnb-buildpacks/openjdk-cnb/org.cloudfoundry.openjdk-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/openjdk-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
]
@@ -16,6 +17,13 @@ group = [
{ id = "io.projectriff.java" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
{ id = "org.cloudfoundry.yarn-install" },
{ id = "io.projectriff.node" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
10 changes: 9 additions & 1 deletion builder.toml.tpl
Original file line number Diff line number Diff line change
@@ -2,10 +2,11 @@
buildpacks = [
{ id = "io.projectriff.command", uri = "https://storage.googleapis.com/projectriff/command-function-buildpack/io.projectriff.command-0.2.0-BUILD-SNAPSHOT-20200304161811-a66028adfc6d2ab6.tgz" },
{ id = "io.projectriff.java", uri = "https://storage.googleapis.com/projectriff/java-function-buildpack/io.projectriff.java-0.3.0-BUILD-SNAPSHOT-20200306114524-6073f483c0dca242.tgz" },
{ id = "io.projectriff.node", uri = "https://storage.googleapis.com/projectriff/node-function-buildpack/io.projectriff.node-0.3.0-BUILD-SNAPSHOT-20200305115911-75cd6cff81eb1f7f.tgz" },
{ id = "io.projectriff.node", uri = "https://storage.googleapis.com/projectriff/node-function-buildpack/io.projectriff.node-0.3.0-BUILD-SNAPSHOT-20200317151313-a4384bbaf6bcb3d2.tgz" },

{ id = "org.cloudfoundry.buildsystem", uri = "https://storage.googleapis.com/cnb-buildpacks/build-system-cnb/org.cloudfoundry.buildsystem-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/build-system-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.node-engine", uri = "https://github.com/cloudfoundry/node-engine-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' }}/node-engine-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.yarn-install", uri = "https://github.com/cloudfoundry/yarn-install-cnb/releases/download/v0.1.10/yarn-install-cnb-0.1.10.tgz" },
{ id = "org.cloudfoundry.npm", uri = "https://github.com/cloudfoundry/npm-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' }}/npm-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.openjdk", uri = "https://storage.googleapis.com/cnb-buildpacks/openjdk-cnb/org.cloudfoundry.openjdk-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/openjdk-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
]
@@ -17,6 +18,13 @@ group = [
{ id = "io.projectriff.java" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
{ id = "org.cloudfoundry.yarn-install" },
{ id = "io.projectriff.node" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
8 changes: 8 additions & 0 deletions builder.toml.tpl.tpl
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ buildpacks = [

{ id = "org.cloudfoundry.buildsystem", uri = "https://storage.googleapis.com/cnb-buildpacks/build-system-cnb/org.cloudfoundry.buildsystem-{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/build-system-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.node-engine", uri = "https://github.com/cloudfoundry/node-engine-cnb/releases/download/{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' }}/node-engine-cnb-{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/node-engine-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.yarn-install", uri = "https://github.com/cloudfoundry/yarn-install-cnb/releases/download/{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/yarn-install-cnb").Version' }}/yarn-install-cnb-{{ go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/yarn-install-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.npm", uri = "https://github.com/cloudfoundry/npm-cnb/releases/download/{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' }}/npm-cnb-{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/npm-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
{ id = "org.cloudfoundry.openjdk", uri = "https://storage.googleapis.com/cnb-buildpacks/openjdk-cnb/org.cloudfoundry.openjdk-{{tpl_escape go mod download -json | jq -r 'select(.Path == "github.com/cloudfoundry/openjdk-cnb").Version' | sed -e 's/^v//g' }}.tgz" },
]
@@ -16,6 +17,13 @@ group = [
{ id = "io.projectriff.java" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
{ id = "org.cloudfoundry.yarn-install" },
{ id = "io.projectriff.node" },
]

[[order]]
group = [
{ id = "org.cloudfoundry.node-engine" },
1 change: 1 addition & 0 deletions ci/tools.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import (
_ "github.com/buildpacks/pack"
_ "github.com/cloudfoundry/build-system-cnb/buildsystem"
_ "github.com/cloudfoundry/node-engine-cnb/node"
_ "github.com/cloudfoundry/yarn-install-cnb/yarn"
_ "github.com/cloudfoundry/npm-cnb/npm"
_ "github.com/cloudfoundry/openjdk-cnb/jdk"
)
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ require (
github.com/cloudfoundry/build-system-cnb v1.2.15
github.com/cloudfoundry/node-engine-cnb v0.0.168
github.com/cloudfoundry/npm-cnb v0.1.3
github.com/cloudfoundry/yarn-install-cnb v0.1.10
github.com/cloudfoundry/openjdk-cnb v1.2.14
github.com/projectriff/libfnbuildpack v0.4.1
)
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -128,7 +128,9 @@ github.com/cloudfoundry/openjdk-cnb v1.2.14/go.mod h1:QrGb492vBx1bZDFpO6jK2OW7CO
github.com/cloudfoundry/packit v0.0.0-20200213185904-9d0fc689e7af/go.mod h1:L9r26GHPYpUReBWTpkU5BgyDuNVU01JSG4QsHybI0Bg=
github.com/cloudfoundry/packit v0.0.0-20200227210312-ad5e6f66a6a5 h1:gOO9ZGFdIvjr2QvzAbX01nIIsgPWQEQSFzsN1fH98GI=
github.com/cloudfoundry/packit v0.0.0-20200227210312-ad5e6f66a6a5/go.mod h1:L9r26GHPYpUReBWTpkU5BgyDuNVU01JSG4QsHybI0Bg=
github.com/cloudfoundry/packit v0.0.0-20200302171850-93bd55387916/go.mod h1:L9r26GHPYpUReBWTpkU5BgyDuNVU01JSG4QsHybI0Bg=
github.com/cloudfoundry/packit v0.0.0-20200316192019-270fa885ab52/go.mod h1:L9r26GHPYpUReBWTpkU5BgyDuNVU01JSG4QsHybI0Bg=
github.com/cloudfoundry/yarn-install-cnb v0.1.10/go.mod h1:8OO9O82jJaO4h2BC6LYWpmWRIZV7UMut2qqztLj4088=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko=
github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
@@ -634,6 +636,7 @@ golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
2 changes: 1 addition & 1 deletion riff-application-clusterbuilder.yaml
Original file line number Diff line number Diff line change
@@ -4,4 +4,4 @@ kind: ClusterBuilder
metadata:
name: riff-application
spec:
image: cloudfoundry/cnb:0.0.55-bionic
image: cloudfoundry/cnb:0.0.56-bionic

0 comments on commit 02d1d4d

Please sign in to comment.