Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Document the testing done in the infra repo #3291

Merged
merged 7 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/Testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Testing for Infrastructure Tools

This document will include all of the ways in which testing is done in the infrastructure repository.

## Vagrant Playbook Check

The Vagrant Playbook Check (VPC) job is used to test changes made to the [windows and linux playbooks](https://github.com/adoptium/infrastructure/tree/master/ansible/playbooks).
Haroon-Khel marked this conversation as resolved.
Show resolved Hide resolved

The job is built in our [Jenkins server](https://ci.adoptium.net/job/VagrantPlaybookCheck/). The job runs a user's pull request onto the supported operating systems using Vagrant virtual machines. The vagrant files for the supported operating systems can be found [here](https://github.com/adoptium/infrastructure/tree/master/ansible/vagrant).
Haroon-Khel marked this conversation as resolved.
Show resolved Hide resolved

Currently, the supported x86-64 systems are:
- Windows 2012 and 2022
- Debian 8 and 10
- Ubuntu 16.04, 18.04, 20.04 and 22.04
- CentOS 6, 7 and 8
- Solaris 10

Haroon-Khel marked this conversation as resolved.
Show resolved Hide resolved
## Qemu Playbook Check

The QEMU Playbook Check (QPC) job is similar to the VPC job except it is not limited to x86-64 virtual machines.

It is built in our [Jenkins server](https://ci.adoptium.net/job/QEMUPlaybookCheck/). The job itself runs [this script](https://github.com/adoptium/infrastructure/blob/master/ansible/pbTestScripts/qemuPlaybookCheck.sh).

Currently, the supported platorms are:
- Ubuntu 18.04 on ppc64le, aarch64 and s390x
- Debian 11 on risc-v
Haroon-Khel marked this conversation as resolved.
Show resolved Hide resolved
- Debian 10 on aarch64
- Debian 8 on arm32

## Github workflows

These jobs run automatically when a pull request is submitted. The files for these jobs can be found [here](https://github.com/adoptium/infrastructure/tree/master/.github/workflows).

### Platforms

If a pull request contains changes to the playbooks, this workflow will be triggered automatically. It will execute the playbook changes on the supported platforms:
- [Solaris 10](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_vagrant.yml)
- [MacOS 11](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_mac.yml)
- [Windows 2019 and 2022](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_wsl.yml)

### Docker Build Images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth noting that these two actions perform a subset of the required build platforms which are pushed from jenkins and this is covered in https://github.com/adoptium/infrastructure/blob/master/FAQ.md#what-about-the-builds-that-use-the-dockerbuild-tag


This workflow job executes playbook changes inside a [CentOS 6](https://github.com/adoptium/infrastructure/blob/master/ansible/docker/Dockerfile.CentOS6) and [Alpine 3](https://github.com/adoptium/infrastructure/blob/master/ansible/docker/Dockerfile.Alpine3) docker container which it builds during the job.

The workflow file can be found [here](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build.yml).

### QEMU Playbook Check
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a duplciate of an earlier section but with different OS versions

Copy link
Contributor Author

@Haroon-Khel Haroon-Khel Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is the github workflow/action https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_qemu.yml. The earlier one is the jenkins job. I think both should be included in the docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. Perhaps we should have a 'jenkins jobs' section like the Github one to have them categories appropriately?


Similar to the [job that runs in our Jenkins server](https://github.com/adoptium/infrastructure/blob/master/docs/Testing.md#qemu-playbook-check) but this job runs in a github workflow.

The supported platforms are:
- Ubuntu 18.04 on aarch64, ppc64le and s390x
- Ubuntu 20.04 on risc-v
Haroon-Khel marked this conversation as resolved.
Show resolved Hide resolved
- Debian 10 on aarch64

The workflow file can be found [here](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/build_qemu.yml).

### Docker Static Checks

This github workflow is triggered when changes are made to the [dockerfiles](https://github.com/adoptium/infrastructure/tree/master/ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles) responsible for building our [Static Docker containers](https://github.com/adoptium/infrastructure/blob/master/FAQ.md#dockerstatic-test-systems).

If a pull request contains changes to any of the dockerfiles, the workflow will attempt to build the docker containers. It will pass if the containers build without error.

The file for this workflow can be found [here](https://github.com/adoptium/infrastructure/blob/master/.github/workflows/check_dockerstatic.yml).

## AWX

Though primarily the infrastructure team uses AWX to execute the playbooks onto our [build and test machines](https://github.com/adoptium/infrastructure/blob/master/ansible/inventory.yml) as a means of [patching](https://github.com/adoptium/infrastructure/blob/master/FAQ.md#patching), we also use AWX to test changes made to playbooks by executing the changes onto any of the infrastructure machines.

Our AWX server is hosted [here](https://awx2.adoptopenjdk.net/#/login).
Loading