source: ogBrowser-Git/Jenkinsfile @ ac6b2c6

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

fix versioning some more

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