Skip to content

Commit 683057d

Browse files
dfreilichchhhavi
andcommitted
Use DeleteBuildpack method
- Add buildpack.toml.tmpl file to allow version templating [#166793497] Co-authored-by: Chhavi Kankaria <ckankaria@pivotal.io>
1 parent 149cc79 commit 683057d

2 files changed

Lines changed: 30 additions & 3 deletions

File tree

buildpack.toml.tmpl

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
[buildpack]
3+
id = "org.cloudfoundry.yarn"
4+
name = "Yarn Buildpack"
5+
version = "{{ .Version }}"
6+
7+
[metadata]
8+
include_files = ["bin/build","bin/detect","buildpack.toml"]
9+
pre_package = "./scripts/build.sh"
10+
11+
[metadata.default_versions]
12+
yarn = "1.16.0"
13+
14+
[[metadata.dependencies]]
15+
id = "yarn"
16+
name = "Yarn"
17+
sha256 = "df202627d9a70cf09ef2fb11cb298cb619db1b958590959d6f6e571b50656029"
18+
source = "https://github.com/yarnpkg/yarn/releases/download/v1.16.0/yarn-v1.16.0.tar.gz"
19+
source_sha256 = "df202627d9a70cf09ef2fb11cb298cb619db1b958590959d6f6e571b50656029"
20+
stacks = ["org.cloudfoundry.stacks.cflinuxfs3","io.buildpacks.stacks.bionic"]
21+
uri = "https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-1.16.0-any-stack-df202627.tar.gz"
22+
version = "1.16.0"
23+
24+
[[stacks]]
25+
id = "org.cloudfoundry.stacks.cflinuxfs3"
26+
27+
[[stacks]]
28+
id = "io.buildpacks.stacks.bionic"

integration/integration_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package integration
22

33
import (
44
"fmt"
5-
"os"
65
"path/filepath"
76
"testing"
87

@@ -27,11 +26,11 @@ func TestIntegration(t *testing.T) {
2726
Expect(err).NotTo(HaveOccurred())
2827
yarnURI, err = dagger.PackageBuildpack(bpDir)
2928
Expect(err).ToNot(HaveOccurred())
30-
defer os.RemoveAll(yarnURI)
29+
defer dagger.DeleteBuildpack(yarnURI)
3130

3231
nodeURI, err = dagger.GetLatestBuildpack("node-engine-cnb")
3332
Expect(err).ToNot(HaveOccurred())
34-
defer os.RemoveAll(nodeURI)
33+
defer dagger.DeleteBuildpack(nodeURI)
3534

3635
spec.Run(t, "Integration", testIntegration, spec.Report(report.Terminal{}))
3736
}

0 commit comments

Comments
 (0)