Removed jenkins jobs templates

As an Apertis developer, we want to be able to quickly find definitions
of Jenkins jobs we use so that we can easily fix and update them without
having to edit them scattered all over out CGit instance.

All jenkins jobs templates are moved into apertis-jenkins-jobs git
repository under git.apertis.org.

For the reason that we drop moved templates in this repository.

Apertis: https://phabricator.apertis.org/T4531Signe-off-by: Andrew Lee's avatarAndrew Lee (李健秋) <andrew.lee@collabora.co.uk>

Differential Revision: https://phabricator.apertis.org/D7572
parent fddcef0a
- scm:
name: gitpackage
scm:
- git:
url: 'https://git.apertis.org/git/{package}.git'
branches:
- '*/master'
basedir: '{package}'
skip-tag: true
wipe-workspace: false
- job:
name: 'apertis-build-package-all-masters'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/apertis-build-package-all-masters.yaml
Build-test each git commit
Every time a new commit has been pushed, this jobs checks out the
`master` branch of a set of Apertis projects and runs the
`build-all.sh` script to ensure they can all be built correctly,
helping to pinpoint any commit that may introduce build errors.
project-imagetype: freestyle
node: apertis-development
scm:
- gitpackage:
package: "apertis-customizations"
- gitpackage:
package: "barkway"
- gitpackage:
package: "beckfoot"
- gitpackage:
package: "canterbury"
- gitpackage:
package: "didcot"
- gitpackage:
package: "frome"
- gitpackage:
package: "libbredon"
- gitpackage:
package: "libclapton"
- gitpackage:
package: "libgrassmoor"
- gitpackage:
package: "liblightwood"
- gitpackage:
package: "liblightwood-2"
- gitpackage:
package: "libseaton"
- gitpackage:
package: "libshoreham"
- gitpackage:
package: "libthornbury"
- gitpackage:
package: "newport"
- gitpackage:
package: "prestwood"
- gitpackage:
package: "rhosydd"
- gitpackage:
package: "ribchester"
- gitpackage:
package: "shapwick"
- gitpackage:
package: "tinwell"
- gitpackage:
package: "traprain"
- gitpackage:
package: "eye"
- gitpackage:
package: "frampton"
- gitpackage:
package: "mildenhall"
- gitpackage:
package: "mildenhall-2"
- gitpackage:
package: "mildenhall-compositor"
- gitpackage:
package: "mildenhall-launcher"
- gitpackage:
package: "mildenhall-popup-layer"
- gitpackage:
package: "mildenhall-settings"
- gitpackage:
package: "mildenhall-statusbar"
wrappers:
- timestamps
triggers:
- pollscm:
cron: "H/5 * * * *"
builders:
- shell: |
export CCACHE_DIR=$(pwd)/ccache
export PATH="/usr/lib/ccache:$PATH"
rm -rf build
mkdir build
./apertis-customizations/development/build-all.sh
publishers:
- email:
recipients: '{maintainers}'
send-to-individuals: true
- defaults:
!include: defaults.yaml.inc
- job-template:
name: '{project}-{distro}/packages/build-{package}'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/apertis-build-package.yaml
Continuous integration for each git commit - packages originating in Apertis
This job runs `make distcheck`, builds a dpkg source package, and
builds binaries from that source package. If everything is successful,
it uploads the source package to the OBS branch apertis:BRANCH:snapshots
to be rebuilt in a clean environment.
Commits that match a tag are built as official releases, with a
normal version number. Commits that do not match a tag are built
as snapshots, with a version number based on `git describe`.
The `/packages/*` jobs are for packages where Apertis is the upstream
developer. See <https://git.apertis.org/cgit/>.
project-imagetype: freestyle
node: apertis-development
properties:
- inject:
properties-content: |
PROJECT: {project}
DISTRO: {distro}
COMPONENT: {component}
PACKAGE: {package}
CREATE_SNAPSHOT_PROJECT: "true"
scm:
- git:
skip-tag: true
url: '{repobase}/apertis-customizations.git'
branches:
- '*/{branch}'
basedir: apertis-customizations
excluded-regions:
- '.*'
wipe-workspace: false
- git:
skip-tag: true
url: '{repobase}/{package}.git'
branches:
- '*/{branch}'
credentials-id: 'df7b609b-df30-431d-a942-af263af80571'
basedir: '{package}'
wipe-workspace: false
wrappers:
- timestamps
- credentials-binding:
- file:
credential-id: 349d474d-a6d0-4ab0-987a-a3843916bdff
variable: OSCRC
triggers:
- pollscm:
cron: "H/5 * * * *"
builders:
- shell:
!include-raw-escape: 'scripts/prepare-osc-checkout.sh'
- shell:
!include-raw-escape: 'scripts/run-build-snapshot.sh'
- shell:
!include-raw-escape: 'scripts/commit-osc-checkout.py'
- shell:
!include-raw-escape: 'scripts/submit-osc-request.py'
publishers:
- email:
recipients: '{maintainers}'
send-to-individuals: true
- workspace-cleanup:
dirmatch: true
exclude: [ "ccache/**", "apertis-customizations/**", "{package}/**" ]
- job-group:
name: 'build-package-target'
component: 'target'
package:
- apertis-customizations
- barkway
- beckfoot
- canterbury
- chaiwala-bootflags
- chaiwala-user-session
- didcot
- frome
- libbredon
- libclapton
- libgrassmoor
- liblightwood
- liblightwood-2
- libseaton
- libshoreham
- libthornbury
- newport
- prestwood
- rhosydd
- ribchester
- shapwick
- tinwell
- traprain
jobs:
- '{project}-{distro}/packages/build-{package}'
- job-group:
name: 'build-package-hmi'
component: 'hmi'
package:
- eye
- frampton
- mildenhall
- mildenhall-2
- mildenhall-compositor
- mildenhall-launcher
- mildenhall-popup-layer
- mildenhall-settings
- mildenhall-statusbar
jobs:
- '{project}-{distro}/packages/build-{package}'
- job-group:
name: 'build-package-development'
component: 'development'
package:
- apertis-designs
- apertis-dev-tools
- apertis-docs
- apertis-tests
jobs:
- '{project}-{distro}/packages/build-{package}'
- job-group:
name: 'build-package-sdk'
component: 'sdk'
package:
- apertis-eclipse-plugins
jobs:
- '{project}-{distro}/packages/build-{package}'
- project:
name: build-package
jobs:
- 'build-package-target'
- 'build-package-hmi'
- 'build-package-development'
- 'build-package-sdk'
- defaults:
!include: defaults.yaml.inc
- job-template:
name: '{project}-{distro}/packaging/build-{package}'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/apertis-build-packaging.yaml
Continuous integration for each git commit - third party packaging
This job builds a dpkg source package and
builds binaries from that source package. If everything is successful,
it uploads the source package to the OBS branch apertis:BRANCH:snapshots
to be rebuilt in a clean environment.
Commits that match a tag are built as official releases, with a
normal version number. Commits that do not match a tag are built
as snapshots, with a version number based on `git describe`.
The `/packaging/*` jobs are for packages where upstream development
is done outside Apertis, with the Apertis packaging adding OS integration
and local modifications. See <https://git.apertis.org/cgit/packaging/>.
project-imagetype: freestyle
node: apertis-development
properties:
- inject:
properties-content: |
PROJECT: {project}
DISTRO: {distro}
COMPONENT: {component}
PACKAGE: {package}
PACKAGING_ONLY: "true"
CREATE_SNAPSHOT_PROJECT: "true"
scm:
- git:
skip-tag: true
url: '{repobase}/apertis-customizations.git'
branches:
- '*/{branch}'
basedir: apertis-customizations
excluded-regions:
- '.*'
wipe-workspace: false
- git:
skip-tag: true
url: '{repobase}/packaging/{package}.git'
branches:
- '*/{project}/{branch}'
credentials-id: 'df7b609b-df30-431d-a942-af263af80571'
basedir: '{package}'
wipe-workspace: false
wrappers:
- timestamps
- credentials-binding:
- file:
credential-id: 349d474d-a6d0-4ab0-987a-a3843916bdff
variable: OSCRC
triggers:
- pollscm:
cron: "H/5 * * * *"
builders:
- shell:
!include-raw-escape: 'scripts/prepare-osc-checkout.sh'
- shell:
!include-raw-escape: 'scripts/run-build-snapshot.sh'
- shell:
!include-raw-escape: 'scripts/commit-osc-checkout.py'
publishers:
- email:
recipients: '{maintainers}'
send-to-individuals: false
- workspace-cleanup:
dirmatch: true
exclude: [ "ccache/**", "apertis-customizations/**", "{package}/**" ]
- job-group:
name: 'build-packaging-target'
component: 'target'
package:
- apparmor
- appstream-glib
- bluez
- connman
- d-conf
- dbus
- evolution-data-server
- glib2.0
- gst-plugins-base1.0
- gst-plugins-good1.0
- gstreamer1.0
- gtk+3.0
- libgdata
- mesa
- orc
- ostree
- plymouth
- policykit-1
- pulseaudio
- seed-webkit2
- systemd
- tracker
- tumbler
jobs:
- '{project}-{distro}/packaging/build-{package}'
- job-group:
name: 'build-packaging-development'
component: 'development'
package:
- hotdoc
- hotdoc-c-extension
- hotdoc-dbus-extension
- walbottle
jobs:
- '{project}-{distro}/packaging/build-{package}'
- project:
name: build-packaging
jobs:
- 'build-packaging-target'
- 'build-packaging-development'
- defaults:
!include: defaults.yaml.inc
- job-template:
name: '{project}-{distro}/samples/build-{package}'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/apertis-build-sample.yaml
Continuous integration for each git commit - sample app-bundles
This job builds a sample app-bundle using ade.
<https://git.apertis.org/cgit/sample-applications/>
project-imagetype: freestyle
node: apertis-development
properties:
- inject:
properties-content: |
PROJECT: {project}
DISTRO: {distro}
PACKAGE: {package}
scm:
- git:
skip-tag: true
url: '{repobase}/apertis-dev-tools.git'
branches:
- '*/{branch}'
basedir: apertis-dev-tools
excluded-regions:
- '.*'
wipe-workspace: false
- git:
skip-tag: true
url: '{repobase}/sample-applications/{package}.git'
branches:
- '*/{branch}'
credentials-id: 'df7b609b-df30-431d-a942-af263af80571'
basedir: '{package}'
wipe-workspace: false
wrappers:
- timestamps
- credentials-binding:
- file:
credential-id: 349d474d-a6d0-4ab0-987a-a3843916bdff
variable: OSCRC
triggers:
- pollscm:
cron: "H/5 * * * *"
builders:
- shell:
!include-raw-escape: 'scripts/build-sample.py'
publishers:
- archive:
artifacts: '{package}/*.bundle'
flatten: true
only-if-success: 'true'
- email:
recipients: '{maintainers}'
send-to-individuals: true
- workspace-cleanup:
dirmatch: true
exclude: [ "ccache/**", "apertis-dev-tools/**", "{package}/**" ]
- job-group:
name: 'build-sample'
package:
- cpp-library-example
- hard-keys-example
- helloworld-agentapp
- helloworld-app
- helloworld-https-client
- helloworld-newport
- helloworld-persistapp
- helloworld-prefsapp
- helloworld-simple-agent
- helloworld-webapp
- notification-example
jobs:
- '{project}-{distro}/samples/build-{package}'
- project:
name: 'build-samples'
jobs:
- 'build-sample'
- defaults:
!include: defaults.yaml.inc
name: global
distro: '18.03'
branch: 'master'
project: 'apertis'
maintainers: 'maintainers@lists.apertis.org'
repobase: 'https://git.apertis.org/git'
- job:
name: 'phabricator/apertis-check-commit'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/phabricator-apertis-check-commit.yaml
Check commit message formatting on Phabricator
This jobs is triggered by Herald and captured by Harbormaster when any
Differential revision is submitted and checks that its commit message
fulfils some requirements such as:
* the short message is not overly long
* the patch is either and RFC or it has a Signed-of-by tag
https://phabricator.apertis.org/H3
https://phabricator.apertis.org/harbormaster/plan/3/
project-type: freestyle
auth-token: mchgITxergXi9WCPyTwLUnmvrFBWHKN1
concurrent: true
parameters:
- string:
name: DIFF_ID
- string:
name: PHID
- string:
name: REVISION
node: apertis-development
properties:
- inject:
properties-content: |
EMAIL: devnull@example.com
wrappers:
- timestamps
- credentials-binding:
- file:
credential-id: apertis-phabricator-arcrc
variable: ARCRC
builders:
- shell:
!include-raw: scripts/checkout-revision.sh
- shell:
!include-raw: scripts/check-commit-message.py
publishers:
- phabricator:
comment-file: 'issues.txt'
comment-with-console-link-on-failure: true
- workspace-cleanup
- project:
name: 'phabricator-apertis-build-snapshot'
jobs:
- 'phabricator/{project}-{branch}-build-snapshot'
- job-template:
name: 'phabricator/{project}-{branch}-build-snapshot'
description: |
Do not edit this job through the web!
See https://git.apertis.org/cgit/apertis-customizations.git/tree/development/jenkins/phabricator-apertis-master-build-snapshot.yaml
Check buildability of patches on Phabricator
This jobs is triggered by Herald and captured by Harbormaster when any
Differential revision is submitted and checks that the patch applies
cleanly on top of the `master` branch and builds succesfully.
https://phabricator.apertis.org/H2
https://phabricator.apertis.org/harbormaster/plan/2/
project-type: freestyle
auth-token: IuM65UHaWsUiWA2qa4L06TJ3HgxTERLA
concurrent: true
parameters:
- string:
name: DIFF_ID
- string:
name: PHID
- string:
name: PACKAGING_ONLY
default: ""
- string:
name: REVISION
- string:
name: URI
node: apertis-development
properties:
- inject:
properties-content: |
EMAIL: devnull@example.com
PROJECT: {project}
DISTRO: {distro}
groovy-content:
!include-raw-escape: scripts/uri-to-package.groovy
scm:
- git:
skip-tag: true
url: http://git.apertis.org/git/apertis-customizations.git
basedir: apertis-customizations
wrappers:
- timestamps
- credentials-binding:
- file:
credential-id: apertis-phabricator-arcrc
variable: ARCRC
- file:
credential-id: 349d474d-a6d0-4ab0-987a-a3843916bdff
variable: OSCRC
builders:
- shell: |
env
- shell:
!include-raw-escape: scripts/differential-merge.py
- shell:
!include-raw-escape: scripts/prepare-osc-checkout.sh
- shell:
!include-raw-escape: scripts/run-build-snapshot.sh
publishers:
- phabricator:
comment-file: 'buildlog-tail'
comment-with-console-link-on-failure: true
comment-size: 5000
- workspace-cleanup:
dirmatch: true
exclude: [ "ccache/**", "apertis-customizations/**" ]
- defaults:
!include: defaults.yaml.inc
#!/usr/bin/python3 -u
# -*- coding: utf-8 -*-
#
# Copyright 2017 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os
import sys
import subprocess
if __name__ == '__main__':
# Copy before we start modifying
original_environ = dict(os.environ)
ade = os.path.join(os.getcwd(), 'apertis-dev-tools', 'tools', 'ade')
package = original_environ['PACKAGE']
srcdir = os.path.join(os.getcwd(), package)
threads = (os.cpu_count() or 2)
# We don't want these polluting the environment
for name in (
'COMPONENT',
'CREATE_SNAPSHOT_PROJECT',
'DIFF_ID',
'DISTRO',
'PACKAGE',
'PACKAGING_ONLY',
'PHID',
'PROJECT',
'REVISION',
'URI',
):
os.environ.pop(name, None)
subprocess.check_call([
'git',
'clean',
'-fdx',
],
cwd=srcdir)
if os.path.exists(os.path.join(srcdir, '.gitmodules')):
subprocess.check_call([
'git',
'submodule',
'init',
],
cwd=srcdir)
subprocess.check_call([
'git',
'submodule',
'update',
],
cwd=srcdir)
subprocess.check_call([
ade,
'configure',
'--native',
'--debug',
'--',
'--enable-installed-tests',
],
cwd=srcdir)
subprocess.check_call([
ade,
'build',
'--verbose',
'--',
'-j{}'.format(threads),
],
cwd=srcdir)
subprocess.check_call([
ade,
'export',
],
cwd=srcdir)
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright 2016 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import glob
import sys
import re
COMMIT_GUIDE="""
It seems something isn't right with the commit message. Having a good
commit message is very important for both for reviewers and for people looking
at history later on - code and commits are read many more times than they are
written. Please ensure that your messages follow the convention.
Good guides for writing commit messages can be found on:
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
http://chris.beams.io/posts/git-commit/
More general guidelines for Apertis can be found on:
https://wiki.apertis.org/Guidelines/Version_control
https://wiki.apertis.org/Guidelines/Contribution_process
"""
SOB_PREFIX = "Signed-off-by: "
issuefile = None
def add_issue(text):
global issuefile
if not issuefile:
issuefile = open("issues.txt", "w")
t = "Issue: {}\n".format(text)
print(t, end="")
issuefile.write(t)