|
3 | 3 | // Aktuální verze Pipeline: https://github.com/VitexSoftware/BuildImages/blob/main/Test/Jenkinsfile-parael |
4 | 4 |
|
5 | 5 | String[] distributions = [ |
6 | | - 'debian:bookworm', |
7 | 6 | 'debian:trixie', |
8 | | - 'debian:forky', |
9 | | - 'ubuntu:jammy', |
10 | | - 'ubuntu:noble' |
11 | 7 | ] |
12 | 8 |
|
13 | 9 | String vendor = 'vitexsoftware' |
@@ -41,28 +37,29 @@ distributions.each { distro -> |
41 | 37 | checkout scm |
42 | 38 | buildImage = docker.image(imageName) |
43 | 39 |
|
44 | | - sh 'git checkout debian/changelog' |
| 40 | + sh 'git checkout opentelemetry-api/debian/changelog' |
45 | 41 | buildVer = sh( |
46 | | - script: "dpkg-parsechangelog --show-field Version", |
| 42 | + script: "dpkg-parsechangelog -l opentelemetry-api/debian/changelog --show-field Version", |
47 | 43 | returnStdout: true |
48 | 44 | ).trim() + ".${env.BUILD_NUMBER}~${distroCode}" |
49 | 45 | } |
50 | 46 |
|
51 | 47 | stage("Build ${distro}") { |
52 | 48 | buildImage.inside('--ipc=host') { |
53 | 49 | sh """ |
| 50 | + cd opentelemetry-api |
54 | 51 | dch -b -v ${buildVer} "${env.BUILD_TAG}" |
55 | 52 | sudo apt-get update --allow-releaseinfo-change |
56 | | - sudo chown -R jenkins:jenkins . .. |
| 53 | + sudo chown -R jenkins:jenkins . ../.. |
57 | 54 | debuild-pbuilder -r'sudo -E' -i -us -uc -b |
58 | 55 | mkdir -p \$WORKSPACE/dist/debian/ |
59 | 56 | rm -rf \$WORKSPACE/dist/debian/* |
60 | 57 | for deb in \$(awk '{print \$1}' debian/files); do |
61 | | - mv "../\$deb" \$WORKSPACE/dist/debian/ |
| 58 | + mv "../../\$deb" \$WORKSPACE/dist/debian/ |
62 | 59 | done |
63 | 60 | """ |
64 | 61 | artifacts = sh( |
65 | | - script: "awk '{print \$1}' debian/files", |
| 62 | + script: "awk '{print \$1}' opentelemetry-api/debian/files", |
66 | 63 | returnStdout: true |
67 | 64 | ).trim().split('\n') |
68 | 65 | } |
@@ -106,13 +103,13 @@ distributions.each { distro -> |
106 | 103 |
|
107 | 104 | sh ''' |
108 | 105 | set -e |
109 | | - if [ -f debian/files ]; then |
| 106 | + if [ -f opentelemetry-api/debian/files ]; then |
110 | 107 | while read -r file _; do |
111 | 108 | [ -n "$file" ] || continue |
112 | 109 | rm -f "dist/debian/$file" || true |
113 | | - rm -f "../$file" || true |
| 110 | + rm -f "../../$file" || true |
114 | 111 | rm -f "$WORKSPACE/$file" || true |
115 | | - done < debian/files |
| 112 | + done < opentelemetry-api/debian/files |
116 | 113 | fi |
117 | 114 | ''' |
118 | 115 | } |
|
0 commit comments