Skip to content

Commit

Permalink
Merge pull request #352 from plone/overhaul
Browse files Browse the repository at this point in the history
Overhaul
  • Loading branch information
gforcada committed Mar 16, 2024
2 parents 8cc9644 + fa8911e commit a261e1c
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 283 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "src/jenkins-job-builder"]
path = src/jenkins-job-builder
url = https://github.com/gforcada/jenkins-job-builder.git
pushurl = git@github.com:gforcada/jenkins-job-builder.git
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ PLONE JENKINS/CI
================
This repository is used to configure http://jenkins.plone.org

See ``docs/source/team.rst`` for the members of the Plone testing and CI team,
as well as their responsibilities.

Servers configuration
=====================
Our servers and nodes are configured with `ansible<http://ansible.com/>`_.

Jobs
====
A jenkins server without any job is quite useless.

All our jenkins jobs are configured through `jenkins-job-builder<https://pypi.python.org/pypi/jenkins-job-builder>`_.
Get the repository and python:

::
git clone git@github.com:plone/jenkins.plone.org
cd jenkins.plone.org
python3.11 -m venv venv
. venv/bin/activate
pip install -r requirements.txt

Test creating the jobs locally::

See the `documentation<https://pypi.python.org/pypi/jenkins-job-builder>`_ on how to set them,
the actual configuration files are located at the ``jobs`` folder.
jenkins-jobs --conf jobs/config.ini test jobs/jobs.yml -o output --config-xml
226 changes: 43 additions & 183 deletions jobs/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

scm:
- buildout-coredev:
branch: '5.2'
branch: '6.0'

wrappers:
- custom-workspace-cleanup
Expand Down Expand Up @@ -62,46 +62,29 @@
- 'plone-5.2-python-2.7-robot-chrome'

- project:
name: Plone 5.2 on python 3.x
plone-version:
- '5.2'
py:
- '3.8':
python-version: 'Python3.8'
browser:
- chrome
jobs:
- 'pull-request-{plone-version}-{py}'
- 'plone-{plone-version}-python-{py}'
- 'plone-{plone-version}-python-{py}-robot-{browser}'

- project:
name: Plone 6.0 on python 3.x
plone-version:
- '6.0'
py:
- '3.11':
python-version: 'Python3.11'
- '3.8':
python-version: 'Python3.8'
browser:
- chrome
jobs:
- 'pull-request-{plone-version}-{py}'
- 'plone-{plone-version}-python-{py}'
- 'plone-{plone-version}-python-{py}-robot-{browser}'

- project:
name: Plone 6.1 on python 3.x
name: Plone 5.2 and 6.x
plone-version:
- '6.1'
- '6.0'
- '5.2'
py:
- '3.12':
python-version: 'Python3.12'
- '3.11':
python-version: 'Python3.11'
- '3.8':
python-version: 'Python3.8'
browser:
- chrome
exclude:
- plone-version: '6.1'
py: '3.11'
- plone-version: '6.0'
py: '3.12'
- plone-version: '5.2'
py: '3.12'
- plone-version: '5.2'
py: '3.11'
jobs:
- 'pull-request-{plone-version}-{py}'
- 'plone-{plone-version}-python-{py}'
Expand All @@ -124,31 +107,30 @@
- 'plone-{plone-version}-python-{py}-robot-{browser}-scheduled'

- project:
name: Plone 6.0 jobs on python 3.x (scheduled)
name: Plone 6.x jobs on python 3.x (scheduled)
plone-version:
- '6.1'
- '6.0'
py:
- '3.12':
python-version: 'Python3.12'
- '3.11':
python-version: 'Python3.11'
- '3.10':
python-version: 'Python3.10'
- '3.9':
python-version: 'Python3.9'
browser:
- chrome
jobs:
- 'plone-{plone-version}-python-{py}-scheduled'
- 'plone-{plone-version}-python-{py}-robot-{browser}-scheduled'

- project:
name: Plone 6.1 jobs on python 3.x (scheduled)
plone-version:
- '6.1'
py:
- '3.11':
python-version: 'Python3.11'
browser:
- chrome
exclude:
- plone-version: '6.1'
py: '3.12'
- plone-version: '6.1'
py: '3.10'
- plone-version: '6.1'
py: '3.9'
- plone-version: '6.0'
py: '3.11'
jobs:
- 'plone-{plone-version}-python-{py}-scheduled'
- 'plone-{plone-version}-python-{py}-robot-{browser}-scheduled'
Expand Down Expand Up @@ -186,26 +168,20 @@
jobs:
- 'volto-translations-{branch}'

