Skip to content

Core based #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
],
"require": {
"ext-soap": "*",
"vitexsoftware/ease-core": ">=1.12"
"vitexsoftware/ease-core": ">=1.12",
"spoje.net/subreg": "dev-master"
},
"autoload": {
"psr-4": {
Expand Down
73 changes: 73 additions & 0 deletions debian/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!groovy

String[] distributions = ['debian:bullseye', 'debian:bookworm', 'ubuntu:focal', 'ubuntu:jammy']

String vendor = 'vitexsoftware'
String distribution = ''
//String distroFamily = ''
String distroCodename = ''
String ver = ''

properties([
copyArtifactPermission('*')
])
node() {
ansiColor('xterm') {
stage('SCM Checkout') {
checkout scm
}
}
}

distributions.each {
distribution = it

println "Dist:" + distribution

def dist = distribution.split(':')
// distroFamily = dist[0]
distroCodename = dist[1]

def buildImage = ''

node {
ansiColor('xterm') {
stage('Checkout ' + distribution) {
buildImage = docker.image(vendor + '/' + distribution)
sh 'git checkout debian/changelog'
def version = sh (
script: 'dpkg-parsechangelog --show-field Version',
returnStdout: true
).trim()
ver = version + '.' + env.BUILD_NUMBER + '~' + distroCodename
}
stage('Build ' + distribution) {
buildImage.inside {
sh 'dch -b -v ' + ver + ' "' + env.BUILD_TAG + '"'
sh 'sudo apt-get update --allow-releaseinfo-change'
sh 'sudo chown jenkins:jenkins ..'
sh 'debuild-pbuilder -i -us -uc -b'
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'
}
}

stage('Test ' + distribution) {
buildImage.inside {
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz; cd $WORKSPACE'
sh 'echo "deb [trusted=yes] file://///$WORKSPACE/dist/debian/ ./" | sudo tee /etc/apt/sources.list.d/local.list'
sh 'sudo apt-get update --allow-releaseinfo-change'
sh 'echo "INSTALATION"'
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | grep -v dbgsym | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=' + debconf_debug + ' apt-get -y install $package ; done;'
stash includes: 'dist/**', name: 'dist-' + distroCodename
}
}
stage('Copy artifacts ' + distribution ) {
buildImage.inside {
sh 'mv $WORKSPACE/dist/debian/*.deb $WORKSPACE'
}
}
}
}
}

4 changes: 2 additions & 2 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Ease framework Core for Debian
Subreg PHP library debian package
------------------------------

Is installed by standard way in /usr/share/php/EaseCore
Is installed by standard way in /usr/share/php/Subreg

-- Vítězslav Dvořák <[email protected]> Ne říj 21 15:17:56 CEST 2012

2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
php-subreg (0.3) unstable; urgency=medium
php-spojenet-subreg (1.0) unstable; urgency=medium

* new support for Pricelist command

Expand Down
3 changes: 2 additions & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
10
11

12 changes: 9 additions & 3 deletions debian/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@
"email": "[email protected]"
}
],
"version": "0.2",
"version": "1.0",
"require": {
"ext-soap": "*",
"deb/ease-framework": "*"
"deb/ease-core": "*"
},
"autoload": {
"psr-4": {
"Subreg\\": "."
}
}
},
"repositories": [
{
"type": "path",
"url": "/usr/share/php/EaseCore"
}
]
}
6 changes: 3 additions & 3 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: php-subreg
Source: php-spojenet-subreg
Build-Depends: debhelper (>= 7.0.50~)
Section: web
Standards-Version: 3.9.8
Expand All @@ -7,8 +7,8 @@ Uploaders: Vitex <[email protected]>
Priority: optional
Homepage: https://github.com/Spoje-NET/php-subreg

Package: php-subreg
Depends: ${misc:Depends}, ease-framework
Package: php-spojenet-subreg
Depends: ${misc:Depends}, php-vitexsoftware-ease-core, php-soap
Architecture: all
Section: web
Priority: optional
Expand Down
4 changes: 2 additions & 2 deletions debian/files
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
php-subreg_0.3_all.buildinfo web optional
php-subreg_0.3_all.deb web optional
php-spojenet-subreg_1.0_all.deb web optional
php-spojenet-subreg_1.0_amd64.buildinfo web optional
4 changes: 2 additions & 2 deletions debian/fixversion.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
VERSTR=`dpkg-parsechangelog --show-field Version`
COMPOSER_VERSTR=`echo ${VERSTR}|sed 's/-/./g'`
echo update debian/php-subreg/usr/share/php/Subreg/composer.json version to ${COMPOSER_VERSTR}
echo update debian/php-spojentet-subreg/usr/share/php/Subreg/composer.json version to ${COMPOSER_VERSTR}
sed -i -e '/\"version\"/c\ \"version\": \"'${COMPOSER_VERSTR}'",' debian/php-subreg/usr/share/php/Ease/composer.json
echo Update debian/php-subreg/usr/share/php/Subreg/Client.php version to ${VERSTR}
sed -i -e "/static public \$libVersion/c\ static public \$libVersion = '${VERSTR}';" debian/php-subreg/usr/share/php/Subreg/Client.php
sed -i -e "/static public \$libVersion/c\ static public \$libVersion = '${VERSTR}';" debian/php-spojenet-subreg/usr/share/php/Subreg/Client.php
echo Update src/Ease/Atom.php version to ${VERSTR}
sed -i -e "/static public \$libVersion/c\ static public \$libVersion = '${VERSTR}';" src/Subreg/Client.php
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion debian/postinst → debian/php-spojenet-subreg.postinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# postinst script for ease-core
# postinst script for php-spojenet-subreg
#
# see: dh_installdeb(1)

Expand Down
Loading