forked from department-of-veterans-affairs/va.gov-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks-periodic.yml
113 lines (98 loc) · 4.1 KB
/
tasks-periodic.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
# These are tasks that are called by Jenkins similar to cron..
version: '3'
dotenv: ['.env']
tasks:
# Run with: ./bin/task --taskfile=tasks-periodic.yml daily
# http://jenkins.vfs.va.gov/job/cms/job/cms-daily
daily:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
va/background/daily/migrate_copy/va_forms_csv_source
va/background/daily/migrate/va_forms
va/background/daily/migrate/health_care_local_facility
va/background/daily/migrate/vet_centers_facility
va/background/daily/migrate/vba_facility
va/background/daily/migrate/nca_facility
va/background/daily/migrate/flag_removed_facilities
va/background/daily/update/taxonomy_entity_index
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
# Run with: ./bin/task --taskfile=tasks-periodic.yml periodic
# http://jenkins.vfs.va.gov/job/cms/job/cms-periodic
periodic:
cmds:
- |
cat <<EOF | bash
exit_code=0
tasks=(
"va/background/periodic/migrate/facility_status"
"va/background/periodic/cron"
)
trap '{ (( exit_code |=\$? )); }' ERR
for i in "\${tasks[@]}"; do
task --taskfile=./tasks-periodic.yml \$i
done
trap - ERR
exit \$exit_code;
EOF
va/background/daily/migrate_copy/va_forms_csv_source:
desc: This is because we cannot access the server on the SOCKS proxy right now.
cmds:
- |
cd docroot/sites/default/files/migrate_source
curl http://vaww.webdevi.va.gov/vaforms/VAForms_DataExtract/VAForms_FormsData.txt --output va_forms_data.csv
va/background/daily/migrate/va_forms:
desc: Migrate va forms.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_form
- drush $DRUSH_ALIAS migrate:import va_node_form
va/background/daily/migrate/health_care_local_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_health_care_local_facility
- drush $DRUSH_ALIAS migrate:import va_node_health_care_local_facility
va/background/daily/migrate/vet_centers_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_mvc
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_mvc
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vet_centers_os
- drush $DRUSH_ALIAS migrate:import va_node_facility_vet_centers_os
va/background/daily/migrate/vba_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_vba
- drush $DRUSH_ALIAS migrate:import va_node_facility_vba
va/background/daily/migrate/nca_facility:
desc: These commands are to run nightly.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_facility_nca
- drush $DRUSH_ALIAS migrate:import va_node_facility_nca
va/background/daily/migrate/flag_removed_facilities:
desc: These flagging process is to run once nightly.
cmds:
- drush $DRUSH_ALIAS va_gov_migrate:flag-missing-facilities
va/background/daily/update/taxonomy_entity_index:
desc: Update the taxonomy_entity_index nightly.
cmds:
- drush $DRUSH_ALIAS taxonomy_entity_index:rebuild
va/background/periodic/migrate/facility_status:
desc: Run migrate facility status to run every 15 min as called by Jenkins.
cmds:
- drush $DRUSH_ALIAS migrate:reset-status va_node_health_care_local_facility_status
- drush $DRUSH_ALIAS migrate:import va_node_health_care_local_facility_status
va/background/periodic/cron:
desc: Run cron every 15 min as called by Jenkins.
cmds:
- drush $DRUSH_ALIAS core:cron