diff --git a/.github/workflows/event-consumer.yml b/.github/workflows/event-consumer.yml new file mode 100644 index 000000000..0f4e817d5 --- /dev/null +++ b/.github/workflows/event-consumer.yml @@ -0,0 +1,55 @@ +name: Event consumer + +on: + push: + paths: + - eventconsumer/** + - commoneventconsumer/** + - project/** + - build.sbt + - .github/workflows/event-consumer.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project eventconsumer" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp eventconsumer/target/scala-*/eventconsumer.jar . + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:eventconsumer + buildNumberOffset: 4147 + configPath: eventconsumer/riff-raff.yaml + contentDirectories: | + eventconsumer: + - eventconsumer.jar + mobile-notifications-eventconsumer-cfn: + - eventconsumer/cfn.yaml diff --git a/.github/workflows/fake-breaking-news.yml b/.github/workflows/fake-breaking-news.yml new file mode 100644 index 000000000..f9c4a9a21 --- /dev/null +++ b/.github/workflows/fake-breaking-news.yml @@ -0,0 +1,57 @@ +name: Fake breaking news lambda + +on: + push: + paths: + - fakebreakingnewslambda/** + - common/** + - commoneventconsumer/** + - api-models/** + - project/** + - build.sbt + - .github/workflows/fake-breaking-news.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project fakebreakingnewslambda" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp fakebreakingnewslambda/target/scala-*/fakebreakingnewslambda.jar . + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:fakebreakingnewslambda + buildNumberOffset: 4147 + configPath: fakebreakingnewslambda/riff-raff.yaml + contentDirectories: | + fakebreakingnewslambda: + - fakebreakingnewslambda.jar + fakebreakingnewslambda-cfn: + - fakebreakingnewslambda/fakebreakingnewslambda-cfn.yaml diff --git a/.github/workflows/football.yml b/.github/workflows/football.yml new file mode 100644 index 000000000..fc1dd62fe --- /dev/null +++ b/.github/workflows/football.yml @@ -0,0 +1,55 @@ +name: Football + +on: + push: + paths: + - football/** + - api-models/** + - project/** + - build.sbt + - .github/workflows/football.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project football" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp football/target/scala-*/football.jar . + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:football + buildNumberOffset: 4147 + configPath: football/riff-raff.yaml + contentDirectories: | + football: + - football.jar + mobile-notifications-football-cfn: + - football/cfn.yaml diff --git a/.github/workflows/notification-worker-lambdas.yml b/.github/workflows/notification-worker-lambdas.yml new file mode 100644 index 000000000..f1da0b358 --- /dev/null +++ b/.github/workflows/notification-worker-lambdas.yml @@ -0,0 +1,108 @@ +name: Notification worker lambdas + +on: + push: + paths: + - notificationworkerlambda/** + - common/** + - commoneventconsumer/** + - cdk/** + - project/** + - build.sbt + - .github/workflows/notification-worker-lambdas.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: actions/setup-node@v3 + with: + cache: npm + cache-dependency-path: cdk/package-lock.json + node-version-file: .nvmrc + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.AWS_ROLE_ARN }} + + - name: Login to ECR + uses: aws-actions/amazon-ecr-login@v1 + with: + mask-password: 'true' + + - name: Compile and test + run: sbt "project notificationworkerlambda" "compile" "test" + + - name: Build docker image + run: sbt docker:publishLocal + + - name: Publish docker image + run: | + BUILD_NUMBER_WITH_OFFSET=$(($BUILD_NUMBER+4147)) + docker tag notificationworkerlambda:DEV $NOTIFICATION_LAMBDA_REPOSITORY_URL:$BUILD_NUMBER_WITH_OFFSET + docker push ${NOTIFICATION_LAMBDA_REPOSITORY_URL}:${BUILD_NUMBER_WITH_OFFSET} + env: + NOTIFICATION_LAMBDA_REPOSITORY_ID: ${{ secrets.NOTIFICATION_LAMBDA_REPOSITORY_ID }} + NOTIFICATION_LAMBDA_REPOSITORY_URL: ${{ secrets.NOTIFICATION_LAMBDA_REPOSITORY_URL }} + BUILD_NUMBER: ${{ github.run_number }} + + - name: CDK synth (worker lambda cdk directory) + working-directory: notificationworkerlambda/cdk + run: | + yarn install + yarn test + yarn synth + + - name: CDK synth (root cdk directory) + working-directory: cdk + run: | + npm install + npm run lint + npm test + npm run synth + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:notificationworkerlambda + buildNumberOffset: 4147 + configPath: notificationworkerlambda/riff-raff.yaml + contentDirectories: | + mobile-notifications-harvester-cfn: + - notificationworkerlambda/harvester-cfn.yaml + mobile-notifications-workers-cfn: + - notificationworkerlambda/cdk/cdk.out/SenderWorkerStack-CODE.template.json + - notificationworkerlambda/cdk/cdk.out/SenderWorkerStack-PROD.template.json + mobile-notifications-topic-counter-cfn: + - notificationworkerlambda/topic-counter-cfn.yaml + mobile-notifications-registration-cleaning-worker-cfn: + - notificationworkerlambda/registration-cleaning-worker-cfn.yaml + mobile-notifications-expired-registration-cleaner-cfn: + - notificationworkerlambda/expired-registration-cleaner-cfn.yaml + registrations-db-proxy-cfn: + - cdk/cdk.out/RegistrationsDbProxy-CODE.template.json + - cdk/cdk.out/RegistrationsDbProxy-PROD.template.json \ No newline at end of file diff --git a/.github/workflows/notification.yml b/.github/workflows/notification.yml new file mode 100644 index 000000000..2ce957b55 --- /dev/null +++ b/.github/workflows/notification.yml @@ -0,0 +1,54 @@ +name: Notification + +on: + push: + paths: + - notification/** + - common/** + - commoneventconsumer/** + - commonscheduleddynamodb/** + - project/** + - build.sbt + - .github/workflows/notification.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and package + run: sbt "project notification" "compile" "test" "debian:packageBin" + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:notification + buildNumberOffset: 4147 + configPath: notification/conf/riff-raff.yaml + contentDirectories: | + notification: + - notification/target/notification_1.0-latest_all.deb + notification-cfn: + - notification/conf/notification.yaml diff --git a/.github/workflows/registration.yml b/.github/workflows/registration.yml new file mode 100644 index 000000000..e9b6294e4 --- /dev/null +++ b/.github/workflows/registration.yml @@ -0,0 +1,70 @@ +name: Registration + +on: + push: + paths: + - registration/** + - common/** + - commoneventconsumer/** + - commontest/** + - cdk/** + - project/** + - build.sbt + - .github/workflows/registration.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: actions/setup-node@v3 + with: + cache: npm + cache-dependency-path: cdk/package-lock.json + node-version-file: .nvmrc + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: CDK synth + run: | + cd cdk + npm install + npm run lint + npm test + npm run synth + + - name: Compile, test and package + run: sbt "project registration" "compile" "test" "debian:packageBin" + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:registration + buildNumberOffset: 4147 + configPath: registration/conf/riff-raff.yaml + contentDirectories: | + registration: + - registration/target/registration_1.0-latest_all.deb + registration-cfn: + - cdk/cdk.out/Registration-CODE.template.json + - cdk/cdk.out/Registration-PROD.template.json diff --git a/.github/workflows/report-extractor.yml b/.github/workflows/report-extractor.yml new file mode 100644 index 000000000..bfe2cf08d --- /dev/null +++ b/.github/workflows/report-extractor.yml @@ -0,0 +1,56 @@ +name: Report extractor + +on: + push: + paths: + - reportextractor/** + - common/** + - commoneventconsumer/** + - project/** + - build.sbt + - .github/workflows/report-extractor.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project reportextractor" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp reportextractor/target/scala-*/reportextractor.jar . + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:reportextractor + buildNumberOffset: 4147 + configPath: reportextractor/riff-raff.yaml + contentDirectories: | + reportextractor: + - reportextractor.jar + reportextractor-cfn: + - reportextractor/cfn.yaml diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml new file mode 100644 index 000000000..8d6055781 --- /dev/null +++ b/.github/workflows/report.yml @@ -0,0 +1,54 @@ +name: Report + +on: + push: + paths: + - report/** + - common/** + - commoneventconsumer/** + - commontest/** + - project/** + - build.sbt + - .github/workflows/report.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and package + run: sbt "project report" "compile" "test" "debian:packageBin" + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:report + buildNumberOffset: 4147 + configPath: report/conf/riff-raff.yaml + contentDirectories: | + report: + - report/target/report_1.0-latest_all.deb + report-cfn: + - report/conf/report.yaml diff --git a/.github/workflows/schedule-lambda.yml b/.github/workflows/schedule-lambda.yml new file mode 100644 index 000000000..eac034d01 --- /dev/null +++ b/.github/workflows/schedule-lambda.yml @@ -0,0 +1,55 @@ +name: Schedule lambda + +on: + push: + paths: + - schedulelambda/** + - commonscheduledynamodb/** + - project/** + - build.sbt + - .github/workflows/schedule-lambda.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project schedule" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp schedulelambda/target/scala-*/schedule.jar . + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:schedule + buildNumberOffset: 4147 + configPath: schedulelambda/riff-raff.yaml + contentDirectories: | + schedule: + - schedule.jar + schedule-cfn: + - schedulelambda/cfn.yaml diff --git a/.github/workflows/slo-monitor.yml b/.github/workflows/slo-monitor.yml new file mode 100644 index 000000000..5166a7aa3 --- /dev/null +++ b/.github/workflows/slo-monitor.yml @@ -0,0 +1,71 @@ +name: SLO monitor + +on: + push: + paths: + - slomonitor/** + - commoneventconsumer/** + - cdk/** + - project/** + - build.sbt + - .github/workflows/slo-monitor.yml + workflow_dispatch: + +# allow queued workflows to interrupt previous runs +concurrency: + group: ${{ github.workflow }}-${{ github.event.number || github.ref }} + cancel-in-progress: true + +permissions: + id-token: write + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: corretto + cache: sbt + java-version: 11 + + - uses: actions/setup-node@v3 + with: + cache: npm + cache-dependency-path: cdk/package-lock.json + node-version-file: .nvmrc + + - uses: aws-actions/configure-aws-credentials@v2 + with: + aws-region: eu-west-1 + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + + - name: Compile, test and assembly + run: sbt "project slomonitor" "compile" "test" "assembly" + + - name: Copy jar to root + run: cp slomonitor/target/scala-*/slomonitor.jar . + + - name: CDK synth + run: | + cd cdk + npm install + npm run lint + npm test + npm run synth + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2 + with: + projectName: mobile-n10n:slomonitor + buildNumberOffset: 4147 + configPath: slomonitor/riff-raff.yaml + contentDirectories: | + slomonitor: + - slomonitor.jar + mobile-notifications-slo-monitor-cfn: + - cdk/cdk.out/SloMonitor-CODE.template.json + - cdk/cdk.out/SloMonitor-PROD.template.json diff --git a/build.sbt b/build.sbt index e6eb52a55..a4ce79e72 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,3 @@ -import com.gu.riffraff.artifact.RiffRaffArtifact.autoImport._ import play.sbt.PlayImport.specs2 import sbt.Keys.{libraryDependencies, mainClass} import sbtassembly.AssemblyPlugin.autoImport.{assemblyJarName, assemblyMergeStrategy} @@ -44,7 +43,6 @@ val standardSettings = Seq[Setting[_]]( "Guardian GitHub Releases" at "https://guardian.github.com/maven/repo-releases", "Guardian GitHub Snapshots" at "https://guardian.github.com/maven/repo-snapshots" ), - riffRaffManifestProjectName := s"mobile-n10n:${name.value}", libraryDependencies ++= Seq( "com.github.nscala-time" %% "nscala-time" % "2.32.0", "com.softwaremill.macwire" %% "macros" % "2.5.8" % "provided", @@ -140,7 +138,7 @@ lazy val commonscheduledynamodb = project lazy val registration = project .dependsOn(common, commontest % "test->test") - .enablePlugins(SystemdPlugin, PlayScala, RiffRaffArtifact, JDebPackaging) + .enablePlugins(SystemdPlugin, PlayScala, JDebPackaging) .settings(standardSettings: _*) .settings( fork := true, @@ -153,9 +151,6 @@ lazy val registration = project logback, "org.tpolecat" %% "doobie-h2" % doobieVersion % Test ), - riffRaffPackageType := (Debian / packageBin).value, - riffRaffArtifactResources += (file(s"cdk/cdk.out/Registration-CODE.template.json"), s"registration-cfn/Registration-CODE.template.json"), - riffRaffArtifactResources += (file(s"cdk/cdk.out/Registration-PROD.template.json"), s"registration-cfn/Registration-PROD.template.json"), Debian / packageName := name.value, version := projectVersion ) @@ -163,7 +158,7 @@ lazy val registration = project lazy val notification = project .dependsOn(common) .dependsOn(commonscheduledynamodb) - .enablePlugins(SystemdPlugin, PlayScala, RiffRaffArtifact, JDebPackaging) + .enablePlugins(SystemdPlugin, PlayScala, JDebPackaging) .settings(standardSettings: _*) .settings( fork := true, @@ -176,15 +171,13 @@ lazy val notification = project logback, "com.amazonaws" % "aws-java-sdk-sqs" % awsSdkVersion ), - riffRaffPackageType := (Debian / packageBin).value, - riffRaffArtifactResources += (file(s"notification/conf/${name.value}.yaml"), s"${name.value}-cfn/cfn.yaml"), Debian / packageName := name.value, version := projectVersion ) lazy val report = project .dependsOn(common, commontest % "test->test") - .enablePlugins(SystemdPlugin, PlayScala, RiffRaffArtifact, JDebPackaging) + .enablePlugins(SystemdPlugin, PlayScala, JDebPackaging) .settings(standardSettings: _*) .settings( fork := true, @@ -197,8 +190,6 @@ lazy val report = project libraryDependencies ++= Seq( logback ), - riffRaffPackageType := (Debian / packageBin).value, - riffRaffArtifactResources += (file(s"report/conf/${name.value}.yaml"), s"${name.value}-cfn/cfn.yaml"), Debian / packageName := name.value, version := projectVersion ) @@ -256,7 +247,7 @@ lazy val apiModels = { def lambda(projectName: String, directoryName: String, mainClassName: Option[String] = None): Project = Project(projectName, file(directoryName)) - .enablePlugins(RiffRaffArtifact, AssemblyPlugin) + .enablePlugins(AssemblyPlugin) .settings( organization := "com.gu", resolvers ++= Seq( @@ -279,10 +270,6 @@ def lambda(projectName: String, directoryName: String, mainClassName: Option[Str }, Test / run / fork := true, scalacOptions := compilerOptions, - riffRaffPackageType := assembly.value, - riffRaffUploadArtifactBucket := Option("riffraff-artifact"), - riffRaffUploadManifestBucket := Option("riffraff-builds"), - riffRaffManifestProjectName := s"mobile-n10n:$projectName", mainClass := mainClassName, // Workaround Mockito causes deadlock on SBT classloaders: https://github.com/sbt/sbt/issues/3022 Test / parallelExecution := false @@ -307,7 +294,6 @@ lazy val schedulelambda = lambda("schedule", "schedulelambda") excludeDependencies ++= Seq( ExclusionRule("com.typesafe.play", "play-ahc-ws_2.13") ), - riffRaffArtifactResources += (file(s"schedulelambda/cfn.yaml"), s"${name.value}-cfn/cfn.yaml"), ) } @@ -333,7 +319,6 @@ lazy val football = lambda("football", "football") ExclusionRule("com.typesafe.play", "play-ahc-ws_2.13"), ExclusionRule("software.amazon.awssdk", "ec2") ), - riffRaffArtifactResources += (baseDirectory.value / "cfn.yaml", "mobile-notifications-football-cfn/cfn.yaml") ) lazy val eventconsumer = lambda("eventconsumer", "eventconsumer", Some("com.gu.notifications.events.LocalRun")) @@ -347,7 +332,6 @@ lazy val eventconsumer = lambda("eventconsumer", "eventconsumer", Some("com.gu.n "org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2", "io.netty" % "netty-codec-http2" % nettyVersion ), - riffRaffArtifactResources += ((baseDirectory.value / "cfn.yaml"), s"mobile-notifications-eventconsumer-cfn/cfn.yaml") ) }) @@ -363,8 +347,6 @@ lazy val sloMonitor = lambda("slomonitor", "slomonitor", Some("com.gu.notificati "io.netty" % "netty-codec-http" % nettyVersion, "io.netty" % "netty-codec-http2" % nettyVersion, ), - riffRaffArtifactResources +=(file("cdk/cdk.out/SloMonitor-CODE.template.json"), s"mobile-notifications-slo-monitor-cfn/SloMonitor-CODE.template.json"), - riffRaffArtifactResources += (file("cdk/cdk.out/SloMonitor-PROD.template.json"), s"mobile-notifications-slo-monitor-cfn/SloMonitor-PROD.template.json"), Test / fork := true, Test / envVars := Map("STAGE" -> "TEST") ) @@ -438,15 +420,6 @@ lazy val notificationworkerlambda = lambda("notificationworkerlambda", "notifica excludeDependencies ++= Seq( ExclusionRule("com.typesafe.play", "play-ahc-ws_2.13") ), - riffRaffArtifactResources += (baseDirectory.value / "harvester-cfn.yaml", s"mobile-notifications-harvester-cfn/harvester-cfn.yaml"), - // cdk synthesised cloudformation template - riffRaffArtifactResources += (baseDirectory.value / "cdk" / "cdk.out" / "SenderWorkerStack-CODE.template.json", "mobile-notifications-workers-cfn/SenderWorkerStack-CODE.template.json"), - riffRaffArtifactResources += (baseDirectory.value / "cdk" / "cdk.out" / "SenderWorkerStack-PROD.template.json", "mobile-notifications-workers-cfn/SenderWorkerStack-PROD.template.json"), - riffRaffArtifactResources += (baseDirectory.value / "registration-cleaning-worker-cfn.yaml", s"mobile-notifications-registration-cleaning-worker-cfn/registration-cleaning-worker-cfn.yaml"), - riffRaffArtifactResources += (baseDirectory.value / "topic-counter-cfn.yaml", s"mobile-notifications-topic-counter-cfn/topic-counter-cfn.yaml"), - riffRaffArtifactResources += (baseDirectory.value / "expired-registration-cleaner-cfn.yaml", s"mobile-notifications-expired-registration-cleaner-cfn/expired-registration-cleaner-cfn.yaml"), - riffRaffArtifactResources += (file("cdk/cdk.out/RegistrationsDbProxy-CODE.template.json"), s"registrations-db-proxy-cfn/RegistrationsDbProxy-CODE.template.json"), - riffRaffArtifactResources += (file("cdk/cdk.out/RegistrationsDbProxy-PROD.template.json"), s"registrations-db-proxy-cfn/RegistrationsDbProxy-PROD.template.json") ) lazy val fakebreakingnewslambda = lambda("fakebreakingnewslambda", "fakebreakingnewslambda", Some("fakebreakingnews.LocalRun")) @@ -459,13 +432,11 @@ lazy val fakebreakingnewslambda = lambda("fakebreakingnewslambda", "fakebreaking excludeDependencies ++= Seq( ExclusionRule("com.typesafe.play", "play-ahc-ws_2.13") ), - riffRaffArtifactResources += (baseDirectory.value / "fakebreakingnewslambda-cfn.yaml", "fakebreakingnewslambda-cfn/fakebreakingnewslambda-cfn.yaml") ) lazy val reportExtractor = lambda("reportextractor", "reportextractor", Some("com.gu.notifications.extractor.LocalRun")) .dependsOn(common) .settings( - riffRaffArtifactResources += (baseDirectory.value / "cfn.yaml", "reportextractor-cfn/cfn.yaml"), excludeDependencies ++= Seq( ExclusionRule("com.typesafe.play", "play-ahc-ws_2.13") ) diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 2ff392489..000000000 --- a/deploy.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -BUILD_NUMBER=${BUILD_NUMBER:-unknown} - -# login with docker to the ecr repository - -# as per: - -AUTH_TOKEN=$(aws ecr get-authorization-token --registry-ids ${NOTIFICATION_LAMBDA_REPOSITORY_ID} --output text --query 'authorizationData[].authorizationToken' --region eu-west-1 | base64 --decode | cut -d: -f2) - -docker login -u AWS -p ${AUTH_TOKEN} ${NOTIFICATION_LAMBDA_REPOSITORY_URL} - -docker push ${NOTIFICATION_LAMBDA_REPOSITORY_URL}:${BUILD_NUMBER} diff --git a/notification/conf/riff-raff.yaml b/notification/conf/riff-raff.yaml index 88e4d7d94..b295e2b6d 100644 --- a/notification/conf/riff-raff.yaml +++ b/notification/conf/riff-raff.yaml @@ -9,7 +9,7 @@ deployments: amiTags: Recipe: mobile-java11-jammy-ARM AmigoStage: PROD - templatePath: cfn.yaml + templatePath: notification.yaml templateStageParameters: CODE: SloSqsQueueArn: /notifications/CODE/mobile-notifications/notifications.queues.sloMonitoringArn diff --git a/project/plugins.sbt b/project/plugins.sbt index 5f8249ac2..437b5f207 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,8 +9,6 @@ addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.19") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1") -addSbtPlugin("com.gu" % "sbt-riffraff-artifact" % "1.1.18") - addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1") addSbtPlugin("com.localytics" % "sbt-dynamodb" % "2.0.3") diff --git a/report/conf/riff-raff.yaml b/report/conf/riff-raff.yaml index 5dd016bd1..66e04d119 100644 --- a/report/conf/riff-raff.yaml +++ b/report/conf/riff-raff.yaml @@ -9,7 +9,7 @@ deployments: amiTags: Recipe: mobile-java11-jammy-ARM AmigoStage: PROD - templatePath: cfn.yaml + templatePath: report.yaml report: type: autoscaling parameters: