-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable auto releases #1000
Merged
Merged
Enable auto releases #1000
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f2a7eac
Bump Circe to 0.10
vkostyukov ceab51a
Scala 2.12.7
vkostyukov 5bc96e3
Merge pull request #991 from finagle/vk/circe-0.10
vkostyukov 52d9a21
removes duplicate Xss and Xms options
arron-green a8c2b8c
adjusts stack size to address OOM error when running tests
arron-green efaaab8
Merge pull request #992 from arron-green/rm-duplication-java-options
vkostyukov cd98c95
Merge pull request #994 from arron-green/fix-993
vkostyukov 3e24ae2
Add encoded keys/credentials/etc
vkostyukov 3079e72
Merge pull request #999 from finagle/vk/enc-files
vkostyukov e951831
starts the effort to simplify artifact release (#995)
arron-green 9a5537a
Removing the Scala build matrix
vkostyukov 66067cd
Fix deploy_key.enc name
vkostyukov 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 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 |
---|---|---|
|
@@ -6,4 +6,5 @@ target/ | |
.cache | ||
.settings | ||
.project | ||
.classpath | ||
.classpath | ||
local.* |
This file contains 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,18 +1,21 @@ | ||
language: scala | ||
sudo: false | ||
scala: | ||
- 2.11.12 | ||
- 2.12.6 | ||
branches: | ||
except: | ||
- release | ||
sudo: true | ||
jdk: | ||
- oraclejdk8 | ||
- oraclejdk8 | ||
before_cache: | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot/ | ||
- "$HOME/.ivy2/cache" | ||
- "$HOME/.sbt/boot/" | ||
script: | ||
- sbt ++$TRAVIS_SCALA_VERSION validate | ||
- "./build/build.sh" | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) | ||
- bash <(curl -s https://codecov.io/bash) | ||
env: | ||
global: | ||
secure: llQnDN9mZTL03lIqF8V2Z247C31H5pMJscZufTaKh5yFeTOhT0rJVBPjIfei25g6oc7kEPIYOf4YgKEUfokDvXnjfIZoJmb4YQJCctwZ6itFK4g49myJfXFIts1GUSBwbT4KmiHtFIzN/zNRAYrX3Tn3BC5T4X99ugGnHMGkBss= |
This file contains 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,15 +1,16 @@ | ||
import microsites.ExtraMdFileConfig | ||
import sbtrelease.ReleasePlugin | ||
import ReleaseTransformations._ | ||
|
||
lazy val buildSettings = Seq( | ||
organization := "com.github.finagle", | ||
version := "0.24.0", | ||
scalaVersion := "2.12.6", | ||
crossScalaVersions := Seq("2.11.12", "2.12.6") | ||
scalaVersion := "2.12.7", | ||
crossScalaVersions := Seq("2.11.12", "2.12.7") | ||
) | ||
|
||
lazy val twitterVersion = "18.9.0" | ||
lazy val circeVersion = "0.9.3" | ||
lazy val circeIterateeVersion = "0.10.0" | ||
lazy val circeVersion = "0.10.0" | ||
lazy val circeIterateeVersion = "0.11.0" | ||
lazy val shapelessVersion = "2.3.3" | ||
lazy val catsVersion = "1.4.0" | ||
lazy val argonautVersion = "6.2.2" | ||
|
@@ -59,9 +60,38 @@ val baseSettings = Seq( | |
scalacOptions in (Compile, console) ~= { | ||
_.filterNot(Set("-Ywarn-unused-import")) | ||
}, | ||
scalacOptions in (Compile, console) += "-Yrepl-class-based" | ||
scalacOptions in (Compile, console) += "-Yrepl-class-based", | ||
fork in Test := true, | ||
javaOptions in ThisBuild ++= Seq("-Xss2048K") | ||
) | ||
|
||
def updateVersionInFile(selectVersion: sbtrelease.Versions => String): ReleaseStep = | ||
ReleaseStep(action = st => { | ||
val newVersion = selectVersion(st.get(ReleaseKeys.versions).get) | ||
import scala.io.Source | ||
import java.io.PrintWriter | ||
|
||
// files containing version to update upon release | ||
val filesToUpdate = Seq( | ||
"docs/src/main/tut/index.md" | ||
) | ||
val pattern = """"com.github.finagle" %% "finch-.*" % "(.*)"""".r | ||
|
||
filesToUpdate.foreach { fileName => | ||
val content = Source.fromFile(fileName).getLines.mkString("\n") | ||
val newContent = | ||
pattern.replaceAllIn(content, | ||
m => m.matched.replaceAllLiterally(m.subgroups.head, newVersion)) | ||
new PrintWriter(fileName) { | ||
write(newContent); close() | ||
} | ||
val vcs = Project.extract(st).get(releaseVcs).get | ||
vcs.add(fileName).! | ||
} | ||
|
||
st | ||
}) | ||
|
||
lazy val publishSettings = Seq( | ||
publishMavenStyle := true, | ||
publishArtifact := true, | ||
|
@@ -73,6 +103,10 @@ lazy val publishSettings = Seq( | |
Some("releases" at nexus + "service/local/staging/deploy/maven2") | ||
}, | ||
publishArtifact in Test := false, | ||
pgpSecretRing := file("local.secring.gpg"), | ||
pgpPublicRing := file("local.pubring.gpg"), | ||
releasePublishArtifactsAction := PgpKeys.publishSigned.value, | ||
releaseIgnoreUntrackedFiles := true, | ||
licenses := Seq("Apache 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
homepage := Some(url("https://github.com/finagle/finch")), | ||
autoAPIMappings := true, | ||
|
@@ -83,6 +117,23 @@ lazy val publishSettings = Seq( | |
"scm:git:[email protected]:finagle/finch.git" | ||
) | ||
), | ||
releaseProcess := { | ||
Seq[ReleaseStep]( | ||
checkSnapshotDependencies, | ||
inquireVersions, | ||
releaseStepCommandAndRemaining("+clean"), | ||
releaseStepCommandAndRemaining("+test"), | ||
setReleaseVersion, | ||
updateVersionInFile(_._1), | ||
commitReleaseVersion, | ||
tagRelease, | ||
releaseStepCommandAndRemaining("+publishSigned"), | ||
setNextVersion, | ||
commitNextVersion, | ||
releaseStepCommand("sonatypeReleaseAll"), | ||
pushChanges | ||
) | ||
}, | ||
pomExtra := | ||
<developers> | ||
<developer> | ||
|
@@ -317,8 +368,6 @@ lazy val benchmarks = project | |
"-XX:+CMSClassUnloadingEnabled", | ||
"-XX:ReservedCodeCacheSize=128m", | ||
"-XX:MaxPermSize=1024m", | ||
"-Xss8M", | ||
"-Xms512M", | ||
"-XX:SurvivorRatio=128", | ||
"-XX:MaxTenuringThreshold=0", | ||
"-Xss8M", | ||
|
This file contains 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,36 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
SBT_CMD="sbt +validate" | ||
|
||
if [[ "${TRAVIS_PULL_REQUEST}" == "false" ]]; then | ||
SBT_CMD+=" +coverageOff +publish" | ||
openssl aes-256-cbc -pass env:ENCRYPTION_PASSWORD -in ./build/secring.gpg.enc -out local.secring.gpg -d | ||
openssl aes-256-cbc -pass env:ENCRYPTION_PASSWORD -in ./build/pubring.gpg.enc -out local.pubring.gpg -d | ||
openssl aes-256-cbc -pass env:ENCRYPTION_PASSWORD -in ./build/credentials.sbt.enc -out local.credentials.sbt -d | ||
openssl aes-256-cbc -pass env:ENCRYPTION_PASSWORD -in ./build/deploy_key.pem.enc -out local.deploy_key.pem -d | ||
|
||
if [[ "${TRAVIS_BRANCH}" == "master" && $(cat version.sbt) != *"SNAPSHOT"* ]]; then | ||
eval "$(ssh-agent -s)" | ||
chmod 600 local.deploy_key.pem | ||
ssh-add local.deploy_key.pem | ||
git config --global user.name "Finch CI" | ||
git config --global user.email "[email protected]" | ||
git remote set-url origin [email protected]:finagle/finch.git | ||
git checkout master || git checkout -b master | ||
git reset --hard origin/master | ||
|
||
echo 'Performing a release' | ||
sbt 'release cross with-defaults' | ||
elif [[ "${TRAVIS_BRANCH}" == "master" ]]; then | ||
echo 'Master build' | ||
${SBT_CMD} | ||
else | ||
echo 'Branch build' | ||
printf 'version in ThisBuild := "%s-SNAPSHOT"' "${TRAVIS_BRANCH}" > version.sbt | ||
${SBT_CMD} | ||
fi | ||
else | ||
echo 'PR build' | ||
${SBT_CMD} | ||
fi |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
This file contains 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 @@ | ||
version in ThisBuild := "0.25.0-SNAPSHOT" |
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.
@arron-green Do you know what's
release
branch is for?