-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathAggregateDailyTrackingLogs.groovy
35 lines (32 loc) · 1.68 KB
/
AggregateDailyTrackingLogs.groovy
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
package analytics
import static org.edx.jenkins.dsl.AnalyticsConstants.to_date_interval_parameter
import static org.edx.jenkins.dsl.AnalyticsConstants.common_parameters
import static org.edx.jenkins.dsl.AnalyticsConstants.common_log_rotator
import static org.edx.jenkins.dsl.AnalyticsConstants.common_wrappers
import static org.edx.jenkins.dsl.AnalyticsConstants.common_publishers
import static org.edx.jenkins.dsl.AnalyticsConstants.common_triggers
import static org.edx.jenkins.dsl.AnalyticsConstants.common_multiscm
class AggregateDailyTrackingLogs {
public static def job = { dslFactory, allVars ->
allVars.get('ENVIRONMENTS').each { environment, env_config ->
dslFactory.job("aggregate-daily-tracking-logs-$environment") {
disabled(env_config.get('DISABLED', false))
logRotator common_log_rotator(allVars, env_config)
parameters to_date_interval_parameter(env_config)
parameters common_parameters(allVars, env_config)
parameters {
stringParam('SOURCE_BUCKET_PATH', env_config.get('SOURCE_BUCKET_PATH'))
stringParam('DEST_BUCKET_PATH', env_config.get('DEST_BUCKET_PATH'))
stringParam('TARGET_SIZE', env_config.get('TARGET_SIZE'))
}
multiscm common_multiscm(allVars)
triggers common_triggers(allVars, env_config)
wrappers common_wrappers(allVars)
publishers common_publishers(allVars)
steps {
shell(dslFactory.readFileFromWorkspace('dataeng/resources/aggregate-daily-tracking-logs.sh'))
}
}
}
}
}