Migrate write-good hook to pre-commit 63/91963/2
authorThanh Ha <zxiiro@gmail.com>
Fri, 7 Aug 2020 20:57:20 +0000 (16:57 -0400)
committerThanh Ha <zxiiro@gmail.com>
Sat, 8 Aug 2020 13:01:04 +0000 (09:01 -0400)
This migrates write-good hook over to pre-commit which is the final
hook needed to remove our coala dependency.

Also resolve write-good suggestions on files except jenkins.rst (it is
currently too large a task for my time so place an exception there until
we have cycles to take care of it).

Ref: https://jira.linuxfoundation.org/browse/RELENG-2642
Change-Id: I26b5a416d93ea69cbf319e14c138e971bcb4e6af
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
.coafile [deleted file]
.pre-commit-config.yaml
CONTRIBUTING.markdown
README.markdown
docs/cloud-images.rst
docs/index.rst
docs/jenkins.rst
docs/release-workflow.rst [deleted file]
packer/README.markdown
tox.ini

diff --git a/.coafile b/.coafile
deleted file mode 100644 (file)
index 7ec6477..0000000
--- a/.coafile
+++ /dev/null
@@ -1,11 +0,0 @@
-[all]
-ignore = .**
-
-[all.Documentation]
-bears = WriteGoodLintBear
-files = **.markdown,
-    **.md,
-    **.rst
-allow_so_beginning = False
-allow_there_is = False
-allow_cliche_phrases = False
index 7ff009625209fc5c8fd6108bdf87910f7020f754..f08ce2534cef9e31611b75b8ea53ac2f1f0d7488 100644 (file)
@@ -28,3 +28,15 @@ repos:
     rev: v1.23.0
     hooks:
       - id: yamllint
+
+  - repo: local
+    hooks:
+      # TODO: Switch to upstream hook when https://github.com/btford/write-good/pull/119 is merged.
+      - id: write-good
+        name: write-good
+        description: Check docs for English prose with write-good
+        entry: write-good
+        language: node
+        files: "\\.(rst|md|markdown|mdown|mkdn)$"
+        additional_dependencies: ["write-good"]
+        exclude: docs/jenkins.rst
index cdfd6a61021b2138f6b38519ff6726c35dba0c3d..fea56a4d3d8f56ec765374f631af8ab49028e779 100644 (file)
@@ -1,25 +1,25 @@
 # Contributing to releng/builder
 
 Thank you for your interest in the OpenDaylight project. This is a project repo
-for one of many [OpenDaylight projects][1].
+for one of the [OpenDaylight projects][1].
 
 ## How to contribute
 
-Contributions to this project are welcome. This project uses [Gerrit][2] as our
-code review system and all contributions should be directed to there. Please
-refer to our documentation on [Submitting patches][3] for details on how to
-submit code to this project.
+Contributions to this project are welcome. This project uses [Gerrit][2] as the
+code review system, send all contributions to there. Please refer to the
+documentation on [Submitting patches][3] for details on how to submit code to
+this project.
 
 ## Reporting a Bug
 
-OpenDaylight uses [Bugzilla][5] as our issue tracking system and any feature
-requests or bugs should be filed there under the relevant subproject. This
-project is listed under the releng subproject.
+OpenDaylight uses [JIRA][5] as the issue tracking system and any feature
+requests or bugs. Create an issue under the relevant subproject, this
+project is the RELENG subproject.
 
 ## Communication channels
 
-OpenDaylight uses several forms of public communication channels for project
-discussions and planning. Details on how to communicate can be found on our
+OpenDaylight uses public communication channels for project discussions and
+planning. Details on how to communicate is available on our
 [Communications wiki][5].
 
 [1]: https://wiki.opendaylight.org/view/Project_list
index a11c736feed167eb871afaed356c0f77d57b9e12..9cd49e3fd7094d5bca7259f9e4d2111297d6df59 100644 (file)
@@ -1,3 +1,3 @@
-Documentation for Releng/Builder can be found on our [readthedocs][1] site.
+Documentation for Releng/Builder is available on our [readthedocs][1] site.
 
-[1]: http://docs.opendaylight.org/en/latest/submodules/releng/builder/docs/index.html
+[1]: https://docs.opendaylight.org/projects/releng-builder/en/latest/
index a2ecf7bf832ccf4a9af8a38db7f69f8a6f99aa07..0bd64ec51b54e79059255a07e0041970fe988d19 100644 (file)
@@ -1,2 +1 @@
-Following are the list of published images available to be used with Jenkins jobs.
-
+Following are the list of published images available to Jenkins jobs.
index fbea4aed9be05484687ae5b4387a308f79be15c4..dfa1ce4db6baaacf94681081c289bff5202e8625 100644 (file)
@@ -1,8 +1,3 @@
-.. OpenDaylight RelEng/Builder documentation master file, created by
-   sphinx-quickstart on Thu May  5 10:17:10 2016.
-   You can adapt this file completely to your liking, but it should at least
-   contain the root `toctree` directive.
-
 .. _odl-infra:
 
 Infrastructure Guide
@@ -16,5 +11,4 @@ Contents:
    :maxdepth: 2
 
    jenkins
-   release-workflow
    signing
