Commit Graph

7 Commits

Author SHA1 Message Date
Niels de Vos
436a21ec1b ci: only update jobs, do not check views
Updating jobs works, but there is also an error returned:

    Jenkins returned an unexpected view name All (expected: all)

There is no need to update the Views, as there are none configured. Only
the default "All" view is available, and that seems to cause the
failure.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-08-07 10:05:07 +00:00
Niels de Vos
6e38694a11 ci: the order of --allow-empty-variables for jenkins-jobs is important
Jenkins Jobs Builder fails like this, indicating the order of the
parameters is important:

```
$ jenkins-jobs update --allow-empty-variables --delete-old jobs
usage: jenkins-jobs [-h] [--conf CONF] [-l LOG_LEVEL] [--ignore-cache]
                    [--flush-cache] [--version] [--allow-empty-variables]
                    [--server SECTION] [--user USER] [--password PASSWORD]
                    {delete,delete-all,get-plugins-info,list,test,update} ...
jenkins-jobs: error: unrecognized arguments: --allow-empty-variables
```

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-01-30 18:14:58 +01:00
Niels de Vos
6baa675fa0 ci: allow missing RUN_DISPLAY_URL variable in Jenkins Jobs
The `RUN_DISPLAY_URL` is automatically set by Jenkins, but it seems the
latest Jenkins Jobs Builder update does not detect it automatically.
Run the JJB commands with `--allow-empty-variables`.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-01-30 18:08:18 +01:00
Niels de Vos
9a01ee2019 ci: remove old jobs when deploying
Old jobs stay behind (and active) when jobs get updated with new
versions. This mostly affects the mini-e2e jobs at the moment.

There is no need to keep old job around, so delete them while deploying
updates to jobs.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-25 08:03:00 +00:00
Niels de Vos
9ce8d20da9 ci: cd into the WORKDIR before running jenkins-jobs
The directory that gets constructed can be like
`/opt/build/deploy/..//jobs` and this causes jenkins-jobs to fail.
Enternig the WORKDIR and passing the local ./jobs directory to
jenkins-jobs makes things clearer.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 14:09:08 +02:00
Niels de Vos
650d749d28 ci: move the Jenkins Job Builder .yaml files under jobs/
There is a new .commitlintrc.yml file in the root of the repository.
This causes jenkins-job-builder to complains that the file is not
confirm the Jenkins Job Builder format/specification.

    jenkins_jobs.errors.JenkinsJobsException: The topmost collection in file '/opt/build/.commitlintrc.yml' must be a list, not a <class 'collections.OrderedDict'>

Move all Jenkins Job Builder .yaml files to jobs/ so that all the
Jenkins job configurations are kept together without other files.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 13:53:43 +02:00
Niels de Vos
6d906b415f add scripts and configuration to deploy with Jenkins Job Builder
These files make it possible to
- build a container image that includes Jenkins Job Builder
- store the container image in the OpenShift ImageStream
- use the container to validate or deploy the Jenkins Jobs

More details about the files are included in the README.md.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-04-01 14:15:04 +02:00