~starkingdoms/starkingdoms

ref: 899987c5d79e754771e89d9dda54c1dc1637e0b6 starkingdoms/stable.Jenkinsfile -rw-r--r-- 692 bytes
899987c5 — ghostlyzsh Merge branch 'master' of https://gitlab.com/starkingdoms.tk/starkingdoms.tk 2 years ago
                                                                                
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
pipeline {
    agent any

    environment {
        DOCKER_LOGIN_CREDS = credentials('gitlab-docker-key')
        PATH = "/var/lib/jenkins/.cargo/bin:$PATH"
    }

    stages {
        stage('Build') {
            steps {
                sh 'cargo build --locked'
            }
        }
        stage('Clippy') {
            steps {
                sh 'cargo clippy --locked'
            }
        }
        stage('Docker') {
            steps {
                sh 'docker login registry.gitlab.com -u ${DOCKER_LOGIN_CREDS_USR} -p ${DOCKER_LOGIN_CREDS_PSW}'
                sh 'STK_CHANNEL=stable STK_BUILD_NUM=${BUILD_NUMBER} ./spacetime build_docker_stable'
            }
        }
    }
}