This repository was archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Initial release #1
Open
carlpulley
wants to merge
24
commits into
master
Choose a base branch
from
feature/initial-release
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e773fdc
Initial release
df22360
Added in Jenkinsfile
7552503
Parallel Jenkinsfile building
d47b452
Added in Scala configuration
01901f0
Cross scala building fix
7ed6110
Fix for Jenkinsfile syntax error
2645c3a
Testing bug fixes
471161b
Logging configuration
4c0c4a8
Added test for log format code.
d164c24
Docker logging tests
2f761e9
Test coverage changes
0ceb4e9
Split out environment variables from config data
0ca1f44
Coverage fix
303ea08
minor fix
4fcc0d1
Split core/test sources into 2.11 and 2.12 specific code
15bd0b3
Fix for cross compiling
d403c81
Scaladoc fix
781efc8
Removed parallel Jenkins build due to ivy deadlocking issues
32e6ec2
Added Jenkins html publisher
36524a9
Jenkinsfile fix
bc008e3
Library evictions resolved
2d07d36
Added in an IOAutomata case class
bb4b546
Refactored log sources so that they have type parameters
82465cd
Docker compose files now specified by caller
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| ######################### | ||
| # .gitignore file for Xcode4 / OS X Source projects | ||
| # | ||
| # Version 2.0 | ||
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | ||
| # | ||
| # 2013 updates: | ||
| # - fixed the broken "save personal Schemes" | ||
| # | ||
| # NB: if you are storing "built" products, this WILL NOT WORK, | ||
| # and you should use a different .gitignore (or none at all) | ||
| # This file is for SOURCE projects, where there are many extra | ||
| # files that we want to exclude | ||
| # | ||
| ######################### | ||
|
|
||
| ##### | ||
| # OS X temporary files that should never be committed | ||
|
|
||
| .DS_Store | ||
| *.swp | ||
| *.lock | ||
|
|
||
| pebble/build | ||
| aa/build | ||
|
|
||
| .vagrant | ||
|
|
||
| #### | ||
| # Xcode temporary files that should never be committed | ||
| # | ||
| # NB: NIB/XIB files still exist even on Storyboard projects, so we want this... | ||
|
|
||
| *~.nib | ||
|
|
||
|
|
||
| #### | ||
| # Xcode build files - | ||
| # | ||
| # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" | ||
|
|
||
| DerivedData/ | ||
|
|
||
| # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" | ||
|
|
||
| ## / /build/ | ||
|
|
||
|
|
||
| ##### | ||
| # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) | ||
| # | ||
| # This is complicated: | ||
| # | ||
| # SOMETIMES you need to put this file in version control. | ||
| # Apple designed it poorly - if you use "custom executables", they are | ||
| # saved in this file. | ||
| # 99% of projects do NOT use those, so they do NOT want to version control this file. | ||
| # ..but if you're in the 1%, comment out the line "*.pbxuser" | ||
|
|
||
| *.pbxuser | ||
| *.mode1v3 | ||
| *.mode2v3 | ||
| *.perspectivev3 | ||
| # NB: also, whitelist the default ones, some projects need to use these | ||
| !default.pbxuser | ||
| !default.mode1v3 | ||
| !default.mode2v3 | ||
| !default.perspectivev3 | ||
|
|
||
|
|
||
| #### | ||
| # Xcode 4 - semi-personal settings | ||
| # | ||
| # | ||
| # OPTION 1: --------------------------------- | ||
| # throw away ALL personal settings (including custom schemes! | ||
| # - unless they are "shared") | ||
| # | ||
| # NB: this is exclusive with OPTION 2 below | ||
| xcuserdata | ||
|
|
||
| # OPTION 2: --------------------------------- | ||
| # get rid of ALL personal settings, but KEEP SOME OF THEM | ||
| # - NB: you must manually uncomment the bits you want to keep | ||
| # | ||
| # NB: this is exclusive with OPTION 1 above | ||
| # | ||
| #xcuserdata/**/* | ||
|
|
||
| # (requires option 2 above): Personal Schemes | ||
| # | ||
| #!xcuserdata/**/xcschemes/* | ||
|
|
||
| #### | ||
| # XCode 4 workspaces - more detailed | ||
| # | ||
| # Workspaces are important! They are a core feature of Xcode - don't exclude them :) | ||
| # | ||
| # Workspace layout is quite spammy. For reference: | ||
| # | ||
| # /(root)/ | ||
| # /(project-name).xcodeproj/ | ||
| # project.pbxproj | ||
| # /project.xcworkspace/ | ||
| # contents.xcworkspacedata | ||
| # /xcuserdata/ | ||
| # /(your name)/xcuserdatad/ | ||
| # UserInterfaceState.xcuserstate | ||
| # /xcsshareddata/ | ||
| # /xcschemes/ | ||
| # (shared scheme name).xcscheme | ||
| # /xcuserdata/ | ||
| # /(your name)/xcuserdatad/ | ||
| # (private scheme).xcscheme | ||
| # xcschememanagement.plist | ||
| # | ||
| # | ||
|
|
||
| #### | ||
| # Xcode 4 - Deprecated classes | ||
| # | ||
| # Allegedly, if you manually "deprecate" your classes, they get moved here. | ||
| # | ||
| # We're using source-control, so this is a "feature" that we do not want! | ||
|
|
||
| *.moved-aside | ||
|
|
||
|
|
||
| #### | ||
| # UNKNOWN: recommended by others, but I can't discover what these files are | ||
| # | ||
| # ...none. Everything is now explained. | ||
| .lock-waf_darwin_build | ||
|
|
||
| .idea | ||
|
|
||
| Pods | ||
| *.xcworkspace | ||
|
|
||
| target | ||
|
|
||
| journal | ||
| snapshots | ||
|
|
||
| native.iml | ||
|
|
||
| checkpoint | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| -XX:MaxMetaspaceSize=256m | ||
| -Xss2m | ||
| -Xms1g | ||
| -Xmx1g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| pipeline { | ||
| agent { | ||
| label 'sbt-slave' | ||
| } | ||
|
|
||
| stages { | ||
| stage('Cross Scala Build Pipeline') { | ||
| steps { | ||
| ansiColor('xterm') { | ||
| script { | ||
| // The following values need to be synced with those in build.sbt and CommonProject.scala | ||
| def crossScalaVersions = ["2.11.12", "2.12.4"] | ||
| crossScalaVersions.each { SCALA_VERSION -> | ||
| def scalaVersion = SCALA_VERSION.substring(0, 4) | ||
| sh "sbt ++$SCALA_VERSION clean compile test:compile doc" | ||
| sh "sbt ++$SCALA_VERSION coverage test" | ||
| sh "sbt ++$SCALA_VERSION coverageReport" | ||
| sh "sbt ++$SCALA_VERSION coverageAggregate" | ||
| publishHTML([ | ||
| allowMissing : false, | ||
| alwaysLinkToLastBuild: false, | ||
| keepAll : true, | ||
| reportDir : "target/scala-$scalaVersion/scoverage-report", | ||
| reportFiles : "index.html", | ||
| reportName : "Scala $scalaVersion Unit Test Coverage Report" | ||
| ]) | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
|
|
||
| Apache License | ||
| Version 2.0, January 2004 | ||
| http://www.apache.org/licenses/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Logging Testkit | ||
|
|
||
| TODO: | ||
|
|
||
| # Publishing and Releasing | ||
|
|
||
| Once we have merged a set of feature branches into the `master` branch and are ready to cut a release: | ||
| ``` | ||
| git tag -s vX.Y.Z | ||
| git push -tags | ||
| sbt ghpagesPushSite | ||
| sbt "+ publishSigned" | ||
| sbt sonatypeRelease | ||
| ``` | ||
|
|
||
| Code should now be available from Maven Central at version X.Y.Z. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // Copyright 2018 Cake Solutions Limited | ||
|
|
||
| import Dependencies._ | ||
|
|
||
| enablePlugins(GitBranchPrompt) | ||
| enablePlugins(GitVersioning) | ||
| enablePlugins(SiteScaladocPlugin) | ||
|
|
||
| // The following values need to be synced with those in Jenkinsfile | ||
| crossScalaVersions := Seq("2.11.12", "2.12.4") | ||
| scalaVersion := crossScalaVersions.value.head | ||
|
|
||
| Publish.settings | ||
|
|
||
| git.useGitDescribe := true | ||
| ivyLoggingLevel := UpdateLogging.Quiet | ||
|
|
||
| lazy val core = project.in(file("core")) | ||
| .settings(CommonProject.settings) | ||
| .settings(ScalaDoc.settings) | ||
| .settings( | ||
| name := "logging-testkit", | ||
| publishArtifact in (Test, packageBin) := true, | ||
| libraryDependencies ++= Seq( | ||
| circe.core, | ||
| circe.generic, | ||
| circe.parser, | ||
| logback, | ||
| logging, | ||
| monix.core, | ||
| monix.reactive, | ||
| scalatest % Test, | ||
| scalacheck % Test | ||
| ), | ||
| coverageMinimum := 75 | ||
| ) | ||
|
|
||
| lazy val docker = project.in(file("instrumentation/docker")) | ||
| .dependsOn(core % "compile->compile; test->test") | ||
| .settings(CommonProject.settings) | ||
| .settings( | ||
| name := "logging-testkit-docker", | ||
| coverageMinimum := 70 | ||
| ) | ||
|
|
||
| lazy val elasticsearch = project.in(file("instrumentation/elasticsearch")) | ||
| .dependsOn(core % "compile->compile; test->test") | ||
| .settings(CommonProject.settings) | ||
| .settings( | ||
| name := "logging-testkit-elasticsearch", | ||
| libraryDependencies += aws.logs, | ||
| coverageMinimum := 100 | ||
| ) |
37 changes: 37 additions & 0 deletions
37
core/src/main/scala/net/cakesolutions/testkit/config/Configuration.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // Copyright 2018 Cake Solutions Limited | ||
|
|
||
| package net.cakesolutions.testkit.config | ||
|
|
||
| import scala.concurrent.duration._ | ||
|
|
||
| import net.cakesolutions.testkit.config.Environment.Optional | ||
|
|
||
| /** | ||
| * Library configuration. | ||
| */ | ||
| object Configuration { | ||
| object Logging { | ||
| /** | ||
| * Logger name. | ||
| */ | ||
| val name: String = "LoggingTestkit" | ||
| } | ||
|
|
||
| object Timeout { | ||
| /** | ||
| * @see net.cakesolutions.testkit.config.Environment.Optional.TIMEOUT_DELAY | ||
| */ | ||
| val delay: FiniteDuration = Optional.TIMEOUT_DELAY.withDefault(0.seconds) | ||
|
|
||
| /** | ||
| * @see net.cakesolutions.testkit.config.Environment.Optional.TIMEOUT_PERIOD | ||
| */ | ||
| val period: FiniteDuration = Optional.TIMEOUT_PERIOD.withDefault(100.milliseconds) | ||
| } | ||
|
|
||
| private implicit class ConfigurationHelper(value: Option[String]) { | ||
| def withDefault(default: FiniteDuration): FiniteDuration = { | ||
| value.map(Duration(_)).collect { case d: FiniteDuration => d }.getOrElse(default) | ||
| } | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
core/src/main/scala/net/cakesolutions/testkit/config/Environment.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // Copyright 2018 Cake Solutions Limited | ||
|
|
||
| package net.cakesolutions.testkit.config | ||
|
|
||
| /** | ||
| * DevOps environment variable interface | ||
| * | ||
| * Without exception, **all** entries in here should be fully documented! | ||
| */ | ||
| object Environment { | ||
| /** | ||
| * Required configuration settings are placed here | ||
| */ | ||
| object Required { | ||
|
|
||
| } | ||
|
|
||
| /** | ||
| * Optional configuration settings are placed here (these may have sensible | ||
| * default values defined **elsewhere**) | ||
| */ | ||
| object Optional { | ||
| /** | ||
| * Duration that we wait for before allowing monitor timeout's to execute. | ||
| */ | ||
| val TIMEOUT_DELAY: Option[String] = sys.env.get("TIMEOUT_DELAY") | ||
| /** | ||
| * Periodicity with which monitor timeouts are checked for expiration. | ||
| */ | ||
| val TIMEOUT_PERIOD: Option[String] = sys.env.get("TIMEOUT_PERIOD") | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plan is to update this file once all of ISC-377 has been completed.