Git Product home page Git Product logo

jenkins-job-builder's Introduction

Jenkins job builder project

Jenkins job builder (JJB) is an additional application which takes simple descriptions of Jenkins jobs in YAML or JSON format and uses them to configure Jenkins. This project contains Windows and Linux version Jenkins job builder files for running postman collections with Jenkins from this project.

Tools

Jenkins and Jenkins job builder

Usage

How to add jobs in Jenkins on Windows

  • open command line
  • check python version python --version
    • if python doesn't find install from Python
  • check python version pip --version
    • if python doesn't find install
      • curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
      • python python3-pip -y
  • install jenkins job builder pip install jenkins-job-builder
  • check jenkins job builder in your OS jenkins-jobs
    • if previous command doesn't exist check/refresh in $PATH correct path to python scripts folder [$user.dir]\Python\Python<version>\Scripts
  • check Node.js node -v
    • if Node.js doesn't find install version 8.X or 10.X from Node.js
  • check Newman newman -v
    • if Newman doesn't find install with Node.js npm install -g newman
  • clone repository with JJB files git clone https://github.com/MaryGeraseva/4-jenkins-job-builder.git
  • go to folder with windows files version cd [$user.dir]/4-jenkins-job-builder/windows
  • start your Jenkins and open personal configuration localhost:8080/me/configure

alt text

  • add user token

alt text

  • generate and copy user token

alt text

alt text

  • open configuration file jenkins_jobs.ini in [$user.dir]/4-jenkins-job-builder/windows
    and correct personal authentication data [$user-name] and [$user-token]
  • add jobs with JJB from command-line
    jenkins-jobs --conf ./jenkins_jobs.ini update ./jobs.yaml
  • check changes in your Jenkins

How to add jobs in Jenkins on Linux in docker container

There is my version of Jenkins docker image.
This image based on the official Jenkins docker image and also includes Node.js, Newman, Python, PIP, VIM, and JJB.
This is a fully completed solution for working with Jenkins, JJB, and Postman collections.

  • open command line
  • check Docker version docker --version
    • if Docker doesn't find install from Docker
  • clone git repository https://github.com/MaryGeraseva/6-docker-jenkins-newman-jjb.git
  • create and open folder for Jenkins
  • cd [$user.dir]/6-docker-jenkins-newman-jjb
  • mkdir jenkins-data
  • cd jenkins-data
  • build Jenkins image docker build -t [$image-name] ./
  • build container docker run -v [$user.dir]/6-docker-jenkins-newman-jjb/jenkins-data:/var/jenkins_home --name [$image-name] -p 8080:8080 -p 50000:50000 [$container-name]
  • open Jenkins, create new user and download required plugins
  • open personal configuration localhost:8080/me/configure

alt text

  • add user token

alt text

  • generate and copy user token

alt text

alt text

  • go into docker container as root docker exec -u 0 -it [$container-name] bash
  • clone repository with JJB files git clone https://github.com/MaryGeraseva/4-jenkins-job-builder.git
  • go to folder with JJB files cd 4-jenkins-job-builder/linux
  • open configuration file jenkins_jobs.ini in Vim vim jenkins_jobs.ini
    • input i and correct personal authentication data [$user-name] and [$user-token]
    • input Esc or Ctrl+C
    • input :wq for saving and quit
  • add jobs with JJB from command-line
    jenkins-jobs --conf ./jenkins_jobs.ini update ./jobs.yaml
  • check changes in your Jenkins

More information about Jenkins job builder here

For feedback

e-mail: [email protected]
telegram: @MaryGeraseva
skype: mary_geraseva
linkedIn

jenkins-job-builder's People

Contributors

marygeraseva avatar

Watchers

 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.