Skip to content

Commit

Permalink
feat: remove references to deprecated report
Browse files Browse the repository at this point in the history
FIXES: APER-2937
  • Loading branch information
deborahgu committed Oct 6, 2023
1 parent b1ddbbc commit 8829290
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 294 deletions.
2 changes: 1 addition & 1 deletion dataeng/jobs/analytics/RetirementJobEdxTriggers.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class RetirementJobEdxTriggers{
public static def job = { dslFactory, allVars ->
allVars.get('ENVIRONMENTS').each { environment, env_config ->
dslFactory.job("$environment"){
// Creates user_retirement_trigger_<environment> and retirement_partner_report_trigger_<environment> jobs
// Creates user_retirement_trigger_<environment> jobs
// This defines the job which triggers the collector and reporter job for a given environment.
description("Scheduled trigger of the " + env_config.get('DOWNSTREAM_JOB_NAME') + " job for the " + env_config.get('DOWNSTREAM_JOB_NAME') + " environment")

Expand Down
230 changes: 0 additions & 230 deletions dataeng/jobs/analytics/RetirementJobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -273,236 +273,6 @@ class RetirementJobs{
}
}

// // ########### retirement-partner-reporter ###########
// // Defines the job for running partner reporting
dslFactory.job('retirement-partner-reporter') {
description('Run the partner reporting job and push the results to Google Drive.')

authorization common_authorization(allVars)

// Only one of these jobs should be running at a time per environment
concurrentBuild(true)
throttleConcurrentBuilds {
// A maxTotal of 0 implies unlimited simultaneous jobs, but below we
// restrict one build per environment.
maxTotal(0)
}
configure { project ->
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'paramsToUseForLimit'('ENVIRONMENT')
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'limitOneJobWithMatchingParams'('true')
}

// keep jobs around for 30 days
// allVars contains the value for DAYS_TO_KEEP_BUILD which will be used inside AnalyticsConstants.common_log_rotator
logRotator common_log_rotator(allVars)

wrappers {
timeout {
absolute(60*24) // 24 hours
failBuild()
}
buildUserVars() /* gives us access to BUILD_USER_ID, among other things */
buildName('#${BUILD_NUMBER}, ${ENV,var="ENVIRONMENT"}')
timestamps()
colorizeOutput('xterm')
credentialsBinding {
usernamePassword('GITHUB_USER', 'GITHUB_TOKEN', 'GITHUB_USER_PASS_COMBO');
}
}

parameters {
stringParam('TUBULAR_BRANCH', 'master', 'Repo branch for the tubular scripts.')
stringParam('ENVIRONMENT', '', 'edx environment which contains the user in question, in ENVIRONMENT-DEPLOYMENT format.')
stringParam('RETIREMENT_JOBS_MAILING_LIST', allVars.get('RETIREMENT_JOBS_MAILING_LIST'), 'Space separated list of emails to send notifications to.')
}

// retry cloning repositories
checkoutRetryCount(5)

multiscm {
git {
remote {
url('[email protected]:edx-ops/user-retirement-secure.git')
// using credentials from credentialsBinding.GITHUB_USER_PASS_COMBO
}
branch('master')
extensions {
relativeTargetDirectory('user-retirement-secure')
cloneOptions {
shallow()
timeout(10)
}
cleanBeforeCheckout()
}
}
git {
remote {
url('https://github.com/edx/tubular.git')
}
branch('$TUBULAR_BRANCH')
extensions {
relativeTargetDirectory('tubular')
cloneOptions {
shallow()
timeout(10)
}
cleanBeforeCheckout()
}
}
}

environmentVariables {
env('PARTNER_REPORTS_DIR', '${WORKSPACE}/partner-reports')

// Make sure that when we try to write unicode to the console, it
// correctly encodes to UTF-8 rather than exiting with a UnicodeEncode
// error.
env('PYTHONIOENCODING', 'UTF-8')
env('LC_CTYPE', 'en_US.UTF-8')
}

steps {
shell(dslFactory.readFileFromWorkspace('dataeng/resources/retirement-partner-reporter.sh'))
}

publishers {
// After all the build steps have completed, cleanup the workspace in
// case this worker instance is re-used for a different job.
wsCleanup()

// Send an alerting email upon failure.
extendedEmail {
//recipientList(mailingListMap['retirement_jobs_mailing_list'])
recipientList(allVars.get('RETIREMENT_JOBS_MAILING_LIST'))
triggers {
failure {
attachBuildLog(false) // build log contains PII!
compressBuildLog(false) // build log contains PII!
subject('Build failed in Jenkins: retirement-partner-reporter #${BUILD_NUMBER}')
content('Build #${BUILD_NUMBER} failed.\n\nSee ${BUILD_URL} for details.\n\nTo fix the failure, see https://2u-internal.atlassian.net/wiki/spaces/DE/pages/10780764/Runbook+How+to+fix+a+failed+retirement-partner-reporter+run')
contentType('text/plain')
sendTo {
recipientList()
}
}
}
}
}
}

// ########### retirement-partner-report-cleanup ###########
// Defines the job for running partner reporting
dslFactory.job('retirement-partner-report-cleanup') {
description('Run the partner report cleanup job.')

authorization common_authorization(allVars)

// Only one of these jobs should be running at a time per environment
concurrentBuild(true)
throttleConcurrentBuilds {
// A maxTotal of 0 implies unlimited simultaneous jobs, but below we
// restrict one build per environment.
maxTotal(0)
}
configure { project ->
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'paramsToUseForLimit'('ENVIRONMENT')
project / 'properties' / 'hudson.plugins.throttleconcurrents.ThrottleJobProperty' <<
'limitOneJobWithMatchingParams'('true')
}

// keep jobs around for 30 days
// allVars contains the value for DAYS_TO_KEEP_BUILD which will be used inside AnalyticsConstants.common_log_rotator
logRotator common_log_rotator(allVars)

wrappers {
timeout {
absolute(60*24) // 24 hours
failBuild()
}
buildUserVars() /* gives us access to BUILD_USER_ID, among other things */
buildName('#${BUILD_NUMBER}, ${ENV,var="ENVIRONMENT"}')
timestamps()
colorizeOutput('xterm')
credentialsBinding {
usernamePassword('GITHUB_USER', 'GITHUB_TOKEN', 'GITHUB_USER_PASS_COMBO');
}
}

parameters {
stringParam('TUBULAR_BRANCH', 'master', 'Repo branch for the tubular scripts.')
stringParam('ENVIRONMENT', '', 'edx environment which contains the user in question, in ENVIRONMENT-DEPLOYMENT format.')
stringParam('AGE_IN_DAYS', '60', 'Number of days to keep partner reports.')
stringParam('RETIREMENT_JOBS_MAILING_LIST', allVars.get('RETIREMENT_JOBS_MAILING_LIST'), 'Space separated list of emails to send notifications to.')
}

// retry cloning repositories
checkoutRetryCount(5)

multiscm {
git {
remote {
url('[email protected]:edx-ops/user-retirement-secure.git')
// using credentials from credentialsBinding.GITHUB_USER_PASS_COMBO
}
branch('master')
extensions {
relativeTargetDirectory('user-retirement-secure')
cloneOptions {
shallow()
timeout(10)
}
cleanBeforeCheckout()
}
}
git {
remote {
url('https://github.com/edx/tubular.git')
}
branch('$TUBULAR_BRANCH')
extensions {
relativeTargetDirectory('tubular')
cloneOptions {
shallow()
timeout(10)
}
cleanBeforeCheckout()
}
}
}

steps {
shell(dslFactory.readFileFromWorkspace('dataeng/resources/retirement-partner-report-cleanup.sh'))
}

publishers {
// After all the build steps have completed, cleanup the workspace in
// case this worker instance is re-used for a different job.
wsCleanup()

// Send an alerting email upon failure.
extendedEmail {
//recipientList(mailingListMap['retirement_jobs_mailing_list'])
recipientList(allVars.get('RETIREMENT_JOBS_MAILING_LIST'))
triggers {
failure {
attachBuildLog(false) // build log contains PII!
compressBuildLog(false) // build log contains PII!
subject('Build failed in Jenkins: retirement-partner-report-cleanup #${BUILD_NUMBER}')
content('Build #${BUILD_NUMBER} failed.\n\nSee ${BUILD_URL} for details.')
contentType('text/plain')
sendTo {
recipientList()
}
}
}
}
}
}



// ########### user-retirement-bulk-status ###########
// This defines the retirement bulk status change job for users in the retirement queue.
Expand Down
2 changes: 1 addition & 1 deletion dataeng/jobs/createJobsNew.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ listView('prefect') {
columns DEFAULT_VIEW.call()
}
listView('retirement') {
description('Jobs that are used for user retirement and retirement partner reporting')
description('Jobs that are used for user retirement')
jobs {
regex('.*retirement.*')
}
Expand Down
23 changes: 0 additions & 23 deletions dataeng/resources/retirement-partner-report-cleanup.sh

This file was deleted.

39 changes: 0 additions & 39 deletions dataeng/resources/retirement-partner-reporter.sh

This file was deleted.

0 comments on commit 8829290

Please sign in to comment.