GithubHelp home page GithubHelp logo

bitsarvi / ocios-resource Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 45 KB

A concourse resource for interacting with Oracle Cloud Infrastructure's Object Storage

License: Apache License 2.0

Python 100.00%

ocios-resource's Introduction

OCI Object Storage Resource

A concourse resource for interacting with Oracle Cloud Infrastructure's Object Storage

This resource is based on the official S3 resource.

Source Configuration

  • ns (required): the namespace containing the bucket

  • bucket (required): the name of the bucket.

  • config (required): the various configuration entities required by the OCI APIs. Example:

    config: |
      {
        "user": "...",
        "fingerprint": "...",
        "apikey": "...",
        "tenancy": "...",
        "region": "..."
      }
    

File Names

One of the following two options must be specified:

  • regexp: the pattern to match filenames against within a bucket. The first grouped match is used to extract the version.

    The version extracted from this pattern is used to version the resource. Semantic versions, or just numbers, are supported. Accordingly, full regular expressions are supported, to specify the capture groups.

Behavior

check: Extract versions from the bucket.

Objects will be found via the pattern configured by regexp. The versions will be used to order them (using semver). Each object's filename is the resulting version.

in: Fetch an object from the bucket.

Places the following files in the destination:

  • (filename): the file fetched from the bucket.

  • regexp: the pattern to match filenames against within a bucket. The first grouped match is used to extract the version.

  • version: the version identified in the file name (only if using regexp).

Parameters

None

out: Upload an object to the bucket.

Given a file specified by file, upload it to the OCI Object Storage bucket.

Parameters

  • file (required): path to the file to upload, provided by an output of a task. If multiple files are matched by the glob, an error is raised. The file which matches will be placed into the directory structure on GCS as defined in regexp in the resource definition. The matching syntax is bash glob expansion, so no capture groups, etc.

Example Configuration

Resource Type

resource_types:
  - name: ocios-resource
    type: docker-image
    source:
      repository: bitsarvi/ocios-resource

Resource

resources:
  - name: release
    type: ocios-resource
    source:
      bucket: releases
      config: <OCI-SDK-API-CONFIG-CONTENTS>

Plan

- get: release
- put: release
  params:
    file: path/to/release-*.tgz

Developing on this resource

First get the resource via: go get github.com/bitsarvi/ocios-resource

Run the unit-tests: make

Run the integration-tests: make integration-tests

Developing using Concourse

Clone this repository and just run one-off task with concourse

fly -t ConcourseTarget execute -c build.yml -i ocios-resource=. -o built-resource=.

Just build the Docker image to be use inside your pipeline

 docker build -t bitsarvi/ocios-resource .

ocios-resource's People

Contributors

bitsarvi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.