drnic / pack-concourse-resource

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pack CLI Concourse 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

Source Configuration

  • repository: Required. The name of the repository that you want to build e.g bstick12/built-with-pack
  • username: Required. The username to authenticate with when pushing
  • password: Required. The password to use when authenticating

Behaviour

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

Parameters

  • build: Required. The source code to build in to the OCI image.
  • builder: Optional. The builder to use to build the OCI image.

Example

---
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))

About


Languages

Language:Shell 73.3%Language:Dockerfile 19.2%Language:Makefile 7.5%