You should probably look at using the lifecycle-build
task instead of this resource.
A proof of concept concourse resource that builds OCI images using the pack-cli
Uses Docker in Docker so must be run a privileged.
It borrows heavily from the docker-image-resource
It utilizes the in
and check
behaviours from the registry-image-resource
Currently will only work with buildpacks that are build using pack
> v0.0.9
repository
: Required. The name of the repository that you want to build e.gbstick12/built-with-pack
tag
: Optional. The tag value for the image. Defaults tolatest
username
: Required. The username to authenticate with when pushingpassword
: Required. The password to use when authenticating
check
: Discover new digests
See registry-image-resource/check
in
: Fetch the image's rootfs and metadata
See registry-image-resource/in
out
: Build an OCI image using the pack
CLI and push to a repository
build
: Required. The source code to build in to the OCI image.builder
: Optional. The builder to use to build the OCI image.tag
: Optional. Name of tag. Defaults tolatest
. Overridden bytag_file
.tag_file
: Optional. The value should be a path to a file containing the name of the tag.tag_prefix
: Optional. If specified, the tag read from the file will be prepended with this string. This is useful for addingv
in front of version numbers.
---
resources:
- name: git-resource
type: git
source: # ...
- name: pack-built-image
type: pack-image-resource
source:
repository: ((image-name))
email: ((docker-hub-email))
username: ((docker-hub-username))
password: ((docker-hub-password))
resource_types:
- name: pack-image-resource
type: docker-image
privileged: true
source:
repository: bstick12/pack-concourse-resource
version: latest
jobs:
- name: build-source-using-pack-image-resource
plan:
- get: git-resource
trigger: true
- put: pack-built-image
params:
build: pack-built-image
builder: ((pack-builder-image))