~starkingdoms/starkingdoms

ref: b38320883c45b306639dc79a257cf797c27c0dc7 starkingdoms/Jenkinsfile -rw-r--r-- 821 bytes
b3832088 — c0repwn3r fix builder image 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
29
30
31
32
33
34
pipeline {
    agent {
        docker { image 'c0repwn3r2/stk-rust-builder' }
    }

    environment {
        DOCKER_LOGIN_CREDS = credentials('gitlab-docker-key')
    }

    stages {
        stage('Prepare') {
            steps {
                sh 'rustup component add clippy'
            }
        }
        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'
            }
        }
    }
}