Merge "Self serve release docs" v0.40.0
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 31 Jul 2019 23:39:20 +0000 (23:39 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Wed, 31 Jul 2019 23:39:20 +0000 (23:39 +0000)
docs/jjb/lf-ci-jobs.rst
info-schema [deleted file]
jjb/lf-ci-jobs.yaml
releasenotes/notes/add-job-name-in-logs-9c993fa59310d9c7.yaml [new file with mode: 0644]
releasenotes/notes/consolidate-jjbini-078830f1a3a627c9.yaml [new file with mode: 0644]
releasenotes/notes/update-info-schema-eb973b5477c7a7a2.yaml [new file with mode: 0644]
schema/info-schema.yaml [new file with mode: 0644]
shell/info-file-validate.sh
shell/jjb-deploy-job.sh

index bd477b9..5c683b1 100644 (file)
@@ -64,13 +64,6 @@ lf-infra-jjbini
 
 Provides jenkins_jobs.ini configuration for Jenkins.
 
-lf-infra-jjbini-sandbox
------------------------
-
-Provides jenkins_jobs.ini configuration for Jenkins sandbox.
-
-.. todo:: This needs to be consolidated into lf-infra-jjbini when JJB 2.0 is available
-
 lf-packer-common
 ----------------
 
@@ -536,7 +529,7 @@ Info YAML Verify
 
 Info YAML Verify job validates that INFO.yaml file changes are kept isolated from
 other file changes. Verifies INFO.yaml files follow the schema defined in
-`global-jjb/info-schema`.
+`lfit/releng-global-jjb/schema/info-schema.yaml`.
 
 :Template Names:
     - {project-name}-info-yaml-verify
diff --git a/info-schema b/info-schema
deleted file mode 100644 (file)
index bb596c2..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-# SPDX-License-Identifier: EPL-1.0
-##############################################################################
-# Copyright (c) 2018 The Linux Foundation and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-##############################################################################
----
-$schema: 'http://json-schema.org/schema#'
-$id: 'https://github.com/lfit/releng-global-jjb/blob/master/info-schema'
-
-required:
-  - 'project'
-  - 'project_creation_date'
-  - 'project_category'
-  - 'lifecycle_state'
-  - 'project_lead'
-  - 'primary_contact'
-  - 'issue_tracking'
-  - 'mailing_list'
-  - 'realtime_discussion'
-  - 'repositories'
-  - 'committers'
-  - 'tsc'
-
-properties:
-  project:
-    type: 'string'
-  version:
-    type: 'string'
-  project_creation_date:
-    type: 'string'
-  project_category:
-    type: 'string'
-  lifecycle_state:
-    type: 'string'
-    enum: ['Incubation', 'Proposal', 'Mature', 'Core', 'Top Level', 'Archived', 'Null', 'Integration']
-  project_lead: &user_object
-    type: 'object'
-    properties:
-      name:
-        type: 'string'
-      email:
-        type: 'string'
-        format: 'email'
-      id:
-        type: 'string'
-      company:
-        type: 'string'
-      timezone:
-        type: 'string'
-        pattern: '([A-Z][a-z]*\s*)+\/([A-Za-z_-])+'
-    additionalProperties: false
-  primary_contact: *user_object
-  issue_tracking:
-    type: 'object'
-    properties:
-      type:
-        type: 'string'
-      url:
-        type: 'string'
-        format: 'uri'
-      key:
-        type: 'string'
-      required: ['type', 'url']
-  committers:
-    type: 'array'
-    items: *user_object
index a90424c..4d5dd2e 100644 (file)
             - file-id: jjbini
               target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
 
-- builder:
-    name: lf-infra-jjbini-sandbox
-    # TODO: Consolidate this into jjbini when JJB2.0 is available.
-    builders:
-      - config-file-provider:
-          files:
-            - file-id: jjbini-sandbox
-              target: "$HOME/.config/jenkins_jobs/jenkins_jobs.ini"
-
 - lf_packer: &lf_packer_common
     name: lf-packer-common
     # Provide configuration common in packer jobs.
     builders:
       - lf-pip-install:
           pip-packages: jenkins-job-builder
-      - lf-infra-jjbini-sandbox
+      - lf-infra-jjbini
       - shell: !include-raw-escape: ../shell/jjb-deploy-job.sh
 
     publishers:
diff --git a/releasenotes/notes/add-job-name-in-logs-9c993fa59310d9c7.yaml b/releasenotes/notes/add-job-name-in-logs-9c993fa59310d9c7.yaml
new file mode 100644 (file)
index 0000000..66536cd
--- /dev/null
@@ -0,0 +1,6 @@
+---
+fixes:
+  - |
+    There is no way on finding out the $JOB_NAME pushed to sandbox with the
+    jjb-deploy command in the logs. The change outputs the $JOB_NAME to the
+    logs, which is useful for debugging purposes.
diff --git a/releasenotes/notes/consolidate-jjbini-078830f1a3a627c9.yaml b/releasenotes/notes/consolidate-jjbini-078830f1a3a627c9.yaml
new file mode 100644 (file)
index 0000000..38b5b9d
--- /dev/null
@@ -0,0 +1,6 @@
+---
+upgrade:
+  - |
+    Consolidated lf-infra-jjbini macros with JJB 2.0. This requires renaming
+    any Jenkins managed files "jjbini-sandbox" to "jjbini" to switch to the
+    format supported in JJB > 2.0.
diff --git a/releasenotes/notes/update-info-schema-eb973b5477c7a7a2.yaml b/releasenotes/notes/update-info-schema-eb973b5477c7a7a2.yaml
new file mode 100644 (file)
index 0000000..39f613a
--- /dev/null
@@ -0,0 +1,8 @@
+---
+fixes:
+  - |
+    Move info-schema to schema/info-schema.yaml to keep schemas
+    consistency.
+  - |
+    Download only needed files for lf-info-yaml-verify
+    rather than cloning the entire repo.
diff --git a/schema/info-schema.yaml b/schema/info-schema.yaml
new file mode 100644 (file)
index 0000000..55f99b5
--- /dev/null
@@ -0,0 +1,80 @@
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+---
+$schema: "http://json-schema.org/schema#"
+$id: "https://github.com/lfit/releng-global-jjb/blob/master/schema/info-schema.yaml"
+
+required:
+  - "project"
+  - "project_creation_date"
+  - "project_category"
+  - "lifecycle_state"
+  - "project_lead"
+  - "primary_contact"
+  - "issue_tracking"
+  - "mailing_list"
+  - "realtime_discussion"
+  - "repositories"
+  - "committers"
+  - "tsc"
+
+properties:
+  project:
+    type: "string"
+  version:
+    type: "string"
+  project_creation_date:
+    type: "string"
+  project_category:
+    type: "string"
+  lifecycle_state:
+    type: "string"
+    enum:
+      [
+        "Incubation",
+        "Proposal",
+        "Mature",
+        "Core",
+        "Top Level",
+        "Archived",
+        "Null",
+        "Integration",
+      ]
+  project_lead: &user_object
+    type: "object"
+    properties:
+      name:
+        type: "string"
+      email:
+        type: "string"
+        format: "email"
+      id:
+        type: "string"
+      company:
+        type: "string"
+      timezone:
+        type: "string"
+        pattern: '([A-Z][a-z]*\s*)+\/([A-Za-z_-])+'
+    additionalProperties: false
+  primary_contact: *user_object
+  issue_tracking:
+    type: "object"
+    properties:
+      type:
+        type: "string"
+      url:
+        type: "string"
+        format: "uri"
+      key:
+        type: "string"
+      required: ["type", "url"]
+  committers:
+    type: "array"
+    items: *user_object
index 13c27df..f0c47cb 100755 (executable)
@@ -17,13 +17,12 @@ virtualenv --quiet "/tmp/v/info"
 source "/tmp/v/info/bin/activate"
 pip install PyYAML jsonschema rfc3987 yamllint
 
-# Cloning global-jjb to get access to needed scripts
-git clone https://github.com/lfit/releng-global-jjb.git
+# Download info-schema.yaml and yaml-verfy-schema.py
+wget -q https://raw.githubusercontent.com/lfit/releng-global-jjb/master/schema/info-schema.yaml \
+https://raw.githubusercontent.com/lfit/releng-global-jjb/master/yaml-verify-schema.py
 
 yamllint INFO.yaml
 
-python releng-global-jjb/yaml-verify-schema.py \
-    -s releng-global-jjb/info-schema \
+python yaml-verify-schema.py \
+    -s info-schema.yaml \
     -y INFO.yaml
-
-rm -rf releng-global-jjb
index 240c1fa..5efb9f4 100644 (file)
@@ -35,4 +35,5 @@ if [ -z "${JOB_NAME//\*/}" ]; then
     exit 1
 fi
 
-jenkins-jobs update --jobs-only --recursive --workers 4 jjb/ "$JOB_NAME"
+echo "Deploying Job $JOB_NAME to sandbox"
+jenkins-jobs -s sandbox update --jobs-only --recursive --workers 4 jjb/ "$JOB_NAME"