Skip to content

Commit 6c3da6a

Browse files
authored
Add pip conf example (#16)
* Split into 3 pip examples
1 parent 12c4af7 commit 6c3da6a

File tree

3 files changed

+46
-7
lines changed

3 files changed

+46
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
description: >
2-
Install dependencies from Cloudsmith using pip
2+
Configure pip and install requirements from Cloudsmith.
33
usage:
44
version: 2.1
55
orbs:
66
ft-cloudsmith: ft-circleci-orbs/[email protected]
77
jobs:
8-
install_python_dependencies_from_cloudsmith:
8+
build:
99
docker:
1010
- image: cimg/python:3.9
1111
steps:
1212
- checkout
1313
- ft-cloudsmith/set_env_vars_for_pip:
1414
repository_identifier: "your-repository-identifier"
1515
service_identifier: "your-service-identifier"
16-
- run:
17-
name: Install Python dependencies
18-
command: python -m pip install -r requirements.txt --index-url "$CLOUDSMITH_PIP_INDEX_URL"
16+
- run: python -m pip config set global.index-url "$CLOUDSMITH_PIP_INDEX_URL"
17+
- run: python -m pip install -r requirements.txt
1918
workflows:
20-
use-my-orb:
19+
main:
2120
jobs:
22-
- install_python_dependencies_from_cloudsmith
21+
- build
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
description: >
2+
Pip install a package from Cloudsmith.
3+
usage:
4+
version: 2.1
5+
orbs:
6+
ft-cloudsmith: ft-circleci-orbs/[email protected]
7+
jobs:
8+
build:
9+
docker:
10+
- image: cimg/python:3.9
11+
steps:
12+
- checkout
13+
- ft-cloudsmith/set_env_vars_for_pip:
14+
repository_identifier: "your-repository-identifier"
15+
service_identifier: "your-service-identifier"
16+
- run: python -m pip install your-package==0.0.0 --index-url "$CLOUDSMITH_PIP_INDEX_URL"
17+
workflows:
18+
main:
19+
jobs:
20+
- build
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
description: >
2+
Pip install requirements from Cloudsmith.
3+
usage:
4+
version: 2.1
5+
orbs:
6+
ft-cloudsmith: ft-circleci-orbs/[email protected]
7+
jobs:
8+
build:
9+
docker:
10+
- image: cimg/python:3.9
11+
steps:
12+
- checkout
13+
- ft-cloudsmith/set_env_vars_for_pip:
14+
repository_identifier: "your-repository-identifier"
15+
service_identifier: "your-service-identifier"
16+
- run: python -m pip install -r requirements.txt --index-url "$CLOUDSMITH_PIP_INDEX_URL"
17+
workflows:
18+
main:
19+
jobs:
20+
- build

0 commit comments

Comments
 (0)