Skip to content

Instantly share code, notes, and snippets.

@HRMPW
HRMPW / credEnvMixed.txt
Created August 17, 2017 00:19
output from credentials and environment test
Started by user admin
[Pipeline] node
Running on master in /Users/pwolf/.jenkins/workspace/pipeline tests/creds
[Pipeline] {
[Pipeline] withCredentials
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (foo)
@HRMPW
HRMPW / libaryresource
Created April 12, 2017 20:07
Example using a shell script from the shared library resources directory.
pipeline {
agent any
libraries {
lib('my-library@master')
}
stages {
stage("Test") {
steps {
pipeline {
agent any
stages {
stage("Create Dockerfile and Image") {
steps {
writeFile file: 'Dockerfile', text: '''FROM ubuntu
MAINTAINER Patrick Wolf <pwolf@cloudbees.com>
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
pipeline {
agent any
parameters {
string(defaultValue: '', description: 'The name of the organization working on this repository.', name: 'orgName')
}
stages{
stage("Create Repo Piplines") {
steps {
What do we want to cover for Declarative?
Release Announcement
What is Declartive
plugin name
Why Declarative
Benefits of Pipeline - Everyone should Pipeline
Not everyone is a Groovy expert
What happens to "Pipeline" (Scripted still exists)
nothing
Details of Declartive
//assuming that docker-gc is installed on the agent
pipeline {
agent {
label 'mylabel'
}
stages {
stage ("Build") {
agent {
dockerfile {