Coder Social home page Coder Social logo

johnbieren / contra-env-sample-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from centos-paas-sig/contra-env-sample-project

0.0 2.0 0.0 4.92 MB

This is a sample project to use for OpenShift s2i Templates and Jenkins Pipelines

License: GNU General Public License v3.0

Dockerfile 13.63% Shell 11.32% Groovy 75.05%

contra-env-sample-project's Introduction

contra-env-sample-project

This is a sample project to use for OpenShift s2i Templates and Jenkins Pipelines

Job DSL Support

This project by default will create a freestyle job called "dsl_seed" that is meant to load your pipeline repo along with openshift/contra-lib. Contra-lib is loaded to provide library support. To use the dsl_seed job, follow these steps.

Create the directories

mkdir -p your-pipeline-repo/src/jobs

Add a script to the jobs directory

This example creates a job called samplePipelineJob and leverages the class PipelineJob in openshift/contra-lib.

import org.centos.contra.jobdsl.PipelineJob


def job = new PipelineJob(this, 'samplePipelineJob')
job.fedMsgTrigger('org.fedoraprojectb', 'fedora-fedmsg', ['check1': 'value1'])
job.addGit([branch: 'master', repoUrl: 'https://github.com/CentOS-PaaS-SIG/contra-env-sample-project.git'])
job.logRotate()

Install Jenkins

Use the provided OpenShift template and provide the link to your pipeline repo.

oc new-app -f jenkins-persistent.yml -p DSL_JOB_REPO=githubOrg/pipeline-repo

Custom Shared Libraries

This project adds contra-lib and contra-library as shared libraries to the Jenkins master automatically. However, the user can change which shared libraries are added. To do so, navigate to sharedLibConfigs. Each json file represents a shared library. Any number of json files can be added or removed from this directory. Supported fields include the name of the library (required), the url to it (required), and the following optional fields: refspec, implicit, and branch.

contra-env-sample-project's People

Contributors

joejstuart avatar arilivigni avatar johnbieren avatar robnester-rh avatar p3ck avatar 14rcole avatar dirgim avatar

Watchers

James Cloos avatar  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.