Skip to content

Commit 0ee4d9a

Browse files
committed
Parameterize python version
1 parent f5b9fca commit 0ee4d9a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.circleci/config.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ orbs:
55
gcp-gcr: circleci/[email protected]
66
docker: circleci/[email protected]
77

8+
parameters:
9+
python-version:
10+
type: string
11+
default: '3.10'
12+
813
executors:
914
ubuntu-machine-executor:
1015
machine:
@@ -13,7 +18,7 @@ executors:
1318
jobs:
1419
build:
1520
docker: &docker
16-
- image: python:3.10
21+
- image: python:<< pipeline.parameters.python-version >>
1722
steps:
1823
- checkout
1924
- &restore_venv_cache
@@ -23,11 +28,12 @@ jobs:
2328
# patterns to restore cache
2429
- &python_cache_key
2530
# yamllint disable-line rule:line-length
26-
python-3.10-packages-v1-{{ .Branch }}-{{ checksum "requirements.in" }}-{{ checksum "requirements.txt" }}
27-
# yamllint disable-line rule:line-length
28-
- python-3.10-packages-v1-{{ .Branch }}-{{ checksum "requirements.in" }}-
29-
- python-3.10-packages-v1-{{ .Branch }}-
30-
- python-3.10-packages-v1-main-
31+
python-<< pipeline.parameters.python-version >>-packages-v1-{{ .Branch }}-{{ checksum "requirements.in" }}-{{ checksum "requirements.txt" }}
32+
# yamllint disable-line rule:line-length
33+
- python-<< pipeline.parameters.python-version >>-packages-v1-{{ .Branch }}-{{ checksum "requirements.in" }}-
34+
# yamllint disable-line rule:line-length
35+
- python-<< pipeline.parameters.python-version >>-packages-v1-{{ .Branch }}-
36+
- python-<< pipeline.parameters.python-version >>-packages-v1-main-
3137
- &build
3238
run:
3339
name: Build

0 commit comments

Comments
 (0)