Jenkins CI/CD для Go
# nano /etc/apt/sources.list.d/jenkins.list
deb
https://pkg.jenkins.io/debian-stable binary/
# wget -q -O -
https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
# apt update
# apt install jenkins -y
-----------------------------------------------------------------------------
pipeline {
agent any
tools {
go 'go'
}
environment {
GO111MODULE = 'on'
}
stages {
stage('Compile') {
steps {
sh 'go build /opt/test.go'
}
}
}
}