Update lf-info-yaml-verify 70/16370/5
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Tue, 30 Jul 2019 01:05:00 +0000 (18:05 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 31 Jul 2019 00:56:54 +0000 (17:56 -0700)
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.

Issue: RELENG-2242
Change-Id: Ie135c761d1401957be33c98634467967cc085ce2
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
docs/jjb/lf-ci-jobs.rst
info-schema [deleted file]
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

index bd477b9..987f88f 100644 (file)
@@ -536,7 +536,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
 
 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
 
 :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
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
 
 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
 
 
 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
     -y INFO.yaml
-
-rm -rf releng-global-jjb