commit | 7e909e85303772f8888239a4c03b3940903f0d16 | [log] [tgz] |
---|---|---|
author | Thomas Draebing <thomas.draebing@sap.com> | Tue Dec 17 15:53:06 2019 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Thu Jan 16 16:14:58 2020 +0000 |
tree | 152d39b80d25d901e7f469063d9f7e13ba93a488 | |
parent | 0ca2d37d00a2345110da72c37d7bf461644161be [diff] |
Use Gerrit's package.json to create a npm package cache The CI installed fixed versions of npm dependencies into the slave containers. The versions had to be updated manually, if an update was done in the Gerrit project. Thus updating the dependencies was quite a slow process. Now, the npm-packages are installed with yarn from the package.json file of the Gerrit project during the build of the slave containers. This fills yarn's cache, which will allow to install them during a build without having to download them. The Gerrit-codestyle job was adapted accordingly to use yarn to install the required packages. This is tried in offline mode from the cache and if that fails the installation is repeated with access to the package servers. The eslint and polylint steps are now run by yarn directly, since the scripts run through bazel call npm, which fails, since it does not see the dependencies. Change-Id: I89aa4761f8d449d4caab193361c737b6b71d6d98
This project uses Jenkins Jobs Builder [1] to generate jobs from yaml descriptor files.
To add new jobs reuse existing templates, defaults etc. as much as possible. E.g. adding a job to build an additional branch of a project may be as easy as adding the name of the branch to an existing project.
To ensure well readable yaml-files, use yamllint [2] to lint the yaml-files. Yamllint can be downloaded using Python Pip:
pip3 install yamllint
To run the linter, execute this command from the project's root directory:
yamllint -c yamllint-config.yaml jenkins/**/*.yaml
Yamllint will not fix detected issues itself.
[1] https://docs.openstack.org/infra/jenkins-job-builder/index.html [2] https://pypi.org/project/yamllint/