-
Notifications
You must be signed in to change notification settings - Fork 0
Jdk17 scala 2.12.20 and 2.13.16 #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8e20814
* flink bump to 1.20.1
raphaelsolarski e3b88e0
* flink bump to 1.20.1
raphaelsolarski cc9d57e
provoked change
raphaelsolarski 8e0cd74
publish on push to test publish action (should be reverted before merge)
raphaelsolarski e3d10f1
additional logging
raphaelsolarski 65132f7
additional logging
raphaelsolarski 135bea5
additional logging
raphaelsolarski be170a9
additional logging
raphaelsolarski db2182b
build/publish jdk downgraded
raphaelsolarski ee906f4
build/publish jdk downgraded
raphaelsolarski 7f37273
--no-colors to sbt added
raphaelsolarski 7708f4b
setup buildx builder
raphaelsolarski 0117741
maven artifacts publication + little fixes
raphaelsolarski 8afd676
sonatype credentials setup
raphaelsolarski e04033a
secrets fixup
raphaelsolarski 72d1773
provoked change
raphaelsolarski 45f4cfa
provoked change
raphaelsolarski 7c92152
oss.sonatype.org changed to centra.sonatype.com
raphaelsolarski cbf6f64
credential host fixup (maybe hack)
raphaelsolarski e652754
logging
raphaelsolarski 7b15583
Logging removed
raphaelsolarski a25f844
GH repo renamed + readme update
raphaelsolarski 1a2585f
scala test bump
raphaelsolarski 7c0e8a4
scala upgrade 2.12.15 -> 2.12.20 2.13.15 -> 2.13.16
raphaelsolarski 0e6e365
review fix
raphaelsolarski f237c07
publishSigned configuration
raphaelsolarski d8bcd2b
publish as manual ci action
raphaelsolarski 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 |
---|---|---|
|
@@ -6,8 +6,11 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: olafurpg/setup-scala@v11 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: [email protected] | ||
distribution: temurin | ||
java-version: 17 | ||
cache: sbt | ||
- uses: sbt/setup-sbt@v1 | ||
- name: Test | ||
run: sbt test | ||
run: sbt "++test" |
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,39 @@ | ||
name: Publish | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
cache: sbt | ||
- uses: sbt/setup-sbt@v1 | ||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSWORD }} | ||
- name: Build and publish maven artifacts | ||
run: sbt "+clean; +publishSigned" | ||
- name: Setup buildx builder | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
config-inline: | | ||
[worker.oci] | ||
max-parallelism = 1 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USER }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push images | ||
run: ./build-images.sh --push |
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 @@ | ||
-J--add-opens=java.base/java.util=ALL-UNNAMED |
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,8 @@ | ||
ARG FLINK_VERSION="invalid" | ||
|
||
FROM flink:${FLINK_VERSION}-scala_2.12-java17 | ||
|
||
RUN rm $FLINK_HOME/lib/flink-scala*.jar | ||
|
||
ARG FLINK_SCALA_VERSION="invalid" | ||
COPY --chown=flink:flink flink-scala-assembly-${FLINK_SCALA_VERSION}.jar $FLINK_HOME/lib/ |
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
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,39 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
VERSION=$(sbt --no-colors -Dsbt.supershell=false "show version" | grep "info" | tail -1 | awk '{print $2}') | ||
FLINK_VERSION=$(sbt --no-colors -Dsbt.supershell=false "show flinkV" | grep "info" | tail -1 | awk '{print $2}') | ||
echo "FLINK_SCALA_VERSION: ${VERSION}" | ||
echo "FLINK_VERSION: ${FLINK_VERSION}" | ||
|
||
if [[ "$1" == "--push" ]]; then | ||
OUTPUT_TYPE="registry" | ||
else | ||
OUTPUT_TYPE="docker" | ||
fi | ||
|
||
sbt "+clean; +assembly" | ||
|
||
IMAGE_TAG="${VERSION}-flink${FLINK_VERSION}-scala_2.12" | ||
echo "Building Docker image with version: $IMAGE_TAG" | ||
|
||
cp target/scala-2.12/flink-scala-assembly-${VERSION}.jar . | ||
|
||
docker buildx build \ | ||
--build-arg FLINK_VERSION=$FLINK_VERSION \ | ||
--build-arg FLINK_SCALA_VERSION=$VERSION \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--tag touk/flink:$IMAGE_TAG \ | ||
--output=type=$OUTPUT_TYPE . | ||
|
||
IMAGE_TAG="${VERSION}-flink${FLINK_VERSION}-scala_2.13" | ||
echo "Building Docker image with version: $IMAGE_TAG" | ||
|
||
cp target/scala-2.13/flink-scala-assembly-${VERSION}.jar . | ||
|
||
docker buildx build \ | ||
--build-arg FLINK_VERSION=$FLINK_VERSION \ | ||
--build-arg FLINK_SCALA_VERSION=$VERSION \ | ||
--platform linux/amd64,linux/arm64 \ | ||
--tag touk/flink:$IMAGE_TAG \ | ||
--output=type=$OUTPUT_TYPE . |
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,67 +1,103 @@ | ||
version := "1.1.2" | ||
import sbtassembly.MergeStrategy | ||
|
||
scalaVersion := "2.13.15" | ||
name := "flink-scala" | ||
version := "1.1.3-SNAPSHOT" | ||
|
||
name := "flink-scala-2.13" | ||
val scala212 = "2.12.20" | ||
val scala213 = "2.13.16" | ||
|
||
lazy val flinkV = "1.16.2" | ||
lazy val scalaTestV = "3.2.17" | ||
scalaVersion := scala212 | ||
crossScalaVersions := List(scala212, scala213) | ||
|
||
val flinkV = settingKey[String]("Flink version") // to extract using `show flinkV` | ||
flinkV := "1.20.1" | ||
|
||
assembly / artifact := { | ||
val art = (assembly / artifact).value | ||
art.withClassifier(Some("assembly")) | ||
} | ||
lazy val scalaTestV = "3.2.19" | ||
|
||
addArtifact(assembly / artifact, assembly) | ||
lazy val assemblySettings = Seq( | ||
assembly / artifact := { | ||
val art = (assembly / artifact).value | ||
art.withClassifier(Some("assembly")) | ||
}, | ||
assembly / assemblyMergeStrategy := { | ||
case PathList(ps@_*) if ps.last == "module-info.class" => MergeStrategy.discard | ||
case x => MergeStrategy.defaultMergeStrategy(x) | ||
}, | ||
addArtifact(assembly / artifact, assembly) | ||
) | ||
|
||
lazy val publishSettings = Seq( | ||
publishMavenStyle := true, | ||
sonatypeCredentialHost := "central.sonatype.com", | ||
publishTo := { | ||
val defaultNexusUrl = "https://oss.sonatype.org/" | ||
if (isSnapshot.value) | ||
Some("snapshots" at defaultNexusUrl + "content/repositories/snapshots") | ||
else { | ||
sonatypePublishToBundle.value | ||
} | ||
if (isSnapshot.value) | ||
Some("snapshots" at "https://central.sonatype.com/repository/maven-snapshots/") | ||
else { | ||
sonatypePublishToBundle.value //todo: full release not tested yet | ||
} | ||
}, | ||
Test / publishArtifact := false, | ||
//We don't put scm information here, it will be added by release plugin and if scm provided here is different than the one from scm | ||
//we'll end up with two scm sections and invalid pom... | ||
pomExtra in Global := { | ||
<scm> | ||
<connection>scm:git:github.com/TouK/flink-scala-2.13.git</connection> | ||
<developerConnection>scm:git:[email protected]:TouK/flink-scala-2.13.git</developerConnection> | ||
<url>github.com/TouK/flink-scala-2.13</url> | ||
<connection>scm:git:github.com/TouK/flink-scala.git</connection> | ||
<developerConnection>scm:git:[email protected]:TouK/flink-scala.git</developerConnection> | ||
<url>github.com/TouK/flink-scala</url> | ||
</scm> | ||
<developers> | ||
<developer> | ||
<id>TouK</id> | ||
<name>TouK</name> | ||
<url>https://touk.pl</url> | ||
</developer> | ||
</developers> | ||
<developers> | ||
<developer> | ||
<id>TouK</id> | ||
<name>TouK</name> | ||
<url>https://touk.pl</url> | ||
</developer> | ||
</developers> | ||
}, | ||
organization := "pl.touk", | ||
) | ||
|
||
lazy val root = (project in file(".")) | ||
.settings( | ||
name := "flink-scala-2.13", | ||
name := "flink-scala", | ||
organization := "pl.touk", | ||
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")), | ||
homepage := Some(url("https://github.com/TouK/flink-scala-2.13")), | ||
libraryDependencies ++= { | ||
Seq( | ||
"org.scala-lang" % "scala-compiler" % scalaVersion.value, | ||
"org.scala-lang" % "scala-reflect" % scalaVersion.value, | ||
|
||
"org.apache.flink" % "flink-streaming-java" % flinkV % "provided", | ||
"com.twitter" %% "chill" % "0.9.5" exclude("com.esotericsoftware", "kryo-shaded"), | ||
"com.esotericsoftware.kryo" % "kryo" % "2.24.0" % "provided", | ||
|
||
"org.scalatest" %% "scalatest" % scalaTestV % "test", | ||
) | ||
} | ||
homepage := Some(url("https://github.com/TouK/flink-scala")), | ||
libraryDependencies ++= (forScalaVersion(scalaVersion.value) { | ||
case (2, 12) => | ||
Seq( | ||
"org.apache.flink" %% "flink-scala" % flinkV.value excludeAll( | ||
ExclusionRule(organization = "org.apache.flink", name = "flink-core"), | ||
ExclusionRule(organization = "org.apache.flink", name = "flink-java"), | ||
ExclusionRule(organization = "org.apache.flink", name = "flink-shaded-asm-9"), | ||
ExclusionRule(organization = "org.slf4j", name = "slf4j-api"), | ||
ExclusionRule(organization = "com.google.code.findbugs", name = "jsr305"), | ||
), | ||
"com.esotericsoftware.kryo" % "kryo" % "2.24.0" % Test, | ||
"org.apache.flink" % "flink-java" % flinkV.value % Test, | ||
) | ||
case (2, 13) => | ||
Seq( | ||
"org.apache.flink" % "flink-streaming-java" % flinkV.value % "provided", | ||
"com.twitter" %% "chill" % "0.9.5" exclude("com.esotericsoftware", "kryo-shaded"), | ||
"com.esotericsoftware.kryo" % "kryo" % "2.24.0" % "provided", | ||
) | ||
} ++ Seq( | ||
"org.scala-lang" % "scala-library" % scalaVersion.value, | ||
"org.scala-lang" % "scala-compiler" % scalaVersion.value, | ||
"org.scala-lang" % "scala-reflect" % scalaVersion.value, | ||
"org.scalatest" %% "scalatest" % scalaTestV % Test, | ||
)) | ||
) | ||
.settings(assemblySettings *) | ||
.settings(publishSettings) | ||
|
||
def forScalaVersion[T](version: String)(provide: PartialFunction[(Int, Int), T]): T = { | ||
CrossVersion.partialVersion(version) match { | ||
case Some((major, minor)) if provide.isDefinedAt((major.toInt, minor.toInt)) => | ||
provide((major.toInt, minor.toInt)) | ||
case Some(_) => | ||
throw new IllegalArgumentException(s"Scala version $version is not handled") | ||
case None => | ||
throw new IllegalArgumentException(s"Invalid Scala version $version") | ||
} | ||
} |
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,3 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.4") | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.1") | ||
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0") | ||
piotrp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") |
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 |
---|---|---|
|
@@ -233,4 +233,4 @@ class ScalaCollectionsRegistrarCompat extends IKryoRegistrar { | |
) | ||
) | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
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.
Uh oh!
There was an error while loading. Please reload this page.