index e8a0c1962de7d60a661f0ac4334d9953beb9654f..ef5e1462cdfc26b99a738708eb934b5658d8784b 100644 (file)
@@ -821,19 +821,17 @@ Maven Properties
 ----------------
 
 We provide a properties which your job can take advantage of if you want to do
-something different depending on the job type that is run. If you create a
-profile that activates on a property listed blow. The JJB templated jobs will
-be able to activate the profile during the build to run any custom code you
-wish to run in your project.
+trigger a different configuration depending on job type. You can create a
+profile that activates on a property listed below. The JJB templated jobs will
+activate the profile during the build to run any custom code configuration you
+wish to run for this job type.
 
 .. code-block:: bash
 
-    -Dmerge   : This flag is passed in our Merge job and is equivalent to the
-                Maven property
-                <merge>true</merge>.
-    -Dsonar   : This flag is passed in our Sonar job and is equivalent to the
-                Maven property
-                <sonar>true</sonar>.
+    -Dmerge   : The Merge job sets this flag and is the same as setting the
+                Maven property <merge>true</merge>.
+    -Dsonar   : The Sonar job sets this flag and is the same as setting the
+                Maven property <sonar>true</sonar>.
 
 .. _odl-jenkins-sandbox:
 
@@ -842,7 +840,7 @@ Jenkins Sandbox
 
 URL: https://jenkins.opendaylight.org/sandbox
 
-Jenkins Sandbox documentation can be found in the
+Jenkins Sandbox documentation is available in the
 :doc:`LF Jenkins Sandbox Guide <lfdocs:jenkins-sandbox>`.
 
 .. _example-jenkins.ini: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jenkins.ini.example
diff --git a/docs/release-workflow.rst b/docs/release-workflow.rst
deleted file mode 100644 (file)
index 864b6ce..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-.. _odl-release-workflow:
-
-Release Workflow
-================
-
-This page documents the workflow for releasing for projects that are not built
-and released via the Autorelease project.
-
-Sections:
-
-.. contents::
-   :depth: 3
-   :local:
-
-Workflow
---------
-
-OpenDaylight uses Nexus as it's artifact repository for releasing artifacts to
-the world. The workflow involves using Nexus to produce a staging repository
-which can be tested and reviewed before being approved to copy to the final
-destination opendaylight.release repo. The workflow in general is as follows:
-
-1. Project create release tag and push to Gerrit
-2. Project will contact helpdesk@opendaylight.org with project name and build
-   tag to produce a release candidate / staging repo
-3. Helpdesk will run a build and notify project of staging repo location
-4. Project tests staging repo and notifies Helpdesk with go ahead to release
-5. Helpdesk clicks Release repo button in Nexus
-6. (optional) Helpdesk runs Jenkins job to push update-site.zip to p2repos
-   sites repo
-
-Step 6 is only necessary for Eclipse projects that need to additionally deploy
-an update site to a webserver.
-
-Release Job
------------
-
-There is a JJB template release job which should be used for a project if the
-project needs to produce a staging repo for release. The supported Job types
-are listed below, use the one relevant to your project.
-
-**Maven|Java** {name}-release-java -- this job type will produce a staging repo
-in Nexus for Maven projects.
-
-**P2 Publisher** {name}-publish-p2repo -- this job type is useful for projects
-that produce a p2 repo that needs to be published to a special URL.
index 95ed62f07c610197cc17b45674b391cc13f76924..1c60d44f221d3a08fbb1c77888a67a3577d67a74 100644 (file)
@@ -9,17 +9,17 @@ We build OpenDaylight's CI images via Packer.
 
 You'll need to [install Packer][2], of course.
 
-OpenDaylight's Packer configuration is divided into build-specific variables,
-output-specific templates and a set of shared provisioning scripts. To do a
+OpenDaylight's Packer configuration separates build-specific variables,
+output-specific templates, and a set of shared provisioning scripts. To do a
 specific build, combine the template for the desired output artifact type with
-a variable file. To build a new java-builder instance the following would be done:
+a variable file. To build a new java-builder instance run this command:
 
 ```
 packer build -var-file=vars/cloud-env.json -var-file=vars/centos.json templates/java-builder.json
 ```
 
 **NOTE:** vars/cloud-env.json is a gitignored file as it contains private
-information. A vars/cloud-env.json.example file is provided as an example.
+information. The vars/cloud-env.json.example file is available as an example.
 
 This would build bootable image in two different OpenStack clouds. In specific,
 Rackspace's Public cloud and a private OpenStack cloud.
diff --git a/tox.ini b/tox.ini
index bf47e3e0e3f52880c82deef646e48781f9de6af3..9277b269b97f4acf535415d1cc08b1db19baafb7 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,19 +1,8 @@
 [tox]
 minversion = 1.6
-envlist = coala,docs,jjb-version,pre-commit,prefix,robot
+envlist = docs,jjb-version,pre-commit,prefix,robot
 skipsdist = true
 
-[testenv:coala]
-basepython = python3
-deps =
-    coala==0.11
-    coala-bears==0.11
-    nodeenv
-commands =
-    nodeenv -p
-    npm install --global write-good
-    coala --non-interactive
-
 [testenv:docs]
 deps = -rdocs/requirements.txt
 commands = sphinx-build -b html -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html