source: ogBrowser-Git/Jenkinsfile @ 6a08e91

jenkins
Last change on this file since 6a08e91 was 6a08e91, checked in by Vadim Troshchinskiy Shmelev <vtroshchinskiy@…>, 2 months ago

test

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[347df67]1pipeline {
[c0045cf]2    agent {
3        docker {
[c228c60]4            image 'ogbrowser-build:latest'
5
[c0045cf]6            args '-u root:root'
[03bb878]7            label 'jenkins-slave'
[c0045cf]8        }
9    }
[347df67]10    stages {
[30e71bd]11        stage('Prepare environment') {
12            steps {
13                sh '''
14                    apt-get update
15                    apt-get install -y openssh-client
16                '''
17            }
18        }
19
20
[c0045cf]21        stage('Install Dependencies') {
22            steps {
[58e12c9]23                sshagent (credentials: ['aptly-key']) {
[c0a1e77]24
[c0045cf]25                sh '''
[639a975]26                    pwd
27                    uname -a
28                    df
[c0a1e77]29                    env
[639a975]30
[c751a81]31
32                    export DEBIAN_FRONTEND=noninteractive
33                    apt-get update
[30e71bd]34                    apt-get install -y build-essential cmake g++ qt6-base-dev qt6-webengine-dev linguist-qt6  libgl1-mesa-dev qt6-tools-dev qt6-l10n-tools  qt6-tools-dev-tools libqt6core5compat6-dev lxqt-build-tools qt6-webengine-dev-tools libqt6webenginecore6-bin ninja-build
[c751a81]35
36
[b077bb7]37                    echo "Test"
38                    aptly=172.17.8.68
39                    ssh aptly@${aptly} -o StrictHostKeyChecking=no "uptime"
40
[c0045cf]41                '''
[00a41bf]42                }
[c0045cf]43            }
44        }
[347df67]45        stage('Build') {
46            steps {
[c0045cf]47                sh '''
48                    mkdir -p build
49                    cd build
[2ff26a8]50                    cmake .. -DCPACK_PACKAGE_VERSION_PATCH=${BUILD_NUMBER} -G Ninja
[c0045cf]51                    ninja
52                '''
[347df67]53            }
54        }
[377b941]55        stage('Create package') {
56            steps {
57                sh '''
58                    cd build
59                    cpack -G DEB
60                '''
61            }
62        }
63
[030af0c]64        stage("Upload package to Aptly") {
65            steps {
66                sshagent (credentials : ['aptly-key']) {
67                    withCredentials([string(credentialsId: 'aptly-gpg-passphrase', variable: 'GPG_PASSPHRASE')]) {
68                        sh '''
[b569edf]69                        aptly=172.17.8.68
[c228c60]70                        scp -o StrictHostKeyChecking=no build/OGBrowser-2.0.${BUILD_NUMBER}-Linux.deb aptly@${aptly}:/tmp
[8905bad]71                        ssh aptly@${aptly} -o StrictHostKeyChecking=no "aptly repo add opengnsys /tmp/OGBrowser-2.0.${BUILD_NUMBER}-Linux.deb"
[6a08e91]72                        ssh aptly@${aptly} -o StrictHostKeyChecking=no "aptly publish update -passphrase='${GPG_PASSPHRASE}' noble filesystem:opengnsys:main"
[030af0c]73                        '''
74                    }
75                }
76            }
77        }
[347df67]78    }
[c0045cf]79    post {
80        always {
81            cleanWs()
82        }
83    }
84}
Note: See TracBrowser for help on using the repository browser.