jenkins_url
+ /api/json?tree=jobs[name,color]
jenkins_url
+ /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html | |
# First of all you need to have a clean clone of the source repository so we didn't screw the things up. | |
git clone git://server.com/my-repo1.git | |
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command | |
git filter-branch --subdirectory-filter your_dir -- -- all | |
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command. |
docker.image('cloudbees/java-build-tools:0.0.6').inside { | |
sshagent(['github-ssh-credentials']) { | |
sh """ | |
git version | |
git config --local user.email \\"cleclerc@cloudbees.com\\" | |
git config --local user.name \\"Cyrille Le Clerc\\" | |
git clone git@github.com:cyrille-leclerc/a-test-repo.git | |
date &> now.txt |
node { | |
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
echo 'No quotes, pipeline command in single quotes' | |
sh 'echo $BUILD_NUMBER' // 1 | |
echo 'Double quotes are silently dropped' | |
sh 'echo "$BUILD_NUMBER"' // 1 | |
echo 'Even escaped with a single backslash they are dropped' | |
sh 'echo \"$BUILD_NUMBER\"' // 1 | |
echo 'Using two backslashes, the quotes are preserved' | |
sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
from github import Github | |
GITHUB_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
g = Github(GITHUB_TOKEN) | |
def get_user(): | |
""" | |
Returns: |
FROM debian:stretch | |
LABEL reference="https://superuser.com/questions/715722/how-to-do-dpkg-reconfigure-dash-as-bash-automatically" | |
RUN echo "dash dash/sh boolean false" | debconf-set-selections | |
RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash |
# -*- coding: utf-8 -*- | |
"""Example Google style docstrings. | |
This module demonstrates documentation as specified by the `Google Python | |
Style Guide`_. Docstrings may extend over multiple lines. Sections are created | |
with a section header and a colon followed by a block of indented text. | |
Example: | |
Examples can be given using either the ``Example`` or ``Examples`` | |
sections. Sections support any reStructuredText formatting, including |
You can use this diagram as a template to create your own git branching diagrams. Here's how:
https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml