| # CI for gerrit |
| - job: |
| name: 'gerrit' |
| node: Docker |
| wrappers: |
| # needs to be 1 hour and 30 mins to give gerrit enough time to build. |
| # It can sometimes take a while. |
| - timeout: |
| timeout: 90 |
| fail: true |
| - timestamps |
| - credentials-binding: |
| - text: |
| credential-id: composer-github-oauthtoken |
| variable: COMPOSER_GITHUB_OAUTHTOKEN |
| triggers: |
| - zuul |
| builders: |
| - docker-castor-load |
| - docker-log-dir |
| - docker-src-dir |
| # .gitsubmodules uses relative url, we need to point to upstream gerrit |
| # repository to fetch them which is handled by the repo build script. |
| - docker-ci-src-setup-simple: |
| submodules: false |
| |
| - docker-run-with-log-cache-src: |
| image: docker-registry.wikimedia.org/releng/gerrit:1.5.0 |
| entrypoint: /src/wmf-build.py |
| environment: |
| LOG_DIR: /log |
| volumes: |
| /srv/git: /srv/git:ro |
| publishers: |
| - archive: |
| artifacts: 'log/*.war, log/*.jar, log/*.js' |
| - castor-save-workspace-cache |
| - docker-cleanup |
| |
| - job-template: |
| name: '{name}-bazel' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - docker-castor-load |
| - docker-src-dir |
| |
| # Ensure /log files are writable before deleting - T320251 |
| - shell: | |
| mkdir -m 2777 -p "log" |
| - docker-run: |
| image: docker-registry.wikimedia.org/bullseye:latest |
| volumes: |
| log: |
| entrypoint: /bin/chmod |
| args: >- |
| -R u+w /log |
| |
| - docker-log-dir |
| - docker-ci-src-setup-simple |
| - docker-run-with-log-cache-src: |
| image: docker-registry.wikimedia.org/releng/gerrit:1.5.0 |
| args: '{build_target}' |
| volumes: |
| /srv/git: /srv/git:ro |
| - docker-run-with-log-cache-src: |
| image: docker-registry.wikimedia.org/releng/gerrit:1.5.0 |
| entrypoint: bazelisk |
| args: 'test {test_target}' |
| volumes: |
| /srv/git: /srv/git:ro |
| |
| - job-template: &job_template_maven-java8 |
| name: '{name}-maven-java8' |
| node: Docker |
| # Projects are by default built on Java 8. To build on Java 11, use the |
| # {name}-maven-java11 job template, which will replace this docker |
| # image with the java 11 version. |
| docker_image_var: docker-registry.wikimedia.org/releng/maven-java8:1.1.0-s5 |
| triggers: |
| - zuul |
| # The project is expected to provide a maven wrapper at the root of the |
| # project. If another entry point is required for a project (for example |
| # to setup some build prerequisites) 'maven_path' variables can be |
| # overridden. Note that the sonar analysis step will always use the |
| # maven wrapper provided by the project. |
| # maven_path: /some/entry/point |
| maven_path: '/src/mvnw' |
| |
| maven_args: 'clean install' |
| # The pom.xml is expected to be at the root of the project. If it is |
| # somewhere else, the path can be specified here, relative to "workdir" |
| # (see below). |
| pom: 'pom.xml' |
| # The working directory. It should usually be the root of the project. |
| # Maven should be able to run from anywhere, but in some cases a project |
| # configuration might depend on a specific working directory. Ideally the |
| # Maven configuration should be fixed to be workdir independent, but if |
| # that's not practical, the working directory can be overridden. Note that |
| # in that case, it might be necessary to adapt the "pom" argument as well. |
| workdir: '/src' |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| # run Maven Wrapper directly from the project |
| entrypoint: '{maven_path}' |
| workdir: '{workdir}' |
| image: '{obj:docker_image_var}' |
| args: '-gs /settings.xml --batch-mode --file {pom} {maven_args}' |
| |
| # The branch holding the patch is named $ZUUL_BRANCH |
| # |
| # For patch analysis, we need to match sonar.branch.name parameter |
| # which is set to {branch} which is the change number + the patchset. |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: git |
| args: 'branch -m "$ZUUL_CHANGE-$ZUUL_PATCHSET"' |
| # The comparison is done against sonar.branch.target which is |
| # $ZUUL_BRANCH, make it point to the previous patchset. |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: git |
| args: 'checkout -B $ZUUL_BRANCH FETCH_HEAD^' |
| # Set working copy back to branch holding the patch |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: git |
| args: 'checkout "$ZUUL_CHANGE-$ZUUL_PATCHSET"' |
| |
| - docker-run-with-log-cache-src: |
| # This runs a sonar analysis after the main build. It relies on |
| # Maven `install` target having been reached in the previous step. |
| # It requires at least the following configurations in the pom.xml |
| # of the project: |
| # * sonar plugin declared and configured |
| # * Sonar API key loaded via the environment variable `SONAR_API_KEY` |
| # |
| # minimal example: |
| # <properties> |
| # <sonar.host.url>https://sonarcloud.io</sonar.host.url> |
| # <sonar.login>${env.SONAR_API_KEY}</sonar.login> |
| # <sonar.organization>wmftest</sonar.organization> |
| # </properties> |
| # <build> |
| # <pluginManagement> |
| # <plugins> |
| # <plugin> |
| # <groupId>org.sonarsource.scanner.maven</groupId> |
| # <artifactId>sonar-maven-plugin</artifactId> |
| # <version>3.8.0.2131</version> |
| # </plugin> |
| # </plugins> |
| # </pluginManagement> |
| # </build> |
| # |
| # Note that Sonar must be running on Java 17, but can analyze code |
| # built on Java 8 & 11. |
| entrypoint: /src/mvnw |
| workdir: '{workdir}' |
| image: docker-registry.wikimedia.org/releng/maven-java17:1.0.1-s1 |
| args: > |
| -gs /settings.xml --batch-mode --file {pom} -X |
| sonar:sonar |
| -Dsonar.analysis.allowCommentOnMaster="1" |
| -Dsonar.analysis.gerritProjectName="$ZUUL_PROJECT" |
| -Dsonar.branch.target="$ZUUL_BRANCH" |
| -Dsonar.branch.name="$ZUUL_CHANGE-$ZUUL_PATCHSET" |
| publishers: |
| - archive-log-allow-empty |
| - teardown |
| wrappers: |
| - timeout: |
| timeout: '{timeout|30}' |
| fail: true |
| - timestamps |
| - credentials-binding: |
| - text: |
| credential-id: composer-github-oauthtoken |
| variable: COMPOSER_GITHUB_OAUTHTOKEN |
| - text: |
| # SONAR_API_KEY is in Jenkins credentials store |
| # https://integration.wikimedia.org/ci/credentials/ |
| credential-id: SONAR_API_KEY |
| variable: SONAR_API_KEY |
| |
| # Convenience alias with name/project variables |
| - job-template: |
| !!merge : *job_template_maven-java8 |
| name: '{name}-{project}-maven-java8' |
| # Reinject Zuul parameters since JJB strip for some reason |
| triggers: |
| - zuul |
| |
| - job-template: &job_template_maven-java11 |
| !!merge : *job_template_maven-java8 |
| name: '{name}-maven-java11' |
| docker_image_var: docker-registry.wikimedia.org/releng/maven-java11:1.0.1-s2 |
| # Reinject Zuul parameters since JJB strip for some reason |
| triggers: |
| - zuul |
| |
| - job-template: |
| !!merge : *job_template_maven-java11 |
| name: '{name}-{project}-maven-java11' |
| # Reinject Zuul parameters since JJB strip for some reason |
| triggers: |
| - zuul |
| |
| # Generate project documentation using docker and publish it |
| - job-template: &job_template_docker-doc-publish |
| name: '{name}-doc-publish' |
| node: Docker |
| concurrent: false |
| triggers: |
| - zuul |
| builders: |
| - docker-cache-dir |
| - docker-log-dir |
| - docker-src-dir |
| - docker-ci-src-setup-simple |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| workdir: /src |
| args: '{obj:args|}' |
| environment: '{obj:environment|}' |
| - doc-publish: |
| docsrc: '{docsrc}' |
| docdest: '{docdest}' |
| publishers: |
| - archive-log-allow-empty |
| - docker-cleanup |
| |
| - job-template: |
| !!merge : *job_template_docker-doc-publish |
| name: '{name}-doc-tag-publish' |
| triggers: |
| - zuul-post |
| |
| - job-template: |
| !!merge : *job_template_docker-doc-publish |
| name: '{name}-doc-latest-publish' |
| triggers: |
| - zuul-post |
| |
| # Same as '{name}-maven-java8' but src is bindmounted so we can later |
| # retrieve the site from /src/target/ and push it to doc.wikimedia.org. This |
| # job template is meant to be run as a post merge step. |
| - job-template: &job_template_maven-java8-site-publish |
| name: '{name}-maven-java8-site-publish' |
| node: Docker |
| concurrent: false |
| # Projects are by default built on Java 8. To build on Java 11, use the |
| # {name}-maven-java11-site-publish job template, which will replace |
| # this docker image with the java 11 version. |
| docker_image_var: docker-registry.wikimedia.org/releng/maven-java8:1.1.0-s5 |
| # The Sonar analysis runs under Java 17 though |
| sonar_image_var: docker-registry.wikimedia.org/releng/maven-java17:1.0.1-s1 |
| |
| # The project is expected to provide a maven wrapper at the root of the |
| # project. If another entry point is required for a project (for example |
| # to setup some build prerequisites) 'maven_path' variables can be |
| # overridden. Note that the sonar analysis step will always use the |
| # maven wrapper provided by the project. |
| # maven_path: /some/entry/point |
| maven_path: '/src/mvnw' |
| |
| maven_args: 'clean install' |
| # The pom.xml is expected to be at the root of the project. If it is |
| # somewhere else, the path can be specified here, relative to "workdir" |
| # (see below). |
| pom: 'pom.xml' |
| # The working directory. It should usually be the root of the project. |
| # Maven should be able to run from anywhere, but in some cases a project |
| # configuration might depend on a specific working directory. Ideally the |
| # Maven configuration should be fixed to be workdir independent, but if |
| # that's not practical, the working directory can be overridden. Note that |
| # in that case, it might be necessary to adapt the "pom" argument as well. |
| workdir: '/src' |
| # The Maven site is generated in this directory. For projects that don't |
| # follow a standard structure, this can be overridden. |
| site_dir: 'src/target/staging' |
| triggers: |
| - zuul |
| builders: |
| - setup |
| # Build the maven project, runs the validation. The artifacts are |
| # reused for the later steps (site and sonar analysis). |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: '{maven_path}' |
| workdir: '{workdir}' |
| args: '-gs /settings.xml --batch-mode --file {pom} {maven_args}' |
| # Sonar analysis (see '{name}-maven-java8' for details) |
| - docker-run-with-log-cache-src: |
| image: '{obj:sonar_image_var}' |
| entrypoint: '{maven_path}' |
| workdir: '{workdir}' |
| args: > |
| -gs /settings.xml --batch-mode --file {pom} |
| sonar:sonar |
| -Dsonar.analysis.allowCommentOnMaster="1" |
| -Dsonar.analysis.gerritProjectName="$ZUUL_PROJECT" |
| -Dsonar.branch.name="$ZUUL_BRANCH" |
| # Generate Maven site, which will be published by the 'doc-publish' |
| # step below. |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: '{maven_path}' |
| workdir: '{workdir}' |
| args: '-gs /settings.xml --batch-mode --file {pom} site site:stage' |
| wrappers: |
| - timeout: |
| timeout: '{timeout|30}' |
| fail: true |
| - timestamps |
| - credentials-binding: |
| # SONAR_API_KEY is in Jenkins credentials store |
| # https://integration.wikimedia.org/ci/credentials/ |
| - text: |
| credential-id: SONAR_API_KEY |
| variable: SONAR_API_KEY |
| - text: |
| credential-id: composer-github-oauthtoken |
| variable: COMPOSER_GITHUB_OAUTHTOKEN |
| publishers: |
| - postbuildscript: |
| builders: |
| - build-steps: |
| - doc-publish: |
| docsrc: '{site_dir}' |
| docdest: '{name}' |
| - archive-log-allow-empty |
| - teardown |
| |
| - job-template: |
| name: '{name}-{project}-maven-java8-site-publish' |
| !!merge : *job_template_maven-java8-site-publish |
| triggers: |
| - zuul |
| publishers: |
| - postbuildscript: |
| builders: |
| - build-steps: |
| - doc-publish: |
| docsrc: 'src/target/staging' |
| docdest: '{name}-{project}' |
| - archive-log-allow-empty |
| - teardown |
| |
| - job-template: &job_template_maven-java11-site-publish |
| !!merge : *job_template_maven-java8-site-publish |
| name: '{name}-maven-java11-site-publish' |
| docker_image_var: docker-registry.wikimedia.org/releng/maven-java11:1.0.1-s2 |
| # Reinject Zuul parameters since JJB strip for some reason |
| triggers: |
| - zuul |
| |
| - job-template: |
| !!merge : *job_template_maven-java11-site-publish |
| name: '{name}-{project}-maven-java11-site-publish' |
| # Reinject Zuul parameters since JJB strip for some reason |
| triggers: |
| - zuul |
| |
| - job-template: &job_template_maven-release |
| name: '{name}-maven-release' |
| node: Docker |
| concurrent: false |
| parameters: |
| - string: |
| name: 'ZUUL_URL' |
| default: 'https://[email protected]/r' |
| description: > |
| Base URL to clone the repository from. |
| HTTPS credentials for Gerrit are injected by Jenkins' |
| - string: |
| name: 'ZUUL_PROJECT' |
| default: '{release-project}' |
| description: 'The Gerrit project to clone' |
| - string: |
| name: 'ZUUL_REF' |
| default: '{release-branch}' |
| description: 'A git reference to fetch. Used by "git fetch"' |
| - string: |
| name: 'ZUUL_BRANCH' |
| default: '{release-branch}' |
| description: 'Name of the local branch to checkout to' |
| - string: |
| name: 'ZUUL_PIPELINE' |
| default: 'postmerge' |
| description: '"postmerge" triggers saving the Maven cache.' |
| wrappers: |
| # Credentials for Gerrit |
| - credentials-binding: |
| - file: |
| credential-id: maven-release-user-netrc |
| variable: NETRC_FILE |
| # Credentials for Archiva |
| - config-file-provider: |
| files: |
| - file-id: 'org.jenkinsci.plugins.configfiles.maven.MavenSettingsConfig.ArchivaCredentialsSettings' |
| target: archiva-credentials.xml |
| - timeout: |
| timeout: '{timeout|45}' # minutes |
| fail: true |
| - timestamps |
| builders: |
| - docker-castor-load |
| - docker-log-dir |
| - docker-src-dir |
| # The config-file-provider has the file created by the jenkins-slave and |
| # respecting umask. It is thus not readable by the nobody user in the |
| # container. setfacl lets us grant an extra permission. |
| # Credentials binding makes it readable solely by the jenkins-slave user. |
| - shell: | |
| setfacl -m user:65534:r archiva-credentials.xml $NETRC_FILE |
| - docker-run-with-log-cache-src: |
| environment: |
| GIT_AUTHOR_NAME: maven-release-user |
| GIT_COMMITTER_NAME: maven-release-user |
| EMAIL: [email protected] |
| options: >- |
| -v "$NETRC_FILE":/nonexistent/.netrc:ro |
| -v "$WORKSPACE/archiva-credentials.xml":/archiva-credentials.xml |
| image: docker-registry.wikimedia.org/releng/maven-java8:1.1.0-s5 |
| args: >- |
| -Dresume=false |
| -Djdk.net.URLClassPath.disableClassPathURLCheck=true |
| -Duser.name='maven-release-user' |
| -DdeveloperConnection="scm:git:$ZUUL_URL/$ZUUL_PROJECT" |
| --settings /archiva-credentials.xml |
| release:prepare release:perform -Darguments=-Dgpg.skip=true |
| publishers: '{publishers}' |
| |
| - job-template: |
| name: '{name}-{project}-maven-release' |
| !!merge : *job_template_maven-release |
| |
| # Node job for 'npm install-test' |
| - job-template: |
| name: '{name}-{node_version}' |
| node: Docker |
| triggers: |
| - zuul |
| properties: |
| - build-discarder: |
| days-to-keep: 7 |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| publishers: |
| - archive-log-allow-empty |
| - teardown |
| |
| # Job for 'npm install & npm run {script}' |
| - job-template: |
| name: '{name}-{node_version}-run{script}' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| options: '--shm-size 1g' |
| args: '{script}' |
| publishers: |
| - archive-log-allow-empty |
| - teardown |
| |
| - job-template: |
| name: 'branchdeploy-{key}-node18-npm' |
| node: Docker |
| triggers: |
| - zuul |
| wrappers: |
| - timeout: |
| timeout: 30 |
| fail: true |
| - timestamps |
| - credentials-binding: |
| - text: |
| credential-id: BRANCHDEPLOY_AUTH_TOKEN_{key} |
| variable: BRANCHDEPLOY_AUTH_TOKEN |
| - text: |
| credential-id: BRANCHDEPLOY_SITE_ID_{key} |
| variable: BRANCHDEPLOY_SITE_ID |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node18-test:18.20.2-s2' |
| workdir: /src |
| args: 'branch-deploy' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| - job-template: |
| name: 'branchdeploy-{key}-node20-npm' |
| node: Docker |
| triggers: |
| - zuul |
| wrappers: |
| - timeout: |
| timeout: 30 |
| fail: true |
| - timestamps |
| - credentials-binding: |
| - text: |
| credential-id: BRANCHDEPLOY_AUTH_TOKEN_{key} |
| variable: BRANCHDEPLOY_AUTH_TOKEN |
| - text: |
| credential-id: BRANCHDEPLOY_SITE_ID_{key} |
| variable: BRANCHDEPLOY_SITE_ID |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node20-test:20.12.2-s2' |
| workdir: /src |
| args: 'branch-deploy' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| - job-template: |
| name: 'branchdeploy-{key}-node22-npm' |
| node: Docker |
| triggers: |
| - zuul |
| wrappers: |
| - timeout: |
| timeout: 30 |
| fail: true |
| - timestamps |
| - credentials-binding: |
| - text: |
| credential-id: BRANCHDEPLOY_AUTH_TOKEN_{key} |
| variable: BRANCHDEPLOY_AUTH_TOKEN |
| - text: |
| credential-id: BRANCHDEPLOY_SITE_ID_{key} |
| variable: BRANCHDEPLOY_SITE_ID |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node22-test:22.0.0-s2' |
| workdir: /src |
| args: 'branch-deploy' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| - job-template: |
| name: '{name}-daily-node18-npmaudit' |
| node: Docker |
| triggers: |
| - timed: '@daily' |
| parameters: |
| - string: |
| name: 'ZUUL_PROJECT' |
| default: '{repository}' |
| - string: |
| name: 'ZUUL_REF' |
| default: 'master' |
| - string: |
| name: 'ZUUL_URL' |
| default: 'https://gerrit.wikimedia.org/r/' |
| - string: |
| name: 'NPM_CONFIG_cache' |
| default: '/cache' |
| builders: |
| - docker-cache-dir |
| - docker-log-dir |
| - docker-src-dir |
| - docker-ci-src-setup-simple |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node18:18.20.2-s1' |
| workdir: /src |
| args: 'audit' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| - job-template: |
| name: '{name}-daily-node20-npmaudit' |
| node: Docker |
| triggers: |
| - timed: '@daily' |
| parameters: |
| - string: |
| name: 'ZUUL_PROJECT' |
| default: '{repository}' |
| - string: |
| name: 'ZUUL_REF' |
| default: 'master' |
| - string: |
| name: 'ZUUL_URL' |
| default: 'https://gerrit.wikimedia.org/r/' |
| - string: |
| name: 'NPM_CONFIG_cache' |
| default: '/cache' |
| builders: |
| - docker-cache-dir |
| - docker-log-dir |
| - docker-src-dir |
| - docker-ci-src-setup-simple |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node20:20.12.2-s1' |
| workdir: /src |
| args: 'audit' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| - job-template: |
| name: '{name}-daily-node22-npmaudit' |
| node: Docker |
| triggers: |
| - timed: '@daily' |
| parameters: |
| - string: |
| name: 'ZUUL_PROJECT' |
| default: '{repository}' |
| - string: |
| name: 'ZUUL_REF' |
| default: 'master' |
| - string: |
| name: 'ZUUL_URL' |
| default: 'https://gerrit.wikimedia.org/r/' |
| - string: |
| name: 'NPM_CONFIG_cache' |
| default: '/cache' |
| builders: |
| - docker-cache-dir |
| - docker-log-dir |
| - docker-src-dir |
| - docker-ci-src-setup-simple |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node22:22.0.0-s1' |
| workdir: /src |
| args: 'audit' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| # Node job for 'npm install-test' (with browsers installed) |
| - job-template: |
| name: '{name}-{node_version}-browser' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| options: >- |
| --shm-size 1g |
| --env LOG_DIR=/log |
| publishers: |
| - archive-log-allow-empty |
| - teardown |
| |
| # Node job for 'npm install-test' (with browsers installed) and webdriver running |
| - job-template: |
| name: '{name}-{node_version}-browser-webdriver' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| entrypoint: /run-with-xvfb.sh |
| options: >- |
| --shm-size 1g |
| --env LOG_DIR=/log |
| publishers: |
| - archive-log-allow-empty |
| - teardown |
| |
| # Node job for 'npm cit' (with browser installed) |
| # and publishing /coverage from workspace |
| # to doc.wikimedia.org/cover/:DOC_PROJECT |
| - job-template: |
| name: 'generic-{node_version}-browser-coverage-publish' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| - cover-publish: |
| src: 'src/coverage' |
| dest: '$DOC_PROJECT' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| |
| # Node job for 'npm ci && npm coverage' (with browser installed) |
| # and publishing /coverage from workspace |
| # to doc.wikimedia.org/cover/:DOC_PROJECT |
| - job-template: |
| name: 'generic-{node_version}-browser-direct-coverage-publish' |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| args: 'coverage' |
| - cover-publish: |
| src: 'src/coverage' |
| dest: '$DOC_PROJECT' |
| publishers: |
| # FIXME: use `- teardown` to save cache? |
| - docker-cleanup |
| |
| # Node jobs for 'npm install && npm run doc' |
| # Publishing workspace/docs to doc.wikimedia.org/:DOC_PROJECT/:DOC_SUBPATH/ |
| # - DOC_PROJECT: determined in parameter_functions.py (repo name) |
| # - DOC_SUBPATH: determined in parameter_functions.py (branch or tag) |
| - job-template: |
| name: generic-{node_version}-docs-publish |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{image}' |
| args: 'doc' |
| - doc-publish: |
| docsrc: 'src/docs' |
| docdest: '$DOC_PROJECT/$DOC_SUBPATH' |
| publishers: |
| - teardown |
| |
| # Publishing workspace/docs to doc.wikimedia.org/:DOC_PROJECT/:DOC_SUBPATH/js/ |
| # - DOC_PROJECT: determined in parameter_functions.py (mw extension name) |
| # - DOC_SUBPATH: determined in parameter_functions.py (branch or tag) |
| - job: |
| name: mwext-node18-docs-publish |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node18-test:18.20.2-s2' |
| args: 'doc' |
| - doc-publish: |
| docsrc: 'src/docs' |
| docdest: '$DOC_PROJECT/$DOC_SUBPATH/js' |
| publishers: |
| - teardown |
| |
| - job: |
| name: mwext-node20-docs-publish |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node20-test:20.12.2-s2' |
| args: 'doc' |
| - doc-publish: |
| docsrc: 'src/docs' |
| docdest: '$DOC_PROJECT/$DOC_SUBPATH/js' |
| publishers: |
| - teardown |
| |
| - job: |
| name: mwext-node22-docs-publish |
| node: Docker |
| triggers: |
| - zuul |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: 'docker-registry.wikimedia.org/releng/node22-test:22.0.0-s2' |
| args: 'doc' |
| - doc-publish: |
| docsrc: 'src/docs' |
| docdest: '$DOC_PROJECT/$DOC_SUBPATH/js' |
| publishers: |
| - teardown |
| |
| - project: |
| name: 'generic' |
| node_version: |
| - node18: |
| image: docker-registry.wikimedia.org/releng/node18-test-browser:18.20.2-s2 |
| - node20: |
| image: docker-registry.wikimedia.org/releng/node20-test-browser:20.12.2-s2 |
| - node22: |
| image: docker-registry.wikimedia.org/releng/node22-test-browser:22.0.0-s2 |
| jobs: |
| - 'generic-{node_version}-browser-coverage-publish' |
| - 'generic-{node_version}-browser-direct-coverage-publish' |
| - '{name}-{node_version}-browser' |
| - '{name}-{node_version}-browser-webdriver' |
| - '{name}-{node_version}-run{script}': |
| script: 'doc' |
| |
| # The basic jobs images do not have web browsers: |
| - '{name}-{node_version}': |
| node_version: &node_without_browsers |
| - node18: |
| image: docker-registry.wikimedia.org/releng/node18-test:18.20.2-s2 |
| - node20: |
| image: docker-registry.wikimedia.org/releng/node20-test:20.12.2-s2 |
| - node22: |
| image: docker-registry.wikimedia.org/releng/node22-test:22.0.0-s2 |
| - 'generic-{node_version}-docs-publish': |
| node_version: *node_without_browsers |
| |
| # Same as 'generic', but kept separate so that gate-and-submit jobs |
| # don't cross-block between mediawiki/* and non-mediawiki changes. |
| - project: |
| name: 'mwext' |
| jobs: |
| - '{name}-{node_version}-run{script}': |
| script: 'doc' |
| node_version: |
| - node18: |
| image: docker-registry.wikimedia.org/releng/node18-test-browser:18.20.2-s2 |
| - node20: |
| image: docker-registry.wikimedia.org/releng/node20-test-browser:20.12.2-s2 |
| - node22: |
| image: docker-registry.wikimedia.org/releng/node22-test-browser:22.0.0-s2 |
| |
| # Same as 'mwext', but solo so BlueSpice repos don't conflict |
| - project: |
| name: 'mwext-bluespice' |
| jobs: |
| - '{name}-{node_version}': |
| node_version: |
| - node18: |
| image: docker-registry.wikimedia.org/releng/node18-test-browser:18.20.2-s2 |
| - node20: |
| image: docker-registry.wikimedia.org/releng/node20-test-browser:20.12.2-s2 |
| - node22: |
| image: docker-registry.wikimedia.org/releng/node22-test-browser:22.0.0-s2 |
| |
| - project: |
| name: 'branchdeploy' |
| jobs: |
| - 'branchdeploy-{key}-node18-npm': |
| key: |
| - codex |
| - 'branchdeploy-{key}-node20-npm': |
| key: |
| - wikidata-query-builder |
| - codex |
| - 'branchdeploy-{key}-node22-npm': |
| key: |
| - codex |
| |
| - job-template: |
| name: 'selenium-daily-{sitename}-{project}' |
| node: Docker |
| docker_image_var: 'docker-registry.wikimedia.org/releng/node18-test-browser:18.20.2-s2' |
| triggers: |
| - timed: '@daily' |
| parameters: |
| - string: |
| name: 'MEDIAWIKI_USER' |
| default: '{mw_user}' |
| - string: |
| name: 'MW_SCRIPT_PATH' |
| default: '/w' |
| - string: |
| name: 'MW_SERVER' |
| default: '{mw_server}' |
| - string: |
| name: 'ZUUL_BRANCH' |
| default: 'master' |
| - string: |
| name: 'ZUUL_PIPELINE' |
| default: 'postmerge' # to force saving npm cache with castor |
| - string: |
| name: 'ZUUL_PROJECT' |
| default: '{repository}' |
| - string: |
| name: 'ZUUL_REF' |
| default: 'master' |
| - string: |
| name: 'ZUUL_URL' |
| default: 'https://gerrit.wikimedia.org/r/p/' |
| builders: |
| - setup |
| - docker-run-with-log-cache-src: |
| image: '{obj:docker_image_var}' |
| entrypoint: /run-with-xvfb.sh |
| options: '--env LOG_DIR=/log' |
| args: 'selenium-daily' |
| wrappers: |
| - timeout: |
| timeout: 60 |
| - timestamps |
| # Wiki usernames and passwords are hold in Jenkins credentials store |
| # https://integration.wikimedia.org/ci/credentials/store/system/domain/selenium/ |
| - credentials-binding: |
| - text: |
| credential-id: '{mw_credential_id}' |
| variable: MEDIAWIKI_PASSWORD |
| - text: |
| credential-id: composer-github-oauthtoken |
| variable: COMPOSER_GITHUB_OAUTHTOKEN |
| publishers: |
| - archive-log-allow-empty |
| # FIXME remove and replace by `- teardown` |
| - castor-save-workspace-cache |
| - junit: |
| results: 'log/junit*.xml,log/WDIO.xunit*.xml' |
| # We do not have any JUnit files when all tests pass |
| allow-empty-results: true |
| - email-ext: |
| recipients: '{recipients}' |
| body: '${{SCRIPT, template="wikimedia.template"}}' |
| failure: true |
| unstable: true |
| - docker-cleanup |