Skip to content

Commit

Permalink
Remove BVT code
Browse files Browse the repository at this point in the history
We're not running build verification tests anymore, so cleanup this
code.
  • Loading branch information
farosas committed Feb 23, 2018
1 parent 92faaa9 commit d6f3021
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 545 deletions.
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,15 @@ by Jenkins Ansible playbooks, so you do not need to do it manually.

### Automatically setup Jenkins master and slave(s) using Ansible playbooks

There are three Ansible playbooks: one that sets up a Jenkins master node,
and two that set up Jenkins slave nodes, either for building or executing
Build Verification Tests. Read the
There are two Ansible playbooks: one that sets up a Jenkins master node
and another one that sets up a Jenkins slave node. Read the
[Ansible instructions](ansible/README.md) for details on how to execute
the playbooks.

If you wish to have a single system hosting the entire Jenkins instance, the
If you wish to have a single system hosting the entire Jenkins instance, both
playbooks can be executed in the same system. Execute first the Jenkins master
playbook, stop Jenkins service (systemctl stop jenkins) and then execute the
other playbooks.
Jenkins slave playbook.

Note: The Jenkins playbooks may fail due to network errors. If you see HTTP
request errors, try executing them again.
Expand Down Expand Up @@ -181,18 +180,6 @@ of the slave in IP_ADDRESS job parameter. The other job parameters values do not
need to be modified. You should have already executed the Jenkins slave playbook(s)
on those slaves.

##### Create BVT slave in Jenkins web UI

The Build Verification Tests (BVT) use [Avocado](https://avocado-framework.github.io/)
to execute tests on virtual machines. The tests require passwordless access to
sudo, so it is recommended that a separate machine is used forthat purpose. It
may be a virtual machine, the tests will then run in a nested virtualized
guest.

To create the slave node from the Jenkins UI, follow the same instructions
above, setting the IP_ADDRESS and, additionally, changing the NODE_LABEL to
"bvt_slave_label".

#### Create builds jobs

When the credentials are configured, execute the seed job at
Expand Down
9 changes: 0 additions & 9 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ artifacts to the configured remote server.
- Path to the SSH known keys for remote hosts, usually `~/.ssh/known_hosts`.
The local file is just copied to remote target.

- `bvt-host.yaml` playbook

- Paths to SSH private and public keys used to communicate between master
and slave nodes.
- Path to the SSH private key used to upload artifacts to the configured
remote server.
- Path to the SSH known keys for remote hosts, usually
`~/.ssh/known_hosts`. The local file is just copied to remote target.

Provide the data requested by the playbooks (e.g. Jenkins admin user name/password
and SSH keys locations) and wait for automatic setup to finish.

Expand Down
30 changes: 0 additions & 30 deletions ansible/bvt-host.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions ansible/hosts.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ host-os-jenkins-slave02.example.com

[baremetal-ctrl]
host-os-jenkins-slave04.example.com

[bvt-host]
host-os-bvt-host.example.com
10 changes: 0 additions & 10 deletions ansible/roles/avocado-repo/tasks/main.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions ansible/roles/avocado/defaults/main.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions ansible/roles/avocado/files/host-os-bvt.ini

This file was deleted.

11 changes: 0 additions & 11 deletions ansible/roles/avocado/handlers/main.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions ansible/roles/avocado/meta/main.yaml

This file was deleted.

127 changes: 0 additions & 127 deletions ansible/roles/avocado/tasks/main.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions ansible/roles/avocado/templates/avocado.conf.j2

This file was deleted.

46 changes: 0 additions & 46 deletions ansible/vars-bvt.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions pipeline/daily/stages.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -186,36 +186,6 @@ python host_os.py \
}
}

def runBVT() {
String PREVIOUS_YUM_REPO_FILE_URL =
"${RSYNC_URL_PREFIX}$params.UPLOAD_SERVER_PERIODIC_BUILDS_DIR_PATH/" +
"latest/hostos.repo"
String CURRENT_YUM_REPO_FILE_URL =
"${RSYNC_URL_PREFIX}$params.UPLOAD_SERVER_BUILDS_DIR_PATH/" +
"$buildStages.buildTimestamp/hostos.repo"

previousConfigParameter = ''
try {
utils.rsyncDownload(PREVIOUS_YUM_REPO_FILE_URL, 'previous_host_os.repo')
previousConfigParameter = '--previous-yum-config-file previous_host_os.repo'
} catch (hudson.AbortException exception) {
echo('Previous build not found, update test will be skipped.')
}

try {
utils.rsyncDownload(CURRENT_YUM_REPO_FILE_URL, 'current_host_os.repo')

sh """\
sudo host-os-bvt \
--current-yum-config-file current_host_os.repo \
$previousConfigParameter \
"""
} catch (Exception exception) {
echo('BVT execution failed')
currentBuild.result = 'UNSTABLE'
}
}

def commitToGitRepo() {
String GITHUB_BOT_HTTP_URL =
"ssh://git@github/$params.GITHUB_BOT_USER_NAME"
Expand Down
Loading

0 comments on commit d6f3021

Please sign in to comment.