Job Groups
==========
-{project-name}-ci-jobs
-----------------------
+.. include:: ../job-groups.rst
-Recommended jobs that should be deployed for CI using Gerrit.
+Below is a list of CI job groups:
-:Includes:
-
- - gerrit-jenkins-cfg-merge
- - gerrit-jenkins-sandbox-cleanup
- - gerrit-jjb-deploy-job
- - gerrit-jjb-merge
- - gerrit-jjb-verify
-
-{project-name}-github-ci-jobs
------------------------------
-
-Recommended jobs that should be deployed CI using GitHub.
-
-:Includes:
-
- - github-jenkins-cfg-merge
- - github-jenkins-sandbox-cleanup
- - github-jjb-deploy-job
- - github-jjb-merge
- - github-jjb-verify
-
-{project-name}-info-yaml-jobs
------------------------------
-
-Jobs to verify INFO.yaml file changes.
-
-:Includes:
-
- - gerrit-info-yaml-verify
-
-{project-name}-github-info-yaml-jobs
-------------------------------------
-
-Jobs to verify INFO.yaml file changes using Github.
-
-:Includes:
-
- - github-info-yaml-verify
-
-{project-name}-packer-jobs
---------------------------
-
-Jobs related to Packer builds for CI using Gerrit.
-
-:Includes:
-
- - gerrit-packer-merge
- - gerrit-packer-verify
-
-{project-name}-github-packer-jobs
----------------------------------
-
-Jobs related to Packer builds for CI using GitHub.
-
-:Includes:
+.. literalinclude:: ../../jjb/lf-ci-job-groups.yaml
+ :language: yaml
- - github-packer-merge
- - github-packer-verify
Macros
======
Job Templates
=============
+.. _gerrit-branch-lock:
+
Gerrit Branch Lock
------------------
- {project-name}-gerrit-branch-lock-{stream}
- gerrit-branch-lock
+:Comment Trigger:
+
+ * lock branch
+ * unlock branch
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally
+ should be configured in defaults.yaml)
+
+:Optional parameters:
+
+ :branch: Git branch to build against. (default: master)
+ :git-url: URL to clone project from. (default: $GIT_URL/$GERRIT_PROJECT)
+ :stream: Keyword that can be used to represent a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
+ :gerrit_merge_triggers: Override Gerrit Triggers.
.. _lf-global-jjb-jenkins-cfg-merge:
"{project-name}-ci-jobs" job-group and does not need to be explicitly called if
the job group is being used.
-Miniaml Example:
+Minimal Example:
.. literalinclude:: ../../.jjb-test/lf-ci-jobs/jenkins-cfg-merge-minimal.yaml
:language: yaml
(default: "os-cloud")
:INSTANCE_CAP: Total number of instances the cloud will allow spin up.
(default: null)
- :SANDBOX_CAP: Total number of instances the clodu will allow to
+ :SANDBOX_CAP: Total number of instances the cloud will allow to
spin up. This applies to "sandbox" systems and overrides the
INSTANCE_CAP setting. (default: null)
the one defined in default clouds will be inherited.
:IMAGE_NAME: The image name to use for this template.
- (default: "")
+ (required)
+ :HARDWARE_ID: OpenStack flavor to use. (required)
+
:LABELS: Labels to assign to the vm. (default: FILE_NAME)
- :HARDWARE_ID: OpenStack flavor to use. (default: "")
:NETWORK_ID: OpenStack network to use. (default: "")
:USER_DATA_ID: User Data to pass into the instance.
(default: jenkins-init-script)
:build-node: The node to run build on.
:jenkins-ssh-credential: Credential to use for SSH. (Generally should
be configured in defaults.yaml)
- :mvn-settings: The name of settings file containing credentials for
- the project.
:Optional parameters:
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
(default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
:gerrit_merge_triggers: Override Gerrit Triggers.
:gerrit_trigger_file_paths: Override file paths which can be used to
:build-node: The node to run build on.
:jenkins-ssh-credential: Credential to use for SSH. (Generally should
be configured in defaults.yaml)
- :mvn-settings: The name of settings file containing credentials for
- the project.
:Optional parameters:
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
(default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
:gerrit_verify_triggers: Override Gerrit Triggers.
:gerrit_trigger_file_paths: Override file paths which can be used to
filter which file modifications will trigger a build.
(default defined by lf_jjb_common)
+.. _jjb-verify-upstream-gjjb:
+
+JJB Verify Upstream Global JJB
+------------------------------
+
+Runs ``jenkins-jobs test`` to validate JJB syntax for upstream global-jjb
+patches. This job is useful to notify upstream that they may be breaking
+project level jobs.
+
+:Template Names:
+ - {project-name}-jjb-verify-upstream-gjjb
+ - gerrit-jjb-verify-upstream-gjjb
+
+:Comment Trigger: recheck|reverify
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in minutes before aborting build. (default: 10)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :jjb-version: JJB version to install. (default: see job-template)
+ :stream: Keyword that can be used to represent a release code-name.
+ Often the same as the branch. (default: master)
+
.. _info-yaml-verify:
Info YAML Verify
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
(default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
+
:gerrit_verify_triggers: Override Gerrit Triggers.
.. _license-checker:
:project-pattern: The ANT based pattern for Gerrit Trigger to choose which
projects to trigger job against. (default: '**')
+.. _gjjb-openstack-cron:
+
+OpenStack Cron
+--------------
+
+Cron job that runs regularly to perform periodic tasks against OpenStack.
+
+This job requires a Config File Provider file named ``clouds-yaml`` available
+containing the credentials for the cloud.
+
+:Template Names:
+ - {project-name}-openstack-cron
+ - gerrit-openstack-cron
+ - github-openstack-cron
+
+:Required parameters:
+
+ :build-node: The node to run build on.
+ :jenkins-ssh-credential: Credential to use for SSH. (Generally should
+ be configured in defaults.yaml)
+
+:Optional parameters:
+
+ :branch: Git branch to fetch for the build. (default: master)
+ :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+ :build-timeout: Timeout in minutes before aborting build. (default: 90)
+ :cron: Time when the packer image should be rebuilt (default: @daily)
+ :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :openstack-cloud: OS_CLOUD setting to pass to openstack client.
+ (default: vex)
+ :stream: Keyword that can be used to represent a release code-name.
+ Often the same as the branch. (default: master)
+ :submodule-recursive: Whether to checkout submodules recursively.
+ (default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
+
.. _gjjb-packer-merge:
Packer Merge
:build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
:build-timeout: Timeout in minutes before aborting build. (default: 90)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :openstack: Packer template uses an OpenStack builder (default: true).
+ :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
+ (default: vex).
:packer-cloud-settings: Name of settings file containing credentials
for the cloud that packer will build on. (default: packer-cloud-env)
:packer-version: Version of packer to install / use in build. (default: 1.0.2)
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
(default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
:gerrit_verify_triggers: Override Gerrit Triggers.
:build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
:build-timeout: Timeout in minutes before aborting build. (default: 10)
:git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+ :openstack: Packer template uses an OpenStack builder (default: true).
+ :openstack-cloud: Sets OS_CLOUD variable to the value of this parameter.
+ (default: vex).
:packer-cloud-settings: Name of settings file containing credentials
for the cloud that packer will build on. (default: packer-cloud-env)
:packer-version: Version of packer to install / use in build. (default: 1.0.2)
Often the same as the branch. (default: master)
:submodule-recursive: Whether to checkout submodules recursively.
(default: true)
+ :submodule-timeout: Timeout (in minutes) for checkout operation.
+ (default: 10)
:gerrit_verify_triggers: Override Gerrit Triggers.
:gerrit_trigger_file_paths: Override file paths which can be used to