Skip to content

Commit 48b187f

Browse files
committed
build pipelines update
1 parent 356688e commit 48b187f

3 files changed

Lines changed: 55 additions & 18 deletions

File tree

composer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
<<<<<<< HEAD
23
"name": "spojenet/subreg",
34
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
45
"license": "MIT",
@@ -36,5 +37,45 @@
3637
"allow-plugins": {
3738
"ergebnis/composer-normalize": true
3839
}
40+
=======
41+
"name": "spojenet/subreg",
42+
"description": "PHP Based Library for easy interaction with soap.subreg.cz",
43+
"license": "MIT",
44+
"authors": [
45+
{
46+
"name": "Vítězslav Dvořák",
47+
"email": "info@vitexsoftware.cz"
48+
>>>>>>> c72a69d (build pipelines update)
3949
}
50+
],
51+
"require": {
52+
"ext-soap": "*",
53+
"vitexsoftware/ease-core": ">=1.49.0"
54+
},
55+
"autoload": {
56+
"psr-4": {
57+
"Subreg\\": "src/Subreg/"
58+
}
59+
},
60+
"autoload-dev": {
61+
"psr-4": {
62+
"Test\\Ease\\": "vendor/vitexsoftware/ease-core/tests/src/Ease",
63+
"Test\\Subreg\\": "testing/src/Subreg/",
64+
"Test\\": "testing/"
65+
}
66+
},
67+
"require-dev": {
68+
"phpunit/phpunit": "*",
69+
"phpstan/phpstan": "*",
70+
"friendsofphp/php-cs-fixer": "^3.89",
71+
"ergebnis/composer-normalize": "^2.48",
72+
"ergebnis/php-cs-fixer-config": "^6.56",
73+
"phpstan/phpstan-phpunit": "2.0.8"
74+
},
75+
"config": {
76+
"allow-plugins": {
77+
"ergebnis/composer-normalize": true
78+
}
79+
},
80+
"type": "library"
4081
}

debian/Jenkinsfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ distributions.each { distro ->
4949
}
5050

5151
stage("Build ${distro}") {
52-
buildImage.inside {
52+
buildImage.inside('--ipc=host') {
5353
sh """
5454
dch -b -v ${buildVer} "${env.BUILD_TAG}"
5555
sudo apt-get update --allow-releaseinfo-change
56-
sudo chown jenkins:jenkins ..
57-
debuild-pbuilder -i -us -uc -b
56+
sudo chown -R jenkins:jenkins . ..
57+
debuild-pbuilder -r'sudo -E' -i -us -uc -b
5858
mkdir -p \$WORKSPACE/dist/debian/
5959
rm -rf \$WORKSPACE/dist/debian/*
6060
for deb in \$(awk '{print \$1}' debian/files); do
@@ -69,7 +69,7 @@ distributions.each { distro ->
6969
}
7070

7171
stage("Test ${distro}") {
72-
buildImage.inside {
72+
buildImage.inside('--ipc=host') {
7373
def debconf_debug = 0
7474
sh """
7575
cd \$WORKSPACE/dist/debian/
@@ -98,7 +98,7 @@ distributions.each { distro ->
9898
}
9999

100100
stage("Archive artifacts ${distro}") {
101-
buildImage.inside {
101+
buildImage.inside('--ipc=host') {
102102
artifacts.each { deb_file ->
103103
println "Archiving artifact: ${deb_file}"
104104
archiveArtifacts artifacts: "dist/debian/${deb_file}"

debian/Jenkinsfile.release

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!groovy
22

3-
// Current version of this Pipeline https://raw.githubusercontent.com/VitexSoftware/multiflexi-buildimages/refs/heads/main/Test/multiflexi-halloworld/Jenkinsfile
4-
53
String[] distributions = ['debian:bookworm', 'debian:trixie', 'debian:forky', 'ubuntu:jammy', 'ubuntu:noble']
64

75
String vendor = 'vitexsoftware'
@@ -45,11 +43,11 @@ distributions.each { distro ->
4543
buildVer = version + '.' + env.BUILD_NUMBER + '~' + distroCode
4644
}
4745
stage('Build ' + distroName) {
48-
buildImage.inside {
46+
buildImage.inside('--ipc=host') {
4947
sh 'dch -b -v ' + buildVer + ' "' + env.BUILD_TAG + '"'
5048
sh 'sudo apt-get update --allow-releaseinfo-change'
51-
sh 'sudo chown jenkins:jenkins ..'
52-
sh 'debuild-pbuilder -i -us -uc -b'
49+
sh 'sudo chown -R jenkins:jenkins . ..'
50+
sh 'debuild-pbuilder -r"sudo -E" -i -us -uc -b'
5351
sh 'mkdir -p $WORKSPACE/dist/debian/ ; rm -rf $WORKSPACE/dist/debian/* ; for deb in $(cat debian/files | awk \'{print $1}\'); do mv "../$deb" $WORKSPACE/dist/debian/; done'
5452
artifacts = sh (
5553
script: "cat debian/files | awk '{print \$1}'",
@@ -59,30 +57,28 @@ distributions.each { distro ->
5957
}
6058

6159
stage('Test ' + distroName) {
62-
buildImage.inside {
60+
buildImage.inside('--ipc=host') {
6361
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
64-
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz; cd $WORKSPACE'
62+
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
6563
sh 'echo "deb [trusted=yes] file://///$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
6664
sh 'sudo apt-get update --allow-releaseinfo-change'
6765
sh 'echo "INSTALATION"'
6866
artifacts.each { deb_file ->
6967
if (deb_file.endsWith('.deb')) {
70-
def pkgName = deb_file.tokenize('/')[-1].replaceFirst(/_.*/, '')
71-
sh 'echo -e "${GREEN} installing ' + pkgName + ' on `lsb_release -sc` ${ENDCOLOR} "'
72-
sh 'sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install ' + pkgName + ' || sudo apt-get -y -f install'
68+
sh 'echo -e "${GREEN} installing ' + deb_file + ' on `lsb_release -sc` ${ENDCOLOR} "'
69+
sh 'sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install $WORKSPACE/dist/debian/' + deb_file
7370
}
7471
}
7572
}
7673
}
7774
stage('Archive artifacts ' + distroName ) {
7875
// Only run if previous stages (Build and Test) succeeded
79-
buildImage.inside {
76+
buildImage.inside('--ipc=host') {
8077
// Archive all produced artifacts listed in debian/files
8178
artifacts.each { deb_file ->
8279
println "Archiving artifact: " + deb_file
8380
archiveArtifacts artifacts: 'dist/debian/' + deb_file
8481
}
85-
8682
// Cleanup: remove any produced files named in debian/files
8783
// Try both the dist location and any potential original locations referenced by debian/files
8884
sh '''
@@ -111,7 +107,7 @@ if (!currentBuild.result || currentBuild.result == 'SUCCESS') {
111107
string(name: 'UPSTREAM_JOB', value: env.JOB_NAME),
112108
string(name: 'UPSTREAM_BUILD', value: env.BUILD_NUMBER),
113109
string(name: 'REMOTE_SSH', value: 'multirepo@repo.multiflexi.eu'),
114-
string(name: 'REMOTE_REPO_DIR', value: '/srv/repo'),
110+
string(name: 'REMOTE_REPO_DIR', value: '/var/lib/multirepo/public/multiflexi'),
115111
string(name: 'COMPONENT', value: 'main'),
116112
string(name: 'DEB_DIST', value: '')
117113
]

0 commit comments

Comments
 (0)