tripleo-ipa/scripts/run-local-test
Lance Bragstad 855218ba52 Initialize repo and integrate zuul
This patch:

 - adds a basic skeleton role for tripleo_ipa generated from molecule
 - trivial additions to .gitignore
 - adds molecule-requirements.txt
 - invokes molecule using tox
 - adds basic plumbing so that we can invoke tests using zuul and
   locally with some handy scripts

Each entry above was originally its own patch. We're consolidating them
into a single patch so that we can introduce zuul, which needs to verify
patches before we can merge them.

If you want to run tests locally, you can use the
`scripts/run-local-test` script:

  $ bash scripts/run-local-test

Which will setup dependencies from zuul, install a virtualenv, and
invoke tox.

Change-Id: If9446f5597d0150a2694e655dbb45475ce38a426
2020-03-18 00:41:55 +00:00

30 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -o pipefail
set -xeo
export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
export PROJECT_DIR="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/../"
ansible-playbook -i "${PROJECT_DIR}/tests/hosts.ini" \
-e "tripleo_src=$(realpath --relative-to="${HOME}" "${PROJECT_DIR}")" \
-e "ansible_user=${USER}" \
-e "ansible_user_dir=${HOME}" \
"${PROJECT_DIR}/playbooks/prepare-test-host.yml" \
"${PROJECT_DIR}/zuul.d/playbooks/run-local.yml"