Skip to content

Commit 8b53fca

Browse files
authored
Tweak pipenv example (#31)
* change image to Python and remove pip config * rename and tweak pipenv example * add pipenv failing test * add jobs to workflow * try multi-line command * try multi line run command * add colons because circleci says so * add quotes to string * fix indentation * try escaping delimeter * remove _False on cloudsmith index url * change orb semver in example to 1.0
1 parent 5ba7016 commit 8b53fca

8 files changed

+57
-33
lines changed

.circleci/test-deploy.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
repository: "circleci-orb-testing"
3232
- run:
3333
name: Assert environment variables have been set
34-
command: |
34+
command: |
3535
if [ $CLOUDSMITH_DOWNLOADS_DOMAIN != "packages.ft.com" ]
3636
then
3737
echo "Test failed: CLOUDSMITH_DOWNLOADS_DOMAIN has not been set correctly."
@@ -63,6 +63,30 @@ jobs:
6363
repository: "circleci-orb-testing"
6464
- run: python -m pip install -r requirements.txt --index-url "$CLOUDSMITH_PIP_INDEX_URL"
6565

66+
test-pipenv_install_package_example:
67+
docker:
68+
- image: cimg/python:3.9
69+
steps:
70+
- checkout
71+
- run: python -m ensurepip --upgrade
72+
- cloudsmith-python/set_env_vars_for_pip:
73+
repository: "circleci-orb-testing"
74+
- run: python -m pip install pipenv
75+
- run:
76+
name: Create Pipfile
77+
command: |
78+
cat \<< EOT >> Pipfile
79+
[[source]]
80+
url = "\$CLOUDSMITH_PIP_INDEX_URL"
81+
verify_ssl = true
82+
name = "cloudsmith"
83+
[packages]
84+
simplepkg = "0.0.1"
85+
[requires]
86+
python_version = "3.9"
87+
EOT
88+
- run: pipenv install
89+
6690
test-configure_pip_example:
6791
docker:
6892
- image: cimg/python:3.9
@@ -84,7 +108,7 @@ jobs:
84108
repository: "circleci-orb-testing"
85109
- run:
86110
name: Assert environment variables have been set
87-
command: |
111+
command: |
88112
if [ $CLOUDSMITH_TWINE_REPOSITORY_URL != "https://python.cloudsmith.io/financial-times/circleci-orb-testing/" ]
89113
then
90114
echo "Test failed: CLOUDSMITH_TWINE_REPOSITORY_URL has not been set correctly."
@@ -162,6 +186,9 @@ workflows:
162186
- test-pip_install_requirements_example:
163187
context: circleci-orb-publishing
164188
filters: *filters
189+
- test-pipenv_install_package_example:
190+
context: circleci-orb-publishing
191+
filters: *filters
165192
- test-configure_pip_example:
166193
context: circleci-orb-publishing
167194
filters: *filters
@@ -189,6 +216,7 @@ workflows:
189216
- test-set_env_vars_for_pip
190217
- test-pip_install_package_example
191218
- test-pip_install_requirements_example
219+
- test-pipenv_install_package_example
192220
- test-configure_pip_example
193221
- test-set_env_vars_for_twine
194222
- test-upload_package_using_twine

src/examples/configure_pip_index_url.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
usage:
44
version: 2.1
55
orbs:
6-
cloudsmith-python: ft-circleci-orbs/[email protected].0
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
77
jobs:
88
build:
99
docker:

src/examples/install_package_using_python_orb_pipenv.yml

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

src/examples/pip_install_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
usage:
44
version: 2.1
55
orbs:
6-
cloudsmith-python: ft-circleci-orbs/[email protected].0
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
77
jobs:
88
build:
99
docker:

src/examples/pip_install_requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
usage:
44
version: 2.1
55
orbs:
6-
cloudsmith-python: ft-circleci-orbs/[email protected].0
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
77
jobs:
88
build:
99
docker:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
description: >
2+
Install a package from Cloudsmith using pipenv. The source URL in the Pipfile must reference $CLOUDSMITH_PIP_INDEX_URL.
3+
usage:
4+
version: 2.1
5+
orbs:
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
7+
jobs:
8+
build:
9+
docker:
10+
- image: cimg/python:3.9
11+
steps:
12+
- checkout
13+
- run: python -m ensurepip --upgrade
14+
- cloudsmith-python/set_env_vars_for_pip:
15+
repository: your-repository-id
16+
- run: python -m pip install pipenv
17+
- run: pipenv install
18+
19+
workflows:
20+
main:
21+
jobs:
22+
- build

src/examples/upload_package_using_cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
usage:
44
version: 2.1
55
orbs:
6-
cloudsmith-python: ft-circleci-orbs/[email protected].0
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
77
jobs:
88
build:
99
docker:

src/examples/upload_package_using_twine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >
33
usage:
44
version: 2.1
55
orbs:
6-
cloudsmith-python: ft-circleci-orbs/[email protected].0
6+
cloudsmith-python: ft-circleci-orbs/[email protected]
77
jobs:
88
build:
99
docker:

0 commit comments

Comments
 (0)