Pipeline CPS ORAS

Build Status Jenkins Plugin GitHub release Contributors

Introduction

This plugin allow to fetch pipeline scripts (CPS) stored into a OCI compliant registry (ORAS).

Warning

The ORAS Java SDK is currently in alpha state and might impact the stability of this plugin.

It's configuration and APIs might change in future releases

banner

Getting started

When configuring a pipeline job, just select the "Pipeline script from ORAS" option in the "Definition" section.

Credentials are optional if using an unsecured registry, otherwise you need to provide a username/password credential.

config.png

In order to consume a pipeline script artifact it need to have the following media type: application/vnd.jenkins.pipeline.manifest.v1+json

You can push such an artifact using the ORAS CLI:

oras push localhost:5000/hello:latest --artifact-type application/vnd.jenkins.pipeline.manifest.v1+json Jenkinsfile

You can also package a folder and use scriptPath in the configuration to reference the pipeline script.

In that case the artifact must have the following artifact type: application/vnd.jenkins.repo.manifest.v1+json

oras push localhost:5000/hello:latest --artifact-type application/vnd.jenkins.repo.manifest.v1+json .

You will see then on the logs the digest of the pipeline script artifact

log.png

LICENSE

Licensed under MIT, see LICENSE