Talk:Build

From BC$ MobileTV Wiki
Jump to: navigation, search

Docker + Jenkins via CURL

Based on the guides here: https://linuxconfig.org/docker-installation-on-rhel-7-linux https://docs.docker.com/install/linux/docker-ce/fedora/#install-docker-ce-1 https://docs.docker.com/install/linux/docker-ee/rhel/


curl --version
curl -x 'proxy.company.com:8080' -sSL https://get.docker.com/
sleep 5
yum -y -q install docker-engine
sleep 40
docker -v
systemctl enable docker
systemctl start docker
docker run hello-world
docker ps -a


Docker + Jenkins

Based on the following: https://hub.docker.com/r/microsoft/dotnet/ https://jenkins.io/doc/book/installing/#installing-docker https://jenkins.io/doc/pipeline/tour/environment/ https://blog.nimbleci.com/2016/08/31/how-to-build-docker-images-automatically-with-jenkins-pipeline/

Need to somehow use the "DevSandbox" named Docker config which "should" try to download the latest suitable Docker version for the platform.

pipeline {
   environment {
       HTTP_PROXY = 'proxy.company.com:8080'
       HTTPS_PROXY = 'proxy.company.com:8080'
   }
   agent {
       docker { 
           image 'microsoft/dotnet' 
       }
   }
   stages {
       stage('Test') {
           steps {
               sh 'printenv'
               sh 'dotnet -v'
           }
       }
   }
}