- project:
name: PLIPs
plip:
- plip-image-scales-metadata:
buildout: plips/plip-image-scales-metadata.cfg
branch: '6.0'
py:
- '3.9':
python-version: 'Python3.9'
- '3.8':
python-version: 'Python3.8'
jobs:
- 'plip-{plip}-{py}'
#- project:
# name: PLIPs
# plip:
# - plip-image-scales-metadata:
# buildout: plips/plip-image-scales-metadata.cfg
# branch: '6.0'
# py:
# - '3.12':
# python-version: 'Python3.9'
# - '3.8':
# python-version: 'Python3.8'
# jobs:
# - 'plip-{plip}-{py}'

- project:
name: QA scripts
jobs:
- qa-undeclared-dependencies
- qa-code-analysis
- plone-package-dependencies-ztc

###
# JOBS
Expand Down Expand Up @@ -414,9 +390,6 @@
- custom-timeout
- custom-github-api-key

- inject:
properties-content: ROBOTSUITE_PREFIX=ONLYROBOT

<<: *plone


Expand All @@ -440,13 +413,8 @@
branch: '{branch}'

builders:
- shining-panda:
build-environment: virtualenv
python-version: '{python-version}'
clear: true
nature: shell
command:
!include-raw: scripts/plips.sh
- shell:
!include-raw: scripts/plips.sh

publishers:
- custom-junit
Expand Down Expand Up @@ -616,34 +584,6 @@

<<: *plone-basic

- job:
name: plone-package-dependencies-ztc
display-name: 'Plone ZopeTestCase dependencies'

triggers:
- timed: "@weekly"

builders:
- shining-panda:
build-environment: virtualenv
python-version: Python2.7
clear: true
nature: shell
command:
!include-raw: scripts/dependencies-ztc.sh

publishers:
- archive:
artifacts: 'deps.txt'
allow-empty: 'false'

wrappers:
- custom-timeout
- custom-workspace-cleanup

<<: *plone


- job-template:
name: plone-{plone-version}-python-{py}-i18n-find-missing
display-name: 'Plone {plone-version} - Python {py} - Find strings'
Expand Down Expand Up @@ -695,86 +635,6 @@
<<: *plone-basic

- job:
name: qa-undeclared-dependencies
display-name: 'Undeclared dependencies'

triggers:
- timed: '@weekly'

builders:
- shining-panda:
build-environment: virtualenv
python-version: Python2.7
clear: true
nature: shell
command:
!include-raw: scripts/undeclared-dependencies.sh

publishers:
- archive:
artifacts: 'deps.txt, lines.log, pkgs.log'
allow-empty: 'true'

- plot:
- title: Undeclared dependencies
num-builds: '500'
yaxis: dependencies not declared
style: line
use-description: true
group: plot
series:
- file: lines.log
format: properties
- title: Compliant packages
num-builds: '500'
yaxis: compliant packages
style: line
use-description: true
group: plot
series:
- file: pkgs.log
format: properties

wrappers:
- custom-timeout
- custom-workspace-cleanup

<<: *plone


- job:
name: qa-code-analysis
display-name: 'Code analysis'

triggers:
- timed: '@weekly'

builders:
- shining-panda:
build-environment: virtualenv
python-version: Python2.7
clear: true
nature: shell
command:
!include-raw: scripts/qa-global-code-analysis.sh

publishers:
- violations:
pep8:
pattern: 'qa.txt'

- archive:
artifacts: 'qa.txt'
allow-empty: 'true'

wrappers:
- custom-timeout
- custom-workspace-cleanup

<<: *plone


###
# MACROS
###
Expand Down
8 changes: 0 additions & 8 deletions jobs/scripts/dependencies-ztc.sh

This file was deleted.

12 changes: 11 additions & 1 deletion jobs/scripts/plips.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
#!/bin/sh
set -x

PYTHON_VERSION="{py}"
PLONE_VERSION="{plone-version}"

/srv/python${{PYTHON_VERSION}}/bin/python3 -m venv venv
. venv/bin/activate

pip install -r requirements.txt

buildout buildout:git-clone-depth=1 -c {buildout}

export PATH="/usr/lib/chromium-browser:$PATH"
export ROBOT_BROWSER=headlesschrome
export ROBOT_BROWSER="headlesschrome"
export ROBOTSUITE_PREFIX=ONLYROBOT
export PYTHONWARNINGS='ignore'

export PLAYWRIGHT_BROWSERS_PATH='/home/jenkins/robot-browsers/'
bin/rfbrowser init

bin/test --xml --all
23 changes: 0 additions & 23 deletions jobs/scripts/qa-global-code-analysis.sh

This file was deleted.

Loading

0 comments on commit a261e1c

Please sign in to comment.