Skip to content

Commit 84cbfdb

Browse files
authored
Merge pull request #358 from cloudify-cosmo/replace-wagon-builder-to-py2py3-builder
Replace wagon builder to py2py3 builder
2 parents 20f89ab + 34bc2d0 commit 84cbfdb

File tree

7 files changed

+125
-26
lines changed

7 files changed

+125
-26
lines changed

.circleci/config.yml

Lines changed: 102 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ executors:
2727
machine:
2828
image: ubuntu-1604:201903-01
2929

30+
cloudify-machine-510:
31+
machine:
32+
image: ubuntu-1604:201903-01
3033

3134
commands:
3235
run_unittest:
@@ -69,16 +72,16 @@ commands:
6972
exit 1
7073
fi
7174
72-
generate_py27_wagon:
75+
generate_py27py36_wagon:
7376
steps:
7477
- run:
7578
name: Create Workspace Build directory.
7679
command: mkdir -p workspace/build
7780
- run:
78-
name: Build 27 Wagon
81+
name: Build py27py36 Wagon
7982
command: |
8083
git clone https://github.com/cloudify-cosmo/cloudify-wagon-build-containers.git
81-
docker build -t cloudify-centos-7-wagon-builder cloudify-wagon-build-containers/centos_7
84+
docker build -t cloudify-centos-7-wagon-builder cloudify-wagon-build-containers/centos_7_py2py3
8285
docker run -v ~/project/:/packaging cloudify-centos-7-wagon-builder
8386
- run:
8487
name: copy wagon to workspace
@@ -88,16 +91,16 @@ commands:
8891
paths:
8992
- build/*
9093

91-
generate_rhel_py27_wagon:
94+
generate_rhel_py27py36_wagon:
9295
steps:
9396
- run:
9497
name: Create Workspace Build directory.
9598
command: mkdir -p workspace/build
9699
- run:
97-
name: Build RHEL 27 Wagon
100+
name: Build RHEL py27py36 Wagon
98101
command: |
99102
git clone https://github.com/cloudify-cosmo/cloudify-wagon-build-containers.git
100-
docker build -t cloudify-redhat-7-wagon-builder cloudify-wagon-build-containers/redhat_7 --build-arg USERNAME="$USERNAME" --build-arg PASSWORD="$PASSWORD"
103+
docker build -t cloudify-redhat-7-wagon-builder cloudify-wagon-build-containers/redhat_7_py2py3 --build-arg USERNAME="$USERNAME" --build-arg PASSWORD="$PASSWORD"
101104
docker run -v ~/project/:/packaging cloudify-redhat-7-wagon-builder
102105
- run:
103106
name: copy wagon to workspace
@@ -107,7 +110,7 @@ commands:
107110
paths:
108111
- build/*
109112

110-
run_integration_tests:
113+
run_integration_tests_505:
111114
steps:
112115
- run:
113116
name: "Pull Submodules"
@@ -121,16 +124,52 @@ commands:
121124
command: pip install -U pip
122125
- run:
123126
name: install cloudify
124-
command: pip install -U cloudify==5.0.0 pytest==4.6.3 pyyaml==3.10
127+
command: |
128+
pip install -r test-requirements.txt
129+
- run:
130+
name: download manager docker image
131+
command: wget http://repository.cloudifysource.org/cloudify/5.0.5/ga-release/cloudify-docker-manager-5.0.5.tar
132+
- run:
133+
name: load docker image
134+
command: docker load -i cloudify-docker-manager-5.0.5.tar
135+
- run:
136+
name: retain space by dumping the tar
137+
command: rm cloudify-docker-manager-5.0.5.tar
138+
- run:
139+
name: show images
140+
command: docker images
141+
- run:
142+
name: start docker container
143+
command: docker run --name cfy_manager -d --restart unless-stopped -v /sys/fs/cgroup:/sys/fs/cgroup:ro --tmpfs /run --tmpfs /run/lock --security-opt seccomp:unconfined --cap-add SYS_ADMIN --network host cloudifyplatform/premium-cloudify-manager-aio
144+
- run:
145+
name: install local project
146+
command: pip install https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/latest.zip
147+
- run: pytest -s .circleci/test_examples.py
148+
149+
run_integration_tests_510:
150+
steps:
151+
- run:
152+
name: "Pull Submodules"
153+
command: |
154+
git submodule update --init --recursive --remote
155+
- attach_workspace:
156+
at: workspace
157+
- run:
158+
name: update pip
159+
command: pip install -U pip
160+
- run:
161+
name: install cloudify
162+
command: |
163+
pip install -r test-requirements.txt
125164
- run:
126165
name: download manager docker image
127-
command: wget http://repository.cloudifysource.org/cloudify/5.0.0/ga-release/cloudify-docker-manager-5.0.0.tar
166+
command: wget http://repository.cloudifysource.org/cloudify/5.1.0/.dev1-release/cloudify-docker-manager-5.1.0.dev1.tar
128167
- run:
129168
name: load docker image
130-
command: docker load -i cloudify-docker-manager-5.0.0.tar
169+
command: docker load -i cloudify-docker-manager-5.1.0.dev1.tar
131170
- run:
132171
name: retain space by dumping the tar
133-
command: rm cloudify-docker-manager-5.0.0.tar
172+
command: rm cloudify-docker-manager-5.1.0.dev1.tar
134173
- run:
135174
name: show images
136175
command: docker images
@@ -195,23 +234,32 @@ jobs:
195234
executor: wagon_generator
196235
steps:
197236
- checkout
198-
- generate_py27_wagon
237+
- generate_py27py36_wagon
199238

200239
rhel_wagon:
201240
executor: wagon_generator
202241
steps:
203242
- checkout
204-
- generate_rhel_py27_wagon
243+
- generate_rhel_py27py36_wagon
205244

206-
integration_tests:
245+
integration_tests_505:
207246
executor: cloudify-machine
208247
environment:
209248
CLOUDIFY_SSL_TRUST_ALL: true
210249
IAAS: openstack
211250
TEST_NAME: cloudformation
212251
steps:
213252
- checkout
214-
- run_integration_tests
253+
- run_integration_tests_505
254+
255+
integration_tests_510:
256+
executor: cloudify-machine-510
257+
environment:
258+
CLOUDIFY_SSL_TRUST_ALL: true
259+
IAAS: openstack
260+
steps:
261+
- checkout
262+
- run_integration_tests_510
215263

216264
release:
217265
executor: py27
@@ -222,7 +270,7 @@ jobs:
222270
workflows:
223271
version: 2
224272
tests:
225-
jobs: &all_jobs
273+
jobs:
226274
- py3_compat
227275
- unittests_py27
228276
- unittests_py36
@@ -234,7 +282,14 @@ workflows:
234282
filters:
235283
branches:
236284
only: /([0-9\.]*\-build|master|dev)/
237-
- integration_tests:
285+
- integration_tests_505:
286+
requires:
287+
- wagon
288+
- rhel_wagon
289+
filters:
290+
branches:
291+
only: /([0-9\.]*\-build|master|dev)/
292+
- integration_tests_510:
238293
requires:
239294
- wagon
240295
- rhel_wagon
@@ -246,9 +301,12 @@ workflows:
246301
branches:
247302
only: /master/
248303
requires:
304+
- unittests_py27
305+
- unittests_py36
249306
- wagon
250307
- rhel_wagon
251-
- integration_tests
308+
- integration_tests_505
309+
- integration_tests_510
252310

253311
nightly:
254312
triggers:
@@ -258,4 +316,29 @@ workflows:
258316
branches:
259317
only:
260318
- master
261-
jobs: *all_jobs
319+
jobs:
320+
- py3_compat
321+
- unittests_py27
322+
- unittests_py36
323+
- wagon:
324+
filters:
325+
branches:
326+
only: /([0-9\.]*\-build|master|dev)/
327+
- rhel_wagon:
328+
filters:
329+
branches:
330+
only: /([0-9\.]*\-build|master|dev)/
331+
- integration_tests_505:
332+
requires:
333+
- wagon
334+
- rhel_wagon
335+
filters:
336+
branches:
337+
only: /([0-9\.]*\-build|master|dev)/
338+
- integration_tests_510:
339+
requires:
340+
- wagon
341+
- rhel_wagon
342+
filters:
343+
branches:
344+
only: /([0-9\.]*\-build|master|dev)/

.circleci/test_examples.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
cleanup_on_failure, prepare_test
2323
)
2424

25+
'''Temporary until all the plugins in the bundle will
26+
released with py2py3 wagons'''
27+
UT_VERSION = '1.23.5'
28+
UT_WAGON = 'https://github.com/cloudify-incubator/cloudify-utilities-plugin/' \
29+
'releases/download/{v}/cloudify_utilities_plugin-{v}-centos' \
30+
'-Core-py27.py36-none-linux_x86_64.wgn'.format(v=UT_VERSION)
31+
UT_PLUGIN = 'https://github.com/cloudify-incubator/cloudify-utilities-' \
32+
'plugin/releases/download/{v}/plugin.yaml'.format(v=UT_VERSION)
33+
PLUGINS_TO_UPLOAD = [(UT_WAGON, UT_PLUGIN)]
2534
SECRETS_TO_CREATE = {
2635
'openstack_username': False,
2736
'openstack_password': False,
@@ -35,7 +44,8 @@
3544
'openstack_project_domain_name': False,
3645
}
3746

38-
prepare_test(secrets=SECRETS_TO_CREATE)
47+
prepare_test(plugins=PLUGINS_TO_UPLOAD, secrets=SECRETS_TO_CREATE,
48+
execute_bundle_upload=False)
3949

4050
blueprint_list = ['examples/blueprint-examples/virtual-machine/openstack.yaml']
4151

CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
3.2.16:
2+
- Update wagon builder to py2py3 wagon.
3+
- Added 5.1.0 integration tests.
14
3.2.14: Support Python 3.
25
3.2.13:
36
- Support quota operations on Project [ get_quota/update_quota ].

constraints.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
cloudify-common==4.4

plugin.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ plugins:
22

33
openstack:
44
executor: central_deployment_agent
5-
source: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/3.2.15.zip
5+
source: https://github.com/cloudify-cosmo/cloudify-openstack-plugin/archive/3.2.16.zip
66
package_name: cloudify-openstack-plugin
7-
package_version: '3.2.15'
7+
package_version: '3.2.16'
88

99
dsl_definitions:
1010

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
setup(
2222
name='cloudify-openstack-plugin',
23-
version='3.2.15',
23+
version='3.2.16',
2424
author='Cloudify',
2525
author_email='[email protected]',
2626
license='LICENSE',

test-requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ nose-cov>=1.3
44
mock>=1.0
55
flake8==3.7.9
66
tox==3.14.6
7-
https://github.com/cloudify-cosmo/cloudify-common/archive/master.zip
8-
https://github.com/cloudify-cosmo/cloudify-cli/archive/master.zip
97
sh==1.11
108
IPy==0.81
119
pylint
10+
11+
# For integration tests
12+
git+https://github.com/cloudify-cosmo/cloudify-common@master#egg=cloudify-common[dispatcher]==master
13+
git+https://github.com/cloudify-cosmo/cloudify-cli@master#egg=cloudify-cli==master
14+
pytest==4.6.3
15+
pyyaml==3.12

0 commit comments

Comments
 (0)