Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

custom jenkins dockerfile

FROM jenkins/jenkins:2.332.2-jdk11
USER root
RUN apt-get update && apt-get install -y lsb-release
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc 
  https://download.docker.com/linux/debian/gpg
RUN echo "deb [arch=$(dpkg --print-architecture) 
  signed-by=/usr/share/keyrings/docker-archive-keyring.asc] 
  https://download.docker.com/linux/debian 
  $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
RUN apt-get update && apt-get install -y docker-ce-cli
USER jenkins
RUN jenkins-plugin-cli --plugins "blueocean:1.25.3 docker-workflow:1.28"
Comment

jenkinsfile docker

pipeline {
    agent { label 'master' }
    stages {
        stage('build') {
            steps {
                script {
                    def disk_size = sh(script: "df / --output=avail | tail -1", returnStdout: true).trim() as Integer
                    println("disk_size = ${disk_size}")
                }
            }
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Shell :: E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) 
Shell :: vim change all spaces to tabs 
Shell :: git config ssh protocol 
Shell :: install docker machine 
Shell :: git modify last commit message 
Shell :: default .gitignore file 
Shell :: how to delay the start of a program linux 
Shell :: truncate log file linux 
Shell :: what is the option to sort by file size in unix 
Shell :: bash tokenize string 
Shell :: install jupyter 
Shell :: github clone to local folder 
Shell :: react-fetch-hook 
Shell :: kali linux download 
Shell :: rename all file extention terminal 
Shell :: git remove credentials windows 
Shell :: pip install webview error 
Shell :: ft2build.h: No such file or directory fedora 
Shell :: kubectl describe to yaml 
Shell :: how to format pendrive on ubuntu 
Shell :: git get back to most recent commit 
Shell :: windows terminal background image 
Shell :: concatenate strings bash 
Shell :: make zip file command 
Shell :: push imagesto docker 
Shell :: vi quit 
Shell :: sudo gem install cocoapods-deintegrate cocoapods-clean 
Shell :: unexpected inconsistency run fsck manually 
Shell :: poetry requirements 
Shell :: get until last match 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =