-
Notifications
You must be signed in to change notification settings - Fork 14
/
config.yml
52 lines (48 loc) · 1.49 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: 2.1
orbs:
docker: circleci/docker@1.5.0
jobs:
init:
docker:
- image: python:3.7.3-stretch
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "hello_app/requirements.txt" }}
# fallback to using the latest cache if no exact match is found
# - v1-dependencies-
- run:
name: Install dependencies
command: |
python3 -m venv .devops-capstone
source .devops-capstone/bin/activate
make install
- save_cache:
paths:
- ./.devops-capstone # TODO: Include in cache the "bin" directory
key: v1-dependencies-{{ checksum "hello_app/requirements.txt" }}
- run:
name: Run lint
command: |
source .devops-capstone/bin/activate
make lint
workflows:
default:
jobs:
- init
- docker/publish:
matrix:
parameters:
image: [$DOCKER_LOGIN/hello-app]
path: [hello_app]
docker-context: [hello_app]
deploy: [true]
# We publish two images with different version tags:
# - numbered version
# - "latest"
# tag: ['$(<hello_app/VERSION.txt)-${CIRCLE_SHA1:0:7}', 'latest']
tag: ['$(<hello_app/VERSION.txt)', 'latest']
update-description: [true]
requires: [init]