Browse Source

Jenkinsfile added

Better examples
main
parent
commit
102f05d9c2
  1. 5
      Examples/twb4.php
  2. 167
      Jenkinsfile
  3. 5
      debian/changelog
  4. 2
      debian/composer.json
  5. 4
      debian/files

5
Examples/twb4.php

@ -1,5 +1,7 @@
<?php
namespace Ease\Example;
use Ease\Html\ATag;
use Ease\Html\DivTag;
use Ease\Html\H1Tag;
@ -16,10 +18,11 @@ use Ease\TWB4\Panel;
use Ease\TWB4\PillBadge;
use Ease\TWB4\WebPage;
namespace Ease\Example;
include_once dirname(__DIR__).'/vendor/autoload.php';
new \Ease\Locale('en_US','','');
$oPage = new WebPage('Twitter Bootstrap 4 Page');
$oPage->addItem(new H1Tag('Twitter Bootstrap 4'));

167
Jenkinsfile vendored

@ -0,0 +1,167 @@
#!groovy
// Docker images generated by https://github.com/VitexSoftware/BuildImages
pipeline {
agent none
options {
ansiColor('xterm')
copyArtifactPermission('*');
}
environment {
RED = '\\e[31m'
GREEN = '\\e[32m'
ENDCOLOR = '\\e[0m'
}
stages {
stage('debian-stable') {
agent {
docker { image 'vitexsoftware/debian:stable' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-buster'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}
stage('debian-testing') {
agent {
docker { image 'vitexsoftware/debian:testing' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-bullseye'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}
stage('ubuntu-focal') {
agent {
docker { image 'vitexsoftware/ubuntu:stable' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-focal'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}
stage('ubuntu-hirsute') {
agent {
docker { image 'vitexsoftware/ubuntu:testing' }
}
steps {
dir('build/debian/package') {
checkout scm
buildPackage()
installPackages()
}
stash includes: 'dist/**', name: 'dist-hirsute'
}
post {
success {
archiveArtifacts 'dist/debian/'
copyArtifact()
}
}
}
}
}
def copyArtifact(){
step ([$class: 'CopyArtifact',
projectName: '${JOB_NAME}',
filter: "**/*.deb",
target: '/var/tmp/deb',
flatten: true,
selector: specific('${BUILD_NUMBER}')
]);
}
def buildPackage() {
def DIST = sh (
script: 'lsb_release -sc',
returnStdout: true
).trim()
def DISTRO = sh (
script: 'lsb_release -sd',
returnStdout: true
).trim()
def SOURCE = sh (
script: 'dpkg-parsechangelog --show-field Source',
returnStdout: true
).trim()
def VERSION = sh (
script: 'dpkg-parsechangelog --show-field Version',
returnStdout: true
).trim()
ansiColor('vga') {
echo '\033[42m\033[90mBuild debian package ' + SOURCE + ' v' + VERSION + ' for ' + DISTRO + '\033[0m'
}
def VER = VERSION + '~' + DIST + '~' + env.BUILD_NUMBER
//Buster problem: Can't continue: dpkg-parsechangelog is not new enough(needs to be at least 1.17.0)
//
// debianPbuilder additionalBuildResults: '',
// components: '',
// distribution: DIST,
// keyring: '',
// mirrorSite: 'http://deb.debian.org/debian/',
// pristineTarName: ''
sh 'dch -b -v ' + VER + ' "' + env.BUILD_TAG + '"'
sh 'sudo apt-get update'
sh 'debuild-pbuilder -i -us -uc -b'
sh 'mkdir -p $WORKSPACE/dist/debian/ ; rm -rf $WORKSPACE/dist/debian/* ; mv ../' + SOURCE + '*_' + VER + '_*.deb ../' + SOURCE + '*_' + VER + '_*.changes ../' + SOURCE + '*_' + VER + '_*.build $WORKSPACE/dist/debian/'
}
def installPackages() {
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'
sh 'echo "${GREEN} INSTALATION ${ENDCOLOR}"'
sh 'IFS="\n\b"; for package in `ls $WORKSPACE/dist/debian/ | grep .deb | awk -F_ \'{print \$1}\'` ; do echo -e "${GREEN} installing ${package} on `lsb_release -sc` ${ENDCOLOR} " ; sudo DEBIAN_FRONTEND=noninteractive DEBCONF_DEBUG=developer apt-get -y install $package ; done;'
}

5
debian/changelog vendored

@ -1,4 +1,4 @@
php-vitexsoftware-ease-bootstrap4 (1.6) UNRELEASED; urgency=medium
php-vitexsoftware-ease-bootstrap4 (1.7) UNRELEASED; urgency=medium
[ Vítězslav Dvořák ]
* First release
@ -18,5 +18,6 @@ php-vitexsoftware-ease-bootstrap4 (1.6) UNRELEASED; urgency=medium
* Dependency fix II
* Return added card
* Return added card
* FormGroup do not crash on button
-- CyberVitexus <vitex@exiv.jinonice.czf> Wed, 17 Mar 2021 21:00:52 +0100
-- CyberVitexus <vitex@exiv.jinonice.czf> Wed, 17 Mar 2021 21:27:03 +0100

2
debian/composer.json vendored

@ -1,7 +1,7 @@
{
"name": "deb/ease-bootstrap4",
"description": "Set of Twitter Bootstrap 4 rendering objects (debianized)",
"version": "1.6",
"version": "1.7",
"authors": [
{
"name": "Vítězslav Dvořák",

4
debian/files vendored

@ -1,4 +0,0 @@
php-vitexsoftware-ease-bootstrap4-dev_1.6_all.deb web optional
php-vitexsoftware-ease-bootstrap4-doc_1.6_all.deb devel optional
php-vitexsoftware-ease-bootstrap4_1.6_all.deb web optional
php-vitexsoftware-ease-bootstrap4_1.6_amd64.buildinfo web optional
Loading…
Cancel
Save