You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give new resoure group name (hint: use your name as the resource group name)
Provide virtual machine name (hint: use your name as the machine name)
Region select West Europe
Image select Cento7.5
Size D2s V3
Setup username and password
Allow public inbound ports http, ssh, 8080,8081
Setting up Centos 7 Server.
sudo su # switch to root user
yum install -y epel-release; yum install -y htop wget vim mlocate git
yum install -y java-1.8.0-openjdk-devel
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install -y jenkins
systemctl start jenkins
systemctl enable jenkins
Browsing jenkins url and setting up default plugins is taking 7 to 8 mins.
wget https://storage.googleapis.com/golang/go1.12.5.linux-amd64.tar.gz
tar -zxvf go1.12.5.linux-amd64.tar.gz -C /usr/local
exit # to exit from root user
export GOROOT=/usr/local/go
export PATH=$PATH:/usr/local/go/bin
export GOBIN=$WORKSPACE/bin
# Build
go version
go install $WORKSPACE/app/app.go
# Deployment
if pgrep app; then pkill app; fi
BUILD_ID=dontKillMe nohup $WORKSPACE/bin/app>>app.log &
echo Deployment successful.
Enhance jenkins job with build trigger
Configure jenkins job and select poll scm in build triggers.
Voice over : Show sample jenkins job with Jenkinfile, nexus and sonar.
Broken code demo.
Modify app/app.go eg: remove f letter from fmt.println