From b7ebe542294a9a0068bb650e59de1de83f7d1794 Mon Sep 17 00:00:00 2001 From: Purna Shah <120611704+purna2U@users.noreply.github.com> Date: Mon, 10 Apr 2023 18:31:42 -0700 Subject: [PATCH 1/5] chore: upload test-hello-world.sh --- dataeng/resources/test-hello-world.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 dataeng/resources/test-hello-world.sh diff --git a/dataeng/resources/test-hello-world.sh b/dataeng/resources/test-hello-world.sh new file mode 100644 index 000000000..d38827b32 --- /dev/null +++ b/dataeng/resources/test-hello-world.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +echo "Hello World" \ No newline at end of file From e5d8ff7f8b6882e263fa6b8e3a631f3794edd5ac Mon Sep 17 00:00:00 2001 From: Purna Shah <120611704+purna2U@users.noreply.github.com> Date: Mon, 10 Apr 2023 19:47:14 -0700 Subject: [PATCH 2/5] chore: upload groovy file --- dataeng/jobs/analytics/TestHelloWorld.groovy | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dataeng/jobs/analytics/TestHelloWorld.groovy diff --git a/dataeng/jobs/analytics/TestHelloWorld.groovy b/dataeng/jobs/analytics/TestHelloWorld.groovy new file mode 100644 index 000000000..4ba4fd76c --- /dev/null +++ b/dataeng/jobs/analytics/TestHelloWorld.groovy @@ -0,0 +1,20 @@ +package analytics +import static org.edx.jenkins.dsl.AnalyticsConstants.common_triggers +import static org.edx.jenkins.dsl.AnalyticsConstants.common_log_rotator +import static org.edx.jenkins.dsl.AnalyticsConstants.common_publishers + +class TestHelloWorld { + public static def job = { dslFactory, allVars -> + dslFactory.job('test-hello-world') { + logRotator common_log_rotator(allVars) + triggers common_triggers(allVars) + wrappers { + timestamps() + } + publishers common_publishers(allVars) + steps { + shell(dslFactory.readFileFromWorkspace('dataeng/resources/test-hello-world.sh')) + } + } + } +} \ No newline at end of file From edbc0797b5fdd1f3a58e6eda72e7b8113700cc22 Mon Sep 17 00:00:00 2001 From: Purna Shah <120611704+purna2U@users.noreply.github.com> Date: Mon, 10 Apr 2023 19:50:47 -0700 Subject: [PATCH 3/5] chore: add test job --- dataeng/jobs/createJobsNew.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dataeng/jobs/createJobsNew.groovy b/dataeng/jobs/createJobsNew.groovy index 578e4fd96..e56d5a219 100644 --- a/dataeng/jobs/createJobsNew.groovy +++ b/dataeng/jobs/createJobsNew.groovy @@ -3,6 +3,7 @@ import static analytics.DBTRun.job as DBTRunJob import static analytics.DBTSourceFreshness.job as DBTSourceFreshnessJob import static analytics.DeployCluster.job as DeployClusterJob import static analytics.EmrCostReporter.job as EmrCostReporterJob +import static analytics.TestHelloWorld.job as TestHelloWorldJob import static analytics.ModelTransfers.job as ModelTransfersJob import static analytics.RetirementJobEdxTriggers.job as RetirementJobEdxTriggersJob import static analytics.RetirementJobs.job as RetirementJobsJob @@ -45,6 +46,7 @@ def taskMap = [ DBT_SOURCE_FRESHNESS_JOB: DBTSourceFreshnessJob, DEPLOY_CLUSTER_JOB: DeployClusterJob, EMR_COST_REPORTER_JOB: EmrCostReporterJob, + TEST_HELLO_WORLD_JOB: TestHelloWorldJob, MODEL_TRANSFERS_JOB: ModelTransfersJob, RETIREMENT_JOB_EDX_TRIGGERS_JOB: RetirementJobEdxTriggersJob, RETIREMENT_JOBS_JOB: RetirementJobsJob, From dc2b32bcc27c515b0ca7ed4fe7ec1cefdabeb0e4 Mon Sep 17 00:00:00 2001 From: Purna Shah <120611704+purna2U@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:22:41 -0700 Subject: [PATCH 4/5] chore: add parameter back to debug --- dataeng/jobs/analytics/TestHelloWorld.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dataeng/jobs/analytics/TestHelloWorld.groovy b/dataeng/jobs/analytics/TestHelloWorld.groovy index 4ba4fd76c..c88a1ed85 100644 --- a/dataeng/jobs/analytics/TestHelloWorld.groovy +++ b/dataeng/jobs/analytics/TestHelloWorld.groovy @@ -6,6 +6,9 @@ import static org.edx.jenkins.dsl.AnalyticsConstants.common_publishers class TestHelloWorld { public static def job = { dslFactory, allVars -> dslFactory.job('test-hello-world') { + parameters { + stringParam('NOTIFY', allVars.get('NOTIFY','$PAGER_NOTIFY'), 'Space separated list of emails to send notifications to.') + } logRotator common_log_rotator(allVars) triggers common_triggers(allVars) wrappers { @@ -17,4 +20,4 @@ class TestHelloWorld { } } } -} \ No newline at end of file +} From 15255b96356da6fa1dbc35dff632afc4aa2edb34 Mon Sep 17 00:00:00 2001 From: Purna Shah <120611704+purna2U@users.noreply.github.com> Date: Tue, 11 Apr 2023 12:24:07 -0700 Subject: [PATCH 5/5] chore: decided to try removing common_publishers --- dataeng/jobs/analytics/TestHelloWorld.groovy | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dataeng/jobs/analytics/TestHelloWorld.groovy b/dataeng/jobs/analytics/TestHelloWorld.groovy index c88a1ed85..ae8632369 100644 --- a/dataeng/jobs/analytics/TestHelloWorld.groovy +++ b/dataeng/jobs/analytics/TestHelloWorld.groovy @@ -6,15 +6,11 @@ import static org.edx.jenkins.dsl.AnalyticsConstants.common_publishers class TestHelloWorld { public static def job = { dslFactory, allVars -> dslFactory.job('test-hello-world') { - parameters { - stringParam('NOTIFY', allVars.get('NOTIFY','$PAGER_NOTIFY'), 'Space separated list of emails to send notifications to.') - } logRotator common_log_rotator(allVars) triggers common_triggers(allVars) wrappers { timestamps() } - publishers common_publishers(allVars) steps { shell(dslFactory.readFileFromWorkspace('dataeng/resources/test-hello-world.sh')) }