Skip to content

feat: add support for oci tasks - #205

Open
willswire wants to merge 5 commits into
mainfrom
feat/oci-tasks
Open

feat: add support for oci tasks#205
willswire wants to merge 5 commits into
mainfrom
feat/oci-tasks

Conversation

@willswire

@willswire willswire commented Mar 28, 2025

Copy link
Copy Markdown
Member

Description

This is an experimental change!!

Adds initial support for including OCI artifacts as tasks.

Try it out!

  1. Build with go build
  2. Run a docker registry locally with: docker run -d -p 5000:5000 --name registry registry:2.7
  3. Create a tasks file to push remotely:
# hello.yaml
tasks:
  - name: world
    actions:
      - cmd: echo "Hello from an OCI artifact task!"
      - cmd: echo "This task is being executed from a container registry."

  - name: inputs
    inputs:
      name:
        description: "Your name"
        default: "Friend"
      message:
        description: "Custom message"
        default: "Welcome to Maru OCI tasks!"
    actions:
      - cmd: echo "Hello, ${INPUT_NAME}!"
      - cmd: echo "${INPUT_MESSAGE}"
  1. Push with ./maru-runner push --insecure hello.yaml oci://localhost:5000/hello:0.0.1
  2. Create a tasks file to include the remote artifact:
# tasks.yaml
includes:
  - hello: oci://localhost:5000/hello:0.0.1

tasks:
  - name: default
    actions:
      - cmd: echo "Testing OCI artifact integration"
      - task: hello:world

  - name: with-args
    actions:
      - task: hello:inputs
        with:
          name: "OCI Test User"
          message: "This is a test of the OCI tasks feature!"
  1. Run with ./maru-runner run --insecure

The --insecure flag is only required for insecure registries. Push/pull to Docker Hub or GHCR to test out secure pushes and includes.

Related Issue

Supersedes #204

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@willswire
willswire force-pushed the feat/oci-tasks branch 2 times, most recently from 1c560c3 to d700282 Compare March 31, 2025 14:54
@willswire
willswire marked this pull request as ready for review March 31, 2025 14:54
@willswire
willswire requested a review from a team March 31, 2025 14:54
@willswire
willswire requested a review from a team as a code owner March 31, 2025 14:54
@andrewg-xyz
andrewg-xyz requested a review from a team as a code owner July 10, 2025 13:44
@willswire
willswire requested a review from a team as a code owner December 11, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant