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:
commit
2e719e5bc6
@ -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}"
|
||||
|
@ -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('')
|
||||
|
@ -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++
|
||||
|
14
tools/docker-compose/unit-tests/docker-compose-shippable.yml
Normal file
14
tools/docker-compose/unit-tests/docker-compose-shippable.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user