source: ogBrowser-Git/Jenkinsfile @ 2ff26a8

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

fix versioning some more

  • Property mode set to 100644
File size: 2.5 KB
Line 
1pipeline {
2    agent {
3        docker {
4            image 'ubuntu:24.04'
5            args '-u root:root'
6            label 'jenkins-slave'
7        }
8    }
9    stages {
10        stage('Prepare environment') {
11            steps {
12                sh '''
13                    apt-get update
14                    apt-get install -y openssh-client
15                '''
16            }
17        }
18
19
20        stage('Install Dependencies') {
21            steps {
22                sshagent (credentials: ['aptly-key']) {
23
24                sh '''
25                    pwd
26                    uname -a
27                    df
28                    env
29
30
31                    export DEBIAN_FRONTEND=noninteractive
32                    apt-get update
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
34
35
36                    echo "Test"
37                    aptly=172.17.8.68
38                    ssh aptly@${aptly} -o StrictHostKeyChecking=no "uptime"
39
40                '''
41                }
42            }
43        }
44        stage('Build') {
45            steps {
46                sh '''
47                    mkdir -p build
48                    cd build
49                    cmake .. -DCPACK_PACKAGE_VERSION_PATCH=${BUILD_NUMBER} -G Ninja
50                    ninja
51                '''
52            }
53        }
54        stage('Create package') {
55            steps {
56                sh '''
57                    cd build
58                    cpack -G DEB
59                '''
60            }
61        }
62
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
69                        scp OGBrowser-2.0.${BUILD_NUMBER}-Linux.deb aptly@${aptly}:/tmp
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        }
77    }
78    post {
79        always {
80            cleanWs()
81        }
82    }
83}
Note: See TracBrowser for help on using the repository browser.