-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
129 lines (119 loc) · 3.28 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: 2.1
orbs:
aws-cli: circleci/aws-cli@3.1
codeartifact: visualfabriq/codeartifact@1.2
parameters:
workingdir:
type: string
default: "~/parqueryd/"
executors:
vf-dqe-executor:
docker:
- image: cimg/base:current
jobs:
test:
parameters:
runtime:
description: Python runtime
type: string
docker:
- image: cimg/python:<< parameters.runtime >>
working_directory: << pipeline.parameters.workingdir >>
steps:
- checkout:
path: << pipeline.parameters.workingdir >>
- codeartifact/init:
tool: pip
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Check docker-compose version
command: |
docker -v
docker-compose -v
- run:
name: Start Services
command: |
export CODEARTIFACT_TOKEN=$(aws --output text codeartifact get-authorization-token --domain visualfabriq --query authorizationToken)
export PIP_TRUSTED_HOST="visualfabriq-${AWS_ACCOUNT_ID}.d.codeartifact.${AWS_DEFAULT_REGION}.amazonaws.com"
export PIP_INDEX_URL="https://aws:${CODEARTIFACT_TOKEN}@${PIP_TRUSTED_HOST}/pypi/private/simple"
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml up -d
- run:
name: Sleep 30 seconds waiting for localstack service building
command: sleep 30
- run:
name: Run Tests
command: docker-compose -f docker-compose.yml run parqueryd pytest -v --junitxml=test-results/pytest/pytest-report.xml
- run:
name: check running docker
command: |
docker ps
- run:
name: Stop Services
command: docker-compose down
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
destination: tr1
build-and-push:
executor: codeartifact/default
parameters:
is-pre-release:
description: if true the version tag will contain the branch
type: boolean
default: false
steps:
- checkout
- codeartifact/init:
tool: pip
- when:
condition: << parameters.is-pre-release >>
steps:
- codeartifact/pre_release_version:
package: parqueryd
- run:
name: Build
command: |
pip install build
python -m build
- codeartifact/push:
tool: twine
workflows:
version: 2.1
build-and-release:
jobs:
- test:
context: codeartifact-dev
name: py311
runtime: "3.11"
- build-and-push:
context: codeartifact-dev
requires:
- py311
filters:
branches:
only:
- master
- main
- build-and-push:
context: codeartifact-dev
requires:
- py311
is-pre-release: true
filters:
branches:
only:
- uat
deploy:
jobs:
- test:
context: codeartifact-dev
name: py3
runtime: "3.11"
filters:
branches:
only:
- master
- main