From 18cbfd14f4bda85b84c059373a9bd24e56954395 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Fri, 7 Aug 2020 16:57:20 -0400 Subject: [PATCH] Migrate write-good hook to pre-commit 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 --- .coafile | 11 ---------- .pre-commit-config.yaml | 12 ++++++++++ CONTRIBUTING.markdown | 20 ++++++++--------- README.markdown | 4 ++-- docs/cloud-images.rst | 3 +-- docs/index.rst | 6 ----- docs/jenkins.rst | 20 ++++++++--------- docs/release-workflow.rst | 46 --------------------------------------- packer/README.markdown | 8 +++---- tox.ini | 13 +---------- 10 files changed, 39 insertions(+), 104 deletions(-) delete mode 100644 .coafile delete mode 100644 docs/release-workflow.rst diff --git a/.coafile b/.coafile deleted file mode 100644 index 7ec647770..000000000 --- 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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ff009625..f08ce2534 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CONTRIBUTING.markdown b/CONTRIBUTING.markdown index cdfd6a610..fea56a4d3 100644 --- a/CONTRIBUTING.markdown +++ b/CONTRIBUTING.markdown @@ -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 diff --git a/README.markdown b/README.markdown index a11c736fe..9cd49e3fd 100644 --- a/README.markdown +++ b/README.markdown @@ -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/ diff --git a/docs/cloud-images.rst b/docs/cloud-images.rst index a2ecf7bf8..0bd64ec51 100644 --- a/docs/cloud-images.rst +++ b/docs/cloud-images.rst @@ -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. diff --git a/docs/index.rst b/docs/index.rst index fbea4aed9..dfa1ce4db 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 diff --git a/docs/jenkins.rst b/docs/jenkins.rst index e8a0c1962..ef5e1462c 100644 --- a/docs/jenkins.rst +++ b/docs/jenkins.rst @@ -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 - true. - -Dsonar : This flag is passed in our Sonar job and is equivalent to the - Maven property - true. + -Dmerge : The Merge job sets this flag and is the same as setting the + Maven property true. + -Dsonar : The Sonar job sets this flag and is the same as setting the + Maven property true. .. _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 `. .. _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 index 864b6ce07..000000000 --- a/docs/release-workflow.rst +++ /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. diff --git a/packer/README.markdown b/packer/README.markdown index 95ed62f07..1c60d44f2 100644 --- a/packer/README.markdown +++ b/packer/README.markdown @@ -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 bf47e3e0e..9277b269b 100644 --- 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 -- 2.36.6