Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing SOURCE_PATH for package #548

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ package:
include_dependencies: false
register: true
registry_token: ${{ secrets.JAVA_REGISTRY_TOKEN }}
source_path: subdir/adoptium
platform:
os: linux
```
Expand All @@ -137,6 +138,8 @@ package:

`package` is an object that describes the `repository` a buildpackage should be published to as well as whether to include the buildpackage's dependencies when creating it (`false` by default). If defined, a `create-package` workflow is created that creates and publishes a new package when a release is published as well as adds a `create-package` job to the tests workflow that is run on each PR and each commit. It will also add additional content to the draft release notes about the contents of the build package and will update the digest of the buildpackage in the published release notes. If `register` is `true`, after the package is created, it is registered with the [Buildpack Registry Index](https://github.com/buildpacks/registry-index).

`source_path` is the optional path to the buildpack's directory relative to the repository's root. Defaults to the repository root.

`platform` describes what platform the created package should be built for. `os` can be set to `linux` or `windows` (`linux` by default).

#### `builder`
Expand Down Expand Up @@ -227,15 +230,15 @@ path: ..
offline_packages:
- source: paketo-buildpacks/adoptium
target: gcr.io/tanzu-buildpacks/adoptium
path: subdir/adoptium
tag_prefix: my-buildpack/
source_path: subdir/adoptium
platform:
os: linux
```

`offline_packages` is a list of objects that describe a `source` GitHub repository and a `target` Docker registry location. If defined, each object will create a `create-package` workflow that is responsible for detecting a new online buildpackage release and creating a matching offline buildpackage release and publishing it.

`path` is the optional path to the buildpack's directory relative to the repository's root. Defaults to the repository root.
`source_path` is the optional path to the buildpack's directory relative to the repository's root. Defaults to the repository root.

`tag_prefix` is the optional prefix to filter for when detecting the buildpack's version via tags. Defaults to empty string.

Expand Down
1 change: 1 addition & 0 deletions octo/create_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func ContributeCreatePackage(descriptor Descriptor) (*Contribution, error) {
"INCLUDE_DEPENDENCIES": strconv.FormatBool(descriptor.Package.IncludeDependencies),
"OS": descriptor.Package.Platform.OS,
"VERSION": "${{ steps.version.outputs.version }}",
"SOURCE_PATH": descriptor.Package.SourcePath,
},
},
{
Expand Down
1 change: 1 addition & 0 deletions octo/descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ type Package struct {
Register bool
RegistryToken string `yaml:"registry_token"`
Platform Platform
SourcePath string `yaml:"source_path"`
}

const (
Expand Down