git.hdm.sh
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
pipeline {
    agent any
    stages {
        stage('Checkout') {
            steps {
                checkout scm
                // sh './replace-url' main.go
            }
        }
        stage('Build') {
            steps {
                // sh 'mv scratchpad scratchpad.old'
                sh 'go mod init scratchpad'
                sh 'go get github.com/gorilla/websocket'
                sh 'go build -o scratchpad'
            }
        }
        stage('Test') {
            steps {
                // sh 'go build'
                sh 'echo PLACEHOLDER'
            }
        }
        stage('Deploy') {
            steps {
                // sh 'deploy.sh'
                sh 'echo PLACEHOLDER'
            }
        }
    }
}