-
Notifications
You must be signed in to change notification settings - Fork 4
/
config.yml
115 lines (105 loc) · 3.02 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
---
version: 2.1
jobs:
build:
machine:
image: ubuntu-2204:2022.10.2
steps:
- checkout
- run:
name: Get test data ds114_test*
command: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/utils/get_data_from_osf.sh
bash get_data_from_osf.sh ds114_test1
bash get_data_from_osf.sh ds114_test2
- run:
name: Build Docker image
command: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/circleci/build_docker.sh
bash build_docker.sh
- persist_to_workspace:
root: /home/circleci
paths:
- data/ds114_test1
- data/ds114_test2
- docker/image.tar
test:
machine:
image: ubuntu-2204:2022.10.2
parameters:
participant:
type: string
dataset:
type: string
stages:
type: string
steps:
- attach_workspace:
at: /tmp/workspace
- run: docker load -i /tmp/workspace/docker/image.tar
- run: mkdir -p ${HOME}/outputs<< parameters.participant >>
- run:
name: print version
command: |
docker run -ti --rm \
-v /tmp/workspace/data/ds114_test<< parameters.dataset >>:/bids_dataset \
-v ${HOME}/outputs<< parameters.participant >>:/outputs \
bids/${CIRCLE_PROJECT_REPONAME,,} \
/bids_dataset \
/outputs \
participant \
--version
- run:
name: participant level << parameters.stages >> tests - participant << parameters.participant >>
no_output_timeout: 30m
command: |
docker run -ti --rm \
-v /tmp/workspace/data/ds114_test<< parameters.dataset >>:/bids_dataset \
-v ${HOME}/outputs<< parameters.participant >>:/outputs \
bids/${CIRCLE_PROJECT_REPONAME,,} \
/bids_dataset \
/outputs \
participant \
--participant_label << parameters.participant >> \
--stages << parameters.stages >> \
--cache /outputs \
--ncpus 6
deploy:
machine:
image: ubuntu-2204:2022.10.2
steps:
- attach_workspace:
at: /tmp/workspace
- run: docker load -i /tmp/workspace/docker/image.tar
- run:
name: push to dockerhub
command: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/circleci/push_docker.sh
bash push_docker.sh
workflows:
build-test-deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- test:
requires:
- build
matrix:
parameters:
participant: ['01', '02']
dataset: ['1', '2']
stages: [CSE]
filters:
tags:
only: /.*/
- deploy:
context:
- dockerhub
requires:
- test
filters:
tags:
only: /.*/
# VS Code Extension Version: 1.5.1