Skip to content

Commit

Permalink
feat: Package as a debian artifact
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Griffiths <[email protected]>
  • Loading branch information
akash1810 and Joemgru committed Jan 30, 2025
1 parent 81e74b6 commit d976982
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
-XX:+UseParallelGC \
-DAPP_SECRET="fake_secret" \
-Duser.timezone=Australia/Sydney \
-jar ./bin/sbt-launch.jar clean compile assets scalafmtCheckAll test Universal/packageBin
-jar ./bin/sbt-launch.jar clean compile assets scalafmtCheckAll test Universal/packageBin Debian/packageBin
- name: Test Summary
uses: test-summary/action@v2
Expand Down
15 changes: 9 additions & 6 deletions project/ProjectSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ package com.gu

import com.gu.versioninfo.VersionInfo
import com.typesafe.sbt.packager.universal.UniversalPlugin
import sbt._
import sbt.Keys._
import com.gu.Dependencies._
import play.sbt.{PlayPekkoHttpServer, PlayNettyServer, PlayScala}
import sbt.*
import sbt.Keys.*
import com.gu.Dependencies.*
import play.sbt.{PlayNettyServer, PlayPekkoHttpServer, PlayScala}
import com.typesafe.sbt.SbtNativePackager.Universal
import com.typesafe.sbt.packager.Keys.packageName
import com.typesafe.sbt.packager.archetypes.systemloader.SystemdPlugin
import com.typesafe.sbt.packager.debian.JDebPackaging
import sbtbuildinfo.{BuildInfoKey, BuildInfoOption, BuildInfoPlugin}
import sbtbuildinfo.BuildInfoKeys.{buildInfoKeys, buildInfoOptions, buildInfoPackage}

Expand Down Expand Up @@ -60,7 +62,8 @@ object ProjectSettings {
}

val frontendTestSettings = Seq(
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o"),
Test / testOptions += Tests
.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o"),
concurrentRestrictions in Global := List(Tags.limit(Tags.Test, 4)),
// Copy unit test resources https://groups.google.com/d/topic/play-framework/XD3X6R-s5Mc/discussion
Test / unmanagedClasspath += (baseDirectory map { bd => Attributed.blank(bd / "test") }).value,
Expand Down Expand Up @@ -101,7 +104,7 @@ object ProjectSettings {

def application(applicationName: String): Project = {
Project(applicationName, file(applicationName))
.enablePlugins(PlayScala, UniversalPlugin, BuildInfoPlugin)
.enablePlugins(PlayScala, UniversalPlugin, BuildInfoPlugin, JDebPackaging, SystemdPlugin)
.settings(frontendDependencyManagementSettings)
.settings(frontendCompilationSettings)
.settings(frontendTestSettings)
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ logLevel := Level.Warn
libraryDependencies ++= Seq(
"joda-time" % "joda-time" % "2.12.7",
"org.joda" % "joda-convert" % "2.2.3",
"org.vafer" % "jdeb" % "1.13" artifacts Artifact("jdeb", "jar", "jar"),
)

resolvers ++= Resolver.sonatypeOssRepos("releases")
Expand Down

0 comments on commit d976982

Please sign in to comment.