Skip to content

Commit

Permalink
Merge pull request #113 from cloudify-cosmo/2.0.15-build
Browse files Browse the repository at this point in the history
Support 1.5 DSL YAML
  • Loading branch information
EarthmanT authored Oct 8, 2023
2 parents 2175671 + cc25a1f commit 7ddceb6
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 23 deletions.
53 changes: 36 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
version: 2.1

orbs:
node: cloudify/public-unittest-orb@volatile
wagonorb: cloudify/wagon-bulder-orb@volatile
releaseorb: cloudify/release-orb@volatile
managerorb: cloudify/manager-orb@volatile
slack: cloudify/notify-slack@2

job-post-steps: &job-post-steps
post-steps:
- slack/notify_failed
Expand All @@ -20,6 +13,12 @@ unittest-post-steps: &unittest-post-steps
prefix: tests
- slack/notify_failed

orbs:
node: cloudify/public-unittest-orb@volatile
wagonorb: cloudify/wagon-bulder-orb@volatile
releaseorb: cloudify/release-orb@volatile
slack: cloudify/notify-slack@2

checkout:
post:
- >
Expand All @@ -29,27 +28,45 @@ checkout:
git checkout -qf FETCH_HEAD
fi
executors:

py36:
docker:
- image: circleci/python:3.6

cloudify-machine-py3:
machine:
image: ubuntu-2004:202201-02

commands:

setup_manager:
steps:
- run: |
if [[ -z "${CLOUDIFY_HOST}" ]]; then
exit 1
fi
- run: |
if [[ -z "${CLOUDIFY_TENANT}" ]] && [ -z "${CIRCLE_PROJECT_REPONAME}" ]; then
exit 1
fi
- run: |
if [[ -z "${CLOUDIFY_TOKEN}" ]]; then
exit 1
fi
- run: |
response=$(curl --write-out '%{http_code}' --silent --insecure --header "Tenant: ${CLOUDIFY_TENANT}" --header "Authentication-Token: ${CLOUDIFY_TOKEN}" https://$CLOUDIFY_HOST/api/v3.1/status --output /dev/null)
if [[ $response != 200 ]]; then
echo "Failed to get manager status";
exit 1
fi
- run: pip3 install urllib3==1.26.15 requests-toolbelt==0.10.1
- run: pip3 install https://github.com/cloudify-incubator/cloudify-ecosystem-test/archive/refs/heads/master.zip
- run: git submodule update --init --recursive --remote

prepare_test_manager:
steps:
- run: ecosystem-test prepare-test-manager -l $TEST_LICENSE -es gcp_credentials=$gcp_credentials --yum-package python-netaddr --yum-package git -p $(find ~/project/workspace/build/ -name *manylinux-py311-none-linux_x86_64.wgn*) ~/project/plugin.yaml
- run: ecosystem-test upload-plugin -PN utilities
- run: ecosystem-test upload-plugin -PN gcp
- run: ecosystem-test prepare-remote-test-manager -es gcp_credentials=$gcp_credentials -p $(find ~/project/workspace/build/ -name *manylinux-py311-none-linux_x86_64.wgn*) ~/project/plugin_1_4.yaml

run_test:
steps:
- run: ecosystem-test local-blueprint-test -b examples/docker/install-docker-gcp-vm/docker-on-vm.yaml -i agent_user=centos --timeout=3000 --on-failure=uninstall-force --test-id=docker_vm_test
- run: ecosystem-test remote-blueprint-test -b examples/docker/install-docker-gcp-vm/docker-on-vm.yaml -i agent_user=centos --timeout=3000 --on-failure=uninstall-force --test-id=docker_vm_test

jobs:
integration_tests:
Expand All @@ -59,7 +76,9 @@ jobs:
IAAS: gcp
steps:
- checkout
- managerorb/create_manager_container_latest
- attach_workspace:
at: workspace
- setup_manager
- prepare_test_manager
- run_test

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
- Allow docker installation without sudo and offline.
2.0.14:
- updated circleci context & added wagon for py 3.11.
2.0.15: Release with DSL 1.5 plugin YAML.
2 changes: 1 addition & 1 deletion cloudify_docker/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '2.0.14'
version = '2.0.15'
3 changes: 1 addition & 2 deletions cloudify_docker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ def get_interface_ip(ifname):
return socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack('256s', bytes(ifname[:15]))
# Python 3: add 'utf-8' to bytes
struct.pack('256s', bytes(ifname[:15], encoding='utf8'))
)[20:24])
return "127.0.0.1"

Expand Down
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins:
docker:
executor: central_deployment_agent
package_name: cloudify-docker-plugin
package_version: 2.0.14
package_version: 2.0.15
dsl_definitions:
client_config:
client_config: &id001
Expand Down
2 changes: 1 addition & 1 deletion plugin_1_4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins:
docker:
executor: central_deployment_agent
package_name: 'cloudify-docker-plugin'
package_version: '2.0.14'
package_version: '2.0.15'

dsl_definitions:

Expand Down
Loading

0 comments on commit 7ddceb6

Please sign in to comment.