~starkingdoms/starkingdoms

ref: 167cd5e80eedb4554d2f2cd3b2ee3838fb4f39a0 starkingdoms/Jenkinsfile -rw-r--r-- 693 bytes
167cd5e8 — c0repwn3r add cargo to PATH 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
28
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 './spacetime build_docker_api'
                sh './spacetime build_docker_server'
            }
        }
    }
}