@@ -81,12 +81,73 @@ jobs:
8181 verify_ssl = true
8282 name = "cloudsmith"
8383 [packages]
84- simplepkg = "0.0.1 "
84+ simplepkg = "0.4.3 "
8585 [requires]
8686 python_version = "3.9"
8787 EOT
8888 - run : pipenv install
8989
90+ test-set_env_vars_for_poetry :
91+ docker :
92+ - image : cimg/python:3.9
93+ resource_class : small
94+ steps :
95+ - checkout
96+ - cloudsmith-python/set_env_vars_for_poetry :
97+ repository : " circleci-orb-testing"
98+ - run :
99+ name : Assert environment variables have been set
100+ command : |
101+ if [ $CLOUDSMITH_POETRY_USERNAME != "circleci-orb-testing" ]
102+ then
103+ echo "Test failed: CLOUDSMITH_POETRY_USERNAME has not been set correctly."
104+ exit 1
105+ fi
106+ if [ -z $CLOUDSMITH_POETRY_PASSWORD ]
107+ then
108+ echo "Test failed: CLOUDSMITH_POETRY_PASSWORD has not been set."
109+ exit 1
110+ fi
111+ echo "All tests passed."
112+
113+ test-upload_package_using_poetry :
114+ docker :
115+ - image : cimg/python:3.9
116+ resource_class : small
117+ steps :
118+ - checkout
119+ - cloudsmith-python/set_env_vars_for_poetry :
120+ repository : circleci-orb-testing
121+ - run :
122+ # cloudsmith-source-url is an arbitrary label for the Cloudsmith Source URL
123+ name : Create Poetry package and publish package
124+ command : |
125+ poetry new poetry-package
126+ cd poetry-package
127+ poetry source add --priority=default cloudsmith-source-url https://python.cloudsmith.io/financial-times/circleci-orb-testing/
128+ poetry config http-basic.cloudsmith-source-url $CLOUDSMITH_POETRY_USERNAME $CLOUDSMITH_POETRY_PASSWORD
129+ poetry build
130+ poetry publish -r cloudsmith-source-url
131+
132+ test-poetry_install_packages_example :
133+ docker :
134+ - image : cimg/python:3.9
135+ steps :
136+ - checkout
137+ - cloudsmith-python/set_env_vars_for_poetry :
138+ repository : circleci-orb-testing
139+ - run :
140+ # cloudsmith-source-url is an arbitrary label for the Cloudsmith Source URL
141+ name : Create Poetry package and install dependencies
142+ command : |
143+ poetry new poetry-package
144+ cd poetry-package
145+ poetry source add --priority=default cloudsmith-source-url https://packages.ft.com/basic/circleci-orb-testing/python/simple/
146+ poetry config http-basic.cloudsmith-source-url $CLOUDSMITH_POETRY_USERNAME $CLOUDSMITH_POETRY_PASSWORD
147+ poetry add -q simplepkg
148+ poetry install
149+ poetry show
150+
90151 test-configure_pip_example :
91152 docker :
92153 - image : cimg/python:3.9
@@ -189,6 +250,12 @@ workflows:
189250 - test-pipenv_install_package_example :
190251 context : circleci-orb-publishing
191252 filters : *filters
253+ - test-set_env_vars_for_poetry :
254+ context : circleci-orb-publishing
255+ filters : *filters
256+ - test-poetry_install_packages_example :
257+ context : circleci-orb-publishing
258+ filters : *filters
192259 - test-configure_pip_example :
193260 context : circleci-orb-publishing
194261 filters : *filters
@@ -203,6 +270,10 @@ workflows:
203270 filters : *filters
204271 requires :
205272 - test-upload_package_using_twine
273+ - test-upload_package_using_poetry :
274+ context : circleci-orb-publishing
275+ filters : *filters
276+
206277 # The orb must be re-packed for publishing, and saved to the workspace.
207278 - orb-tools/pack :
208279 filters : *release-filters
@@ -217,10 +288,13 @@ workflows:
217288 - test-pip_install_package_example
218289 - test-pip_install_requirements_example
219290 - test-pipenv_install_package_example
291+ - test-set_env_vars_for_poetry
292+ - test-poetry_install_packages_example
220293 - test-configure_pip_example
221294 - test-set_env_vars_for_twine
222295 - test-upload_package_using_twine
223296 - test-upload_package_using_cli
297+ - test-upload_package_using_poetry
224298 # Use a context to hold your publishing token.
225299 context : circleci-orb-publishing
226300 filters : *release-filters
0 commit comments