1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #5 from ryanpetrello/shippable-ci

get CI passing on shippable CI
This commit is contained in:
Ryan Petrello 2017-08-18 16:02:24 -04:00 committed by GitHub
commit 2e719e5bc6
4 changed files with 34 additions and 17 deletions

View File

@ -8,14 +8,19 @@ env:
- AWX_BUILD_TARGET=ui-test-ci
- AWX_BUILD_TARGET="flake8 jshint"
branches:
only:
- devel
- release_*
build:
pre_ci:
- docker build -t ansible/awx_devel -f tools/docker-compose/Dockerfile .
- docker tag ansible/awx_devel gcr.io/ansible-tower-engineering/awx_devel:${BASE_BRANCH:-latest}
- docker tag ansible/awx_devel gcr.io/ansible-tower-engineering/awx_devel:latest
pre_ci_boot:
options: "-v /awx_devel:/awx_devel"
ci:
- cp -R . /awx_devel
- pip install -U docker-compose
- docker-compose -f tools/docker-compose/unit-tests/docker-compose.yml build --build-arg TAG=${BASE_BRANCH:-latest} unit-tests
- docker-compose -f tools/docker-compose/unit-tests/docker-compose.yml run -v /awx_devel:/awx_devel unit-tests "make ${AWX_BUILD_TARGET}"
- docker-compose -f tools/docker-compose/unit-tests/docker-compose-shippable.yml build --build-arg TAG=latest unit-tests
- docker-compose -f tools/docker-compose/unit-tests/docker-compose-shippable.yml run unit-tests "make ${AWX_BUILD_TARGET}"

View File

@ -249,7 +249,6 @@ def make_the_data():
org.member_role.members.add(jt_admin)
org.member_role.members.add(inv_admin)
organization_gen = yield_choice(organizations)
print('')
print('# Creating %d users' % n_users)
@ -542,7 +541,6 @@ def make_the_data():
wfjt_nodes = []
for i in range(n):
ids['nodes'] += 1
node_id = ids['nodes']
sys.stdout.write('\r Assigning %d to %s: %d ' % (n, wfjt.name, i+ 1))
sys.stdout.flush()
kwargs = dict(
@ -710,17 +708,18 @@ def make_the_data():
if n:
print('')
if options['pretend']:
with transaction.atomic():
try:
make_the_data()
raise Rollback()
except Rollback:
print('Rolled back changes')
pass
else:
make_the_data()
if options['pretend']:
with transaction.atomic():
try:
make_the_data()
raise Rollback()
except Rollback:
print('Rolled back changes')
pass
else:
make_the_data()
print('')

View File

@ -1,5 +1,4 @@
ARG TAG=latest
FROM gcr.io/ansible-tower-engineering/awx_devel:$TAG
FROM gcr.io/ansible-tower-engineering/awx_devel:latest
# For UI tests
RUN yum install -y bzip2 gcc-c++

View File

@ -0,0 +1,14 @@
---
version: '3'
services:
unit-tests:
build:
context: ../../../
dockerfile: tools/docker-compose/unit-tests/Dockerfile
image: gcr.io/ansible-tower-engineering/unit-test-runner:${GIT_BRANCH:-latest}
environment:
SWIG_FEATURES: "-cpperraswarn -includeall -I/usr/include/openssl"
TEST_DIRS: awx/main/tests/functional awx/main/tests/unit awx/conf/tests awx/sso/tests
command: ["make test"]
volumes:
- /awx_devel:/awx_devel