Skip to content

Commit 35d79f9

Browse files
authored
Added Github actions workflow for build; remove bintray; fix build issues (#985)
1 parent 05eb6d1 commit 35d79f9

File tree

5 files changed

+53
-23
lines changed

5 files changed

+53
-23
lines changed

.github/scripts/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
# Ensure that this is being run in CI by GitHub Actions
4+
if [ "$CI" != "true" ] || [ "$GITHUB_ACTIONS" != "true" ]; then
5+
echo "This script should only be run in CI by GitHub Actions."
6+
exit 2
7+
fi
8+
9+
# Ensure that the script is being run from the root project directory
10+
PROPERTIES_FILE='gradle.properties'
11+
if [ ! -f "$PROPERTIES_FILE" ]; then
12+
echo "Could not find $PROPERTIES_FILE, are you sure this is being run from the root project directory?"
13+
echo "PWD: ${PWD}"
14+
exit 1
15+
fi
16+
17+
# Run the actual build
18+
./gradlew build --parallel --max-workers=1
19+
EXIT_CODE=$?
20+
21+
if [ $EXIT_CODE != 0 ]; then
22+
exit 1
23+
fi
24+

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Java 8
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: 'temurin'
21+
java-version: '8'
22+
23+
- name: Make build.sh executable
24+
run: chmod +x ./build.sh
25+
26+
- name: Run build script
27+
run: ./.github/scripts/build.sh

datastream-server-api/src/main/java/com/linkedin/datastream/server/api/transport/SendFailedException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/**
1313
* Exception used when sending data fails
1414
*/
15+
@SuppressWarnings("serial")
1516
public class SendFailedException extends Exception {
1617
private static final long serialVersionUID = 1;
1718
private final DatastreamTask _datastreamTask;

gradle/buildscript.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,5 @@ repositories {
1414
dependencies {
1515
classpath 'gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0'
1616
classpath 'com.linkedin.pegasus:gradle-plugins:29.2.3'
17-
// TODO Remove this dependency
18-
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
19-
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0"
17+
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.+"
2018
}

gradle/maven.gradle

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ allprojects {
44

55
subprojects {
66
apply plugin: 'maven-publish'
7-
apply plugin: 'com.jfrog.bintray'
87
apply plugin: 'com.jfrog.artifactory'
98
apply plugin: 'pegasus'
109

@@ -188,23 +187,4 @@ subprojects {
188187
println "Publishing $jar.baseName to Artifactory (dryRun: $skip), publish: $publish)"
189188
}
190189
}
191-
192-
bintray {
193-
user = System.getenv('BINTRAY_USER')
194-
key = System.getenv('BINTRAY_KEY')
195-
publications = allPublications
196-
pkg {
197-
repo = 'maven'
198-
name = 'brooklin'
199-
userOrg = 'linkedin'
200-
licenses = ['BSD 2-Clause']
201-
vcsUrl = 'https://www.github.com/linkedin/brooklin'
202-
publicDownloadNumbers = true
203-
version {
204-
name = project.version
205-
}
206-
publish = false
207-
override = false
208-
}
209-
}
210190
}

0 commit comments

Comments
 (0)