Add pypi prefix to example filename in layout
[releng/global-jjb.git] / docs / jjb / lf-release-jobs.rst
index e124f8c..7ab1681 100644 (file)
@@ -179,16 +179,17 @@ The JSON schema for a container release file appears below.
 PyPI Release Files
 ------------------
 
-An example of a PyPI release file appears below.
+An example of a PyPI release file appears below. Name of the release file must
+start with "pypi". For example releases/pypi-1.0.0-mypackage.yaml
 
 .. code-block:: none
 
-    $ cat releases/pypi-release.yaml
+    $ cat releases/pypi-1.0.0-mypackage.yaml
     ---
-    distribution_type: pypi
     pypi_project: mypackage
     python_version: '3.4'
     version: 1.0.0
+    log_dir: example-project-pypi-merge-master/17
 
 
 The following parameters must appear in the PyPI release yaml file.
@@ -198,7 +199,6 @@ packages.
 
 :Required Parameters:
 
-    :distribution_type: Must be "pypi".
     :log_dir: The suffix of the logs URL reported on completion by the
         Jenkins merge job that created and pushed the distribution files
         to the staging repository.  For example, use value
@@ -208,7 +208,7 @@ packages.
         release repositories, for example "mypackage".
     :python_version: The Python interpreter version to use for pip
         "Requires-Python" compatibility checks, for example '3', '3.7' or 3.7.4.
-        Valid decimal values such as 3 and 3.7 must be quoted.
+        Put valid decimal values such as 3 or 3.7 in quotes to pass schema validation.
     :version: The semantic version string used for the package in the
         setup.py file.
 
@@ -221,15 +221,12 @@ The JSON schema for a PyPI release file appears below.
     $id: "https://github.com/lfit/releng-global-jjb/blob/master/release-pypi-schema.yaml"
 
     required:
-      - "distribution_type"
       - "log_dir"
       - "pypi_project"
       - "python_version"
       - "version"
 
     properties:
-      distribution_type:
-        type: "string"
       log_dir:
         type: "string"
       pypi_project:
@@ -240,6 +237,52 @@ The JSON schema for a PyPI release file appears below.
         type: "string"
 
 
+PackageCloud Release Files
+--------------------------
+
+An example of a PackageCloud release file appears below. Name of release file
+must start with "packagecloud". For example releases/packagecloud-1.6-tree.yaml
+
+.. code-block:: none
+
+    $ cat releases/packagecloud-1.6-tree.yaml
+    ---
+    package_name:
+        - name: tree-1.6.0-10.el7.x86_64.rpm
+        - name: test.rpm
+
+The following parameters must appear in the PackageCloud release yaml file.
+These are not part of the Jenkins job definition to allow independent
+self-release of a package maintained in a git repository with other
+packages.
+
+:Required Parameters:
+
+    :package_name: A list of names that specify the packages to promote.
+        (Found in jenkins console log when using gem to push package eg.
+        "Pushing /path/of/package/name-of-package.rpm... success!"
+        OR using rest api call to query packagecloud.io repo
+        "curl https://packagecloud.io/api/v1/repos/test_user/test_repo/search?q=
+        | yq -r .[].filename"
+
+The JSON schema for a PackageCloud release file appears below.
+
+.. code-block:: none
+
+    ---
+    $schema: "http://json-schema.org/schema#"
+    $id: "https://github.com/lfit/releng-global-jjb/blob/master/packagecloud-release-schema"
+
+    required:
+      - "package_name"
+
+    properties:
+      package_name:
+        type: "array"
+        properties:
+          name:
+            type: "string"
+
 Jenkins Jobs
 ------------
 
@@ -347,7 +390,7 @@ Publishes a Python package on merge of a patch set with a release yaml
 file. Checks the format of the version string, downloads the package
 artifacts from the PyPI staging repository, uploads the package
 artifacts to the PyPI release repository, tags the git repository,
-signs the tag and pushes the tag to the git server. The release verify
+signs the tag and pushes the tag to the git server. The release merge
 template accepts neither a branch nor a stream parameter.
 
 :Template Names:
@@ -378,6 +421,12 @@ template accepts neither a branch nor a stream parameter.
         should be the repository pypy.org. (default: pypi)
     :use-release-file: Whether to use the release file. (default: true)
 
+    :gerrit_trigger_file_paths: Override file paths filter which checks which
+        file modifications will trigger a build.
+        **default**::
+
+            - compare-type: REG_EXP
+              pattern: '(releases\/pypi.*\.yaml|\.releases\/pypi.*\.yaml)'
 
 PyPI Release Verify
 ~~~~~~~~~~~~~~~~~~~
@@ -416,6 +465,77 @@ verify template accepts neither a branch nor a stream parameter.
         should be the repository pypy.org (default: pypi)
     :use-release-file: Whether to use the release file. (default: true)
 
+    :gerrit_trigger_file_paths: Override file paths filter which checks which
+        file modifications will trigger a build.
+        **default**::
+
+            - compare-type: REG_EXP
+              pattern: '(releases\/pypi.*\.yaml|\.releases\/pypi.*\.yaml)'
+
+PackageCloud Release Verify
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This template supports PackageCloud release jobs.
+
+:Template Name: {project-name}-packagecloud-release-verify
+
+:Comment Trigger: recheck|reverify
+
+:Required Parameters:
+
+    :build-node: The node to run build on.
+    :jenkins-ssh-credential: Credential to use for SSH. (Generally set
+        in defaults.yaml)
+    :project: Git repository name
+    :project-name: Jenkins job name prefix
+
+:Optional Parameters:
+
+    :build-days-to-keep: Days to keep build logs in Jenkins. (default: 7)
+    :build-node: The node to run build on.
+    :build-timeout: Timeout in minutes before aborting build. (default: 15)
+    :gerrit-skip-vote: Skip voting for this job. (default: false)
+    :git-url: URL clone project from. (default: $GIT_URL/$PROJECT)
+
+    :gerrit_verify_triggers: Override Gerrit Triggers.
+    :gerrit_trigger_file_paths: Override file paths filter which checks which
+        file modifications will trigger a build.
+        **default**::
+
+            - compare-type: REG_EXP
+              pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'
+
+
+PackageCloud Release Merge
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This template supports PackageCloud release jobs.
+
+:template name: {project-name}-packagecloud-release-merge
+
+:comment trigger: remerge
+
+:required parameters:
+
+    :build-node: the node to run build on.
+    :jenkins-ssh-release-credential: credential to use for ssh. (generally set
+        in defaults.yaml)
+    :project: git repository name
+    :project-name: jenkins job name prefix
+
+:optional parameters:
+
+    :build-days-to-keep: days to keep build logs in jenkins. (default: 7)
+    :build-timeout: timeout in minutes before aborting build. (default: 15)
+
+    :gerrit_merge_triggers: override gerrit triggers.
+    :gerrit_trigger_file_paths: override file paths filter which checks which
+        file modifications will trigger a build.
+        **default**::
+
+            - compare-type: reg_exp
+              pattern: '(releases\/packagecloud.*\.yaml|\.releases\/packagecloud.*\.yaml)'
+
 
 Setup for LFID, Nexus, Jenkins and Gerrit
 -----------------------------------------