Skip to content

Commit

Permalink
Merge pull request #408 from openstack-k8s-operators/workflow/spellcheck
Browse files Browse the repository at this point in the history
Get spellcheck workflow
  • Loading branch information
openshift-merge-robot authored Jul 27, 2023
2 parents bd4f438 + 29262ba commit b772e2c
Show file tree
Hide file tree
Showing 10 changed files with 301 additions and 10 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pyspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# This is workflow for spell checking using PySpelling lib (https://pypi.org/project/pyspelling/)
name: Spellcheck
# Controls when the action will run.
on:
pull_request:
branches:
- main
paths:
- '**.md'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Spellcheck
- uses: actions/checkout@v2
- uses: igsekor/pyspelling-any@v0.0.2
name: Spellcheck
14 changes: 14 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
matrix:
- name: Doc content
aspell:
lang: en
ignore-case: true
suggest: true
sug-typo-analysis: true
sources:
- ./**/*.md
pipelines:
- pyspelling.filters.markdown:
dictionary:
wordlists:
- docs/dictionary/en-custom.txt
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Run the following command to get your new role ready:
$ make create_new_role ROLE_NAME=my_wonderful_role
```

### Consuming install_yamls varibles
### Consuming install_yamls variables
CI Framework sets a couple of facts that are useful enough to mention, the
`cifmw_install_yamls_vars`, that contains all the install_yamls variables
that should be passed to any install_yamls target, and the `cifmw_install_yamls_default`,
Expand All @@ -28,8 +28,8 @@ Here is an example, based on a common use-case, on how to use those variables
```YAML
# Fetch openstackdataplane resources from the default namespace declared in install_yamls
# Makefile. If the NAMESPACE has been overidden by cifmw_install_yamls_vars this variable
# already points to the overriden value.
# Makefile. If the NAMESPACE has been overridden by cifmw_install_yamls_vars this variable
# already points to the overridden value.
- name: Get info about dataplane node
environment:
PATH: "{{ cifmw_path }}"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![CodeQL](https://github.com/openstack-k8s-operators/ci-framework/actions/workflows/codeql.yml/badge.svg)](https://github.com/openstack-k8s-operators/ci-framework/actions/workflows/codeql.yml)

## Documentation
All the documentation can be checked on [ReadTheDoc](https://ci-framework.readthedocs.io/en/latest/).
All the documentation can be checked on [ReadTheDocs](https://ci-framework.readthedocs.io/en/latest/).

## License
Copyright 2023.
Expand Down
2 changes: 1 addition & 1 deletion ci_framework/roles/libvirt_manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Used for checking if:
* `cifmw_libvirt_manager_user`: (String) User used for libvirt. Default: the one in the environment variable `USER`.
* `cifmw_libvirt_manager_images_url`: (String) Location basedir for the image URI. Defaults to `https://cloud.centos.org/centos/9-stream/x86_64/images`.
* `cifmw_libvirt_manager_configuration`: (Dict) Structure describing the libvirt layout (networking and VMs).
* `cifmw_libvirt_manager_crc_pool`: (String) CRC pool machin location. Defaults to `cifmw_crc_pool` which defaults to `~/.crc/machines/crc`.
* `cifmw_libvirt_manager_crc_pool`: (String) CRC pool machine location. Defaults to `cifmw_crc_pool` which defaults to `~/.crc/machines/crc`.
* `cifmw_libvirt_manager_installyamls`: (String) install_yamls repository location. Defaults to `cifmw_installyamls_repos` which defaults to `../..`
* `cifmw_libvirt_manager_dryrun`: (Boolean) Toggle ci_make `dry_run` parameter. Defaults to `false`.
* `cifmw_libvirt_manager_compute_amount`: (Integer) State the amount of computes you want. Defaults to `1`.
Expand Down
2 changes: 1 addition & 1 deletion ci_framework/roles/openshift_login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ No privilege escalation needed.
include_role:
name: openshift_login
vars:
# API infered from the given kubeconfig
# API inferred from the given kubeconfig
cifmw_openshift_login_kubeconfig: "/home/zuul/.crc/machines/crc/kubeconfig"
cifmw_openshift_login_user: "kubeadmin"
cifmw_openshift_login_password: "12345678"
Expand Down
2 changes: 1 addition & 1 deletion ci_framework/roles/polarion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Role to setup jump tool and upload XML test results to Polarion.
* `cifmw_polarion_jump_result_dir`: (String) Test results directory. Defaults to `~/ci-framework-data/tests/tempest/`.
* `cifmw_polarion_jump_repo_url`: (String) URL of jump repository.
* `cifmw_polarion_test_id`: (String) A test-id provided by Polarion test case.
* `cifmw_polarion_update_testcases`: (Boolean) A value of True/False to update the testcase.
* `cifmw_polarion_update_testcases`: (Boolean) A value of True/False to update the testcases.
* `cifmw_polarion_jump_extra_vars`: (String) A list of extra_vars that are being passed to the jump script. Defaults to empty.

## Examples
Expand Down
4 changes: 2 additions & 2 deletions ci_framework/roles/run_hook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In such a case, the following data can be provided to the hook:
* `creates`: (String) Refer to the `ansible.builtin.command` "creates" parameter. Defaults to `omit`.
* `inventory`: (String) Refer to the `--inventory` option for `ansible-playbook`. Defaults to `inventory_file`.
* `name`: (String) Describe the hook.
* `source`: (String) Source of the playbook. If it's a filename, the playbook is expected in `ci_framwork/hooks/playbooks`. It can be an absolute path.
* `source`: (String) Source of the playbook. If it's a filename, the playbook is expected in `ci_framework/hooks/playbooks`. It can be an absolute path.
* `type`: (String) Type of the hook. In this case, set it to `playbook`.
* `extra_vars`: (Dict) Structure listing the extra variables you want to pass down

Expand Down Expand Up @@ -58,7 +58,7 @@ pre_deploy:
### CRD
In such a case, the following data can be provided to the hook:
* `type`: (String) Type of the hook. In this case, set it to `crd`.
* `source`: (String) Source of the CRD. If it's a filename, the CRD is expected in `ci_framwork/hooks/crds`. It can be an absolute path.
* `source`: (String) Source of the CRD. If it's a filename, the CRD is expected in `ci_framework/hooks/crds`. It can be an absolute path.
* `host`: (String) Cluster API endpoint. Defaults to `https://api.crc.testing:6443`.
* `username`: (String) Username for authentication against the cluster. Defaults to `kubeadmin`.
* `password`: (String) Password for authentication against the cluster. Defaults to `12345678`.
Expand Down
233 changes: 233 additions & 0 deletions docs/dictionary/en-custom.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
abcdefghij
ansible
ansibleee
apiversion
apivips
args
auth
authfile
awk
baremetal
basedir
basedomain
baseimg
baseurl
bashrc
bmaas
bmc
bmh
bmo
bool
boostrap
bootmacaddress
bootmode
buildah
buildpkgs
cacheable
cci
ccitredhat
ceilometer
centos
ceph
cfg
chdir
ci
cidr
cifmw
cli
clusterimageset
clusterpool
cmd
codeql
conf
config
containerfile
controlplane
cpus
cr
crashloopbackoff
crc
crd
crds
creds
cri
crio
ctlplane
ctx
dataplane
delorean
deps
dest
dev
devsetup
dfb
dfg
dhcp
dib
dir
disablecertificateverification
distro
dlrn
dns
dnsmasq
dockerfile
dryrun
ecdsa
edploy
edpm
eno
env
envfile
eth
favorit
fci
fedoraproject
fil
fsid
fultonj
genericcloud
gerrit
githooks
github
golang
gowork
groupinstall
hostkey
hostname
https
idrac
iface
img
ingressvips
installyamls
ipi
ips
ipv
jgvg
jmespath
jq
json
keypair
kni
kube
kubeadmin
kubeconfig
kubernetes
kustomization
kustomize
kustomized
kvm
ldp
libguestfs
libvirt
libvirtd
localhost
machinenetwork
makefile
makefiles
manpage
mgmt
mins
minsizegigabytes
modprobe
myorg
mytest
namespace
namespaces
networkconfig
networktype
nodeps
nodeset
noop
nopasswd
oc
ocp
openrc
openshift
openshiftsdn
openssl
openstack
openstackdataplane
opn
os
param
params
passwd
pki
podified
podman
polarion
polkit
pre
projectquay
provisioner
provisioningdhcprange
provisioningnetwork
provisioningnetworkcidr
provisionserver
pullsecret
py
pyspelling
qcow
qemu
quickstart
rabbitmq
rdo
rdoinfo
rdoproject
readme
readmes
readthedocs
redhat
repo
repos
rhel
rhol
rootdevicehints
rpms
rpmss
rsa
runtime
sha
specificities
src
sshkey
str
subnet
sudo
sudoers
svg
svm
tcib
testcases
timestamper
tls
tmp
todo
txt
uefi
unclaim
undefine
unittest
uri
usr
uuid
vcpus
venv
virsh
virt
virthosts
virtualized
visudo
vm
vms
vmx
vnc
wget
xargs
xdg
xz
yaml
yamls
yml
zuul
23 changes: 22 additions & 1 deletion docs/source/internals/02_testing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# Testing

Right now we are using 2 different CI systems in the CI Framework project:
Right now we are using 3 different CI systems in the CI Framework project:

- Github workflows
- Zuul CI
- Prow CI

The goal was to unify the tests in a single CI system but since we can't have privilege escalation using Prow CI, the team has decided to use Zuul CI to execute tests under each ansible role.

## Github workflow
A series of Github workflows take place in the pull request checks:

- Spellchecking using pySpelling
- Ensure commit message has a (checked) checklist
- CodeQL (actually a scheduled run)

### Spellchecking
We're using pySpelling, a python wrapper around aspell. You can add custom words
in the `docs/dictionary/en-custom.txt` file. In order to keep it tidy and
avoid duplication, please do as follow:
```Bash
$ pyspelling -c .spellcheck.yml
# Recover the list of words, paste them in a temporary file
$ cat docs/dictionary/en-custom.txt >> your_temporary_file
$ cat temporary_file | tr '[:upper:]' '[:lower:]' | sort -u > en-custom.txt
```
That way, you ensure that only unique, lower-case words are added to the list.


## Prow CI

All the jobs are being configured through the [openshift/release](https://github.com/openshift/release/) project.
Expand Down

0 comments on commit b772e2c

Please sign in to comment.