Skip to content

Commit 8a4e952

Browse files
authored
Merge pull request #2 from cloudify-incubator/RD-5559-serverless-framework-plugin
Rd 5559 serverless framework plugin
2 parents 880767c + f2856d0 commit 8a4e952

28 files changed

+2143
-289
lines changed

.circleci/config.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: cloudify/public-unittest-orb@1 #orb version
5+
wagonorb: cloudify/[email protected] #orb version
6+
releaseorb: cloudify/[email protected] #orb version
7+
managerorb: cloudify/[email protected]
8+
9+
checkout:
10+
post:
11+
- >
12+
if [ -n "$CI_PULL_REQUEST" ]; then
13+
PR_ID=${CI_PULL_REQUEST##*/}
14+
git fetch origin +refs/pull/$PR_ID/merge:
15+
git checkout -qf FETCH_HEAD
16+
git submodule update --init --recursive
17+
fi
18+
19+
executors:
20+
21+
py36:
22+
docker:
23+
- image: circleci/python:3.6
24+
25+
cloudify-machine-py3:
26+
machine:
27+
image: ubuntu-2004:202201-02
28+
29+
commands:
30+
prepare_test_manager:
31+
steps:
32+
- run: ecosystem-test prepare-test-manager -l $TEST_LICENSE -es aws_access_key_id=$aws_access_key_id -es aws_secret_access_key=$aws_secret_access_key --bundle-path workspace/build/cloudify-plugins-bundle.tgz --yum-package python-netaddr --yum-package git -p $(find ~/project/workspace/build/ -name *centos-Core*x86_64.wgn) ~/project/plugin.yaml
33+
34+
run_blueprint:
35+
steps:
36+
- run: ecosystem-test local-blueprint-test -b examples/blueprint.yaml --test-id=hello-world-example --on-failure=uninstall-force --timeout=1800
37+
38+
jobs:
39+
40+
integration_tests_py3:
41+
executor: cloudify-machine-py3
42+
environment:
43+
CLOUDIFY_SSL_TRUST_ALL: true
44+
steps:
45+
- checkout
46+
- managerorb/create_manager_container_latest
47+
- prepare_test_manager
48+
- run_blueprint
49+
50+
workflows:
51+
version: 2
52+
tests:
53+
jobs:
54+
- node/check_py3_compat_job
55+
- node/unittests_job
56+
- node/validate_version_job
57+
- node/validate_documentation_job
58+
- wagonorb/wagon:
59+
filters:
60+
branches:
61+
only: /([0-9\.]*\-build|master)/
62+
- wagonorb/arch64_wagon:
63+
filters:
64+
branches:
65+
only: /([0-9\.]*\-build|master|dev)/
66+
- wagonorb/rhel_wagon:
67+
filters:
68+
branches:
69+
only: /([0-9\.]*\-build|master)/
70+
- wagonorb/build_bundle:
71+
filters:
72+
branches:
73+
only: /([0-9\.]*\-build|master)/
74+
requires:
75+
- wagonorb/wagon
76+
- wagonorb/arch64_wagon
77+
- wagonorb/rhel_wagon
78+
- integration_tests_py3:
79+
requires:
80+
- wagonorb/wagon
81+
- wagonorb/arch64_wagon
82+
- wagonorb/rhel_wagon
83+
- wagonorb/build_bundle
84+
filters:
85+
branches:
86+
only: /([0-9\.]*\-build|master)/
87+
- releaseorb/release:
88+
filters:
89+
branches:
90+
only: /master/
91+
requires:
92+
- wagonorb/wagon
93+
- wagonorb/arch64_wagon
94+
- wagonorb/rhel_wagon
95+
- wagonorb/build_bundle
96+
- node/validate_version_job
97+
- node/validate_documentation_job
98+
- integration_tests_py3
99+
- releaseorb/merge_docs_job:
100+
filters:
101+
branches:
102+
only: /master/
103+
requires:
104+
- releaseorb/release
105+
- node/validate_documentation_job
106+
nightly:
107+
triggers:
108+
- schedule:
109+
cron: "0 1 * * 0,1,3,5"
110+
filters:
111+
branches:
112+
only:
113+
- master
114+
jobs:
115+
- node/check_py3_compat_job
116+
- node/validate_version_job
117+
- node/unittests_job
118+
- wagonorb/wagon:
119+
filters:
120+
branches:
121+
only: /([0-9\.]*\-build|master)/
122+
- wagonorb/arch64_wagon:
123+
filters:
124+
branches:
125+
only: /([0-9\.]*\-build|master|dev)/
126+
- wagonorb/rhel_wagon:
127+
filters:
128+
branches:
129+
only: /([0-9\.]*\-build|master)/
130+
- wagonorb/build_bundle:
131+
filters:
132+
branches:
133+
only: /master/
134+
requires:
135+
- wagonorb/wagon
136+
- wagonorb/arch64_wagon
137+
- wagonorb/rhel_wagon
138+
- integration_tests_py3:
139+
requires:
140+
- wagonorb/build_bundle
141+
- wagonorb/wagon
142+
- wagonorb/arch64_wagon
143+
- wagonorb/rhel_wagon
144+
filters:
145+
branches:
146+
only: /([0-9\.]*\-build|master)/

.circleci/py3fixers

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--stage1
2+
-f lib2to3.fixes.fix_getcwdu
3+
-f lib2to3.fixes.fix_long
4+
-f lib2to3.fixes.fix_nonzero
5+
-f lib2to3.fixes.fix_input
6+
-f lib2to3.fixes.fix_raw_input
7+
-f lib2to3.fixes.fix_itertools
8+
-f lib2to3.fixes.fix_itertools_imports
9+
-f lib2to3.fixes.fix_exec
10+
-f lib2to3.fixes.fix_operator
11+
-f libfuturize.fixes.fix_execfile
12+
-f libpasteurize.fixes.fix_newstyle
13+
-f lib2to3.fixes.fix_filter
14+
# fix_dict is not idempotent
15+
# -f lib2to3.fixes.fix_dict
16+
-f lib2to3.fixes.fix_map
17+
-f lib2to3.fixes.fix_zip
18+
-f lib2to3.fixes.fix_xrange
19+
-f lib2to3.fixes.fix_basestring
20+
-f libfuturize.fixes.fix_cmp
21+
-f libfuturize.fixes.fix_division_safe
22+
-f lib2to3.fixes.fix_metaclass
23+
-f libfuturize.fixes.fix_unicode_keep_u
24+

CHANGELOG.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
0.0.1: POC
2+
0.1.0: Productized release.

constraints.txt

Whitespace-only changes.

dev-requirements.txt

Whitespace-only changes.

examples/aws.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

examples/azure.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/blueprint.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
tosca_definitions_version: cloudify_dsl_1_4
2+
3+
imports:
4+
- https://cloudify.co/spec/cloudify/6.4.0/types.yaml
5+
- plugin:cloudify-serverless-plugin
6+
7+
node_templates:
8+
9+
sl:
10+
type: cloudify.nodes.serverless.Binary
11+
properties:
12+
installation_source: ''
13+
14+
hello_functions:
15+
type: cloudify.nodes.serverless.Service
16+
properties:
17+
client_config:
18+
provider: aws
19+
credentials:
20+
key: { get_secret: aws_access_key_id }
21+
secret: { get_secret: aws_secret_access_key }
22+
resource_config:
23+
name: 'aws-service'
24+
template: 'aws-python3'
25+
functions:
26+
- name: hello_1
27+
path: resources/handler_1.py
28+
handler: handler_1.hello_1
29+
- name: hello_2
30+
path: resources/handler_2.py
31+
handler: handler_2.hello_2
32+
relationships:
33+
- type: cloudify.relationships.depends_on
34+
target: sl

examples/gcp.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ operation_kwargs:
44
- hello_1
55
- hello_2
66
operation: 'serverless.interface.invoke'
7-
node_instance_ids:
8-
- example-aws-serverless_pqua9s
7+
node_ids:
8+
- hello_functions
9+
910

0 commit comments

Comments
 (0)