From 976d4f691be91cea67e1cb520de40e0b905cc236 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 14:48:09 -0400 Subject: [PATCH 01/31] added some log messages --- .../net/galgus/flink/streaming/connectors/http/HTTPSink.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java index 9f5ee60..a0fe40c 100644 --- a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java +++ b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java @@ -38,6 +38,9 @@ public void invoke(IN value, Context context) throws Exception { writer.close(); int status = conn.getResponseCode(); + log.info("Status code: " + status); + log.info("Message: " + conn.getResponseMessage()); + if (status != 200) { BufferedReader in = new BufferedReader( new InputStreamReader(conn.getErrorStream())); From a7cfd397713d0a385da6de36464f9717711ecd4f Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:21:58 -0400 Subject: [PATCH 02/31] added github workflow file --- .github/workflows/build.yaml | 17 +++++++++++++++++ .../streaming/connectors/http/HTTPSink.java | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..909d489 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,17 @@ +name: Java Maven build + +on: [push] + +Jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: setup JDK + - uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn clean install \ No newline at end of file diff --git a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java index a0fe40c..ba78ee7 100644 --- a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java +++ b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java @@ -40,7 +40,7 @@ public void invoke(IN value, Context context) throws Exception { int status = conn.getResponseCode(); log.info("Status code: " + status); log.info("Message: " + conn.getResponseMessage()); - + if (status != 200) { BufferedReader in = new BufferedReader( new InputStreamReader(conn.getErrorStream())); From 8d3175e6c61e6cea7b1a072774332b486e6b4f59 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:26:01 -0400 Subject: [PATCH 03/31] changed syntax --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 909d489..d4a696b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,9 +9,9 @@ Jobs: steps: - uses: actions/checkout@v2 - name: setup JDK - - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' - name: Build with Maven - run: mvn clean install \ No newline at end of file + run: mvn clean install From a63827879767ab4bd5d68bf64abeb44e0cd0aa2e Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:30:56 -0400 Subject: [PATCH 04/31] changed name of job --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d4a696b..ea3a8cc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: Java Maven build on: [push] Jobs: - build: + jar_creation: runs-on: macos-latest steps: From 2ad3700efdd7707694d0a800f620be4c32a63a39 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:35:21 -0400 Subject: [PATCH 05/31] formatting error fix --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ea3a8cc..3a98ce2 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,15 +3,15 @@ name: Java Maven build on: [push] Jobs: - jar_creation: + build: runs-on: macos-latest steps: - uses: actions/checkout@v2 - - name: setup JDK + - name: setup JDK 11 uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - - name: Build with Maven + - name: build with maven run: mvn clean install From e0edb590c9daf68b2f6264f93100b26aefa98f2a Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:37:08 -0400 Subject: [PATCH 06/31] edit --- .github/workflows/build.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3a98ce2..0bc26ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,14 +4,5 @@ on: [push] Jobs: build: + name: job1 runs-on: macos-latest - - steps: - - uses: actions/checkout@v2 - - name: setup JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - - name: build with maven - run: mvn clean install From e49053371ee1d18c2920796d38016f2a20a3d216 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:38:04 -0400 Subject: [PATCH 07/31] edit --- .github/workflows/build.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0bc26ca..1ed7b43 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,6 +3,5 @@ name: Java Maven build on: [push] Jobs: - build: - name: job1 - runs-on: macos-latest + my_first_job: + name: my job From feff7f5a0835c68bc64d03b24707f6c786b8c13a Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:41:06 -0400 Subject: [PATCH 08/31] edit --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1ed7b43..ac84fab 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,5 +3,5 @@ name: Java Maven build on: [push] Jobs: - my_first_job: - name: my job + - build: + name: build maven From 0e21ce730fabf4166b311c8320ae4008f4fa6f6a Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:41:47 -0400 Subject: [PATCH 09/31] edit --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ac84fab..be8ace9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,5 +3,5 @@ name: Java Maven build on: [push] Jobs: - - build: - name: build maven + build: + - name: build maven From 5aa0bff8a50c2238510877826c5e81743016add6 Mon Sep 17 00:00:00 2001 From: Elman Reasat <76958502+ereasat@users.noreply.github.com> Date: Tue, 6 Apr 2021 15:44:49 -0400 Subject: [PATCH 10/31] Update build.yaml edit --- .github/workflows/build.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index be8ace9..885be5f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,17 @@ name: Java Maven build on: [push] -Jobs: +jobs: build: - - name: build maven + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Maven + run: mvn clean install + From 0dea66228c4c9521cc1ba7039003b901a8485fa3 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:52:28 -0400 Subject: [PATCH 11/31] edit --- .github/workflows/build.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 885be5f..1198d90 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,4 +15,7 @@ jobs: distribution: 'adopt' - name: Build with Maven run: mvn clean install + - name: copy jar to staging + run: mkdir staging && cp target/*.jar staging + From 6e5a55ae6866f62a9282a210cb4c26a64ce1ed16 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 15:55:10 -0400 Subject: [PATCH 12/31] edit --- .github/workflows/build.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1198d90..4c64f9e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,5 +17,9 @@ jobs: run: mvn clean install - name: copy jar to staging run: mkdir staging && cp target/*.jar staging + - uses: actions/upload-artifact@v2 + with: + name: Package + path: staging From d3267ab6940a1b71e03ac5dd296ce2997c7608c7 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 16:19:13 -0400 Subject: [PATCH 13/31] changed the package name --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4c64f9e..e5cd752 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: [push] jobs: build: - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -19,7 +19,7 @@ jobs: run: mkdir staging && cp target/*.jar staging - uses: actions/upload-artifact@v2 with: - name: Package + name: flink-connector-http-1.0-SNAPSHOT path: staging From 0f53adc0d6fd949a8486d06a4a64668dfefa1b4c Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 16:46:46 -0400 Subject: [PATCH 14/31] changed the package name --- .github/workflows/build.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e5cd752..45c60c4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,13 +13,20 @@ jobs: with: java-version: '11' distribution: 'adopt' + - name: Extract Maven project version + run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + id: project + + - name: Show extracted Maven project version + run: echo ${{ steps.project.outputs.version }} + - name: Build with Maven run: mvn clean install - name: copy jar to staging run: mkdir staging && cp target/*.jar staging - uses: actions/upload-artifact@v2 with: - name: flink-connector-http-1.0-SNAPSHOT + name: flink-connector-http-${{steps.project.outputs.version}} path: staging From a51bbc4cea51ab5a3c78390faf3f229c5e1c372c Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 16:47:54 -0400 Subject: [PATCH 15/31] changed the package name --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 45c60c4..9975a1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,11 +14,11 @@ jobs: java-version: '11' distribution: 'adopt' - name: Extract Maven project version - run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) - id: project + run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + id: project - name: Show extracted Maven project version - run: echo ${{ steps.project.outputs.version }} + run: echo ${{ steps.project.outputs.version }} - name: Build with Maven run: mvn clean install From 549d1903c95e219b1dfbd8888a3337f5d6334936 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 17:05:45 -0400 Subject: [PATCH 16/31] changed the log messages --- .github/workflows/build.yaml | 2 +- .../galgus/flink/streaming/connectors/http/HTTPSink.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9975a1e..51b541d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: run: mkdir staging && cp target/*.jar staging - uses: actions/upload-artifact@v2 with: - name: flink-connector-http-${{steps.project.outputs.version}} + name: flink-connector-http-${steps.project.outputs.version} path: staging diff --git a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java index ba78ee7..f790534 100644 --- a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java +++ b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java @@ -38,8 +38,10 @@ public void invoke(IN value, Context context) throws Exception { writer.close(); int status = conn.getResponseCode(); - log.info("Status code: " + status); - log.info("Message: " + conn.getResponseMessage()); + log.info("Status={}", status); + if(status == 200) { + log.info("Message: The request has succeeded" ); + } if (status != 200) { BufferedReader in = new BufferedReader( From 22028022f5bdb92e4428f1cbe17fb6556baa5d6f Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Tue, 6 Apr 2021 17:07:04 -0400 Subject: [PATCH 17/31] 2 curly braces are required --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 51b541d..9975a1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: run: mkdir staging && cp target/*.jar staging - uses: actions/upload-artifact@v2 with: - name: flink-connector-http-${steps.project.outputs.version} + name: flink-connector-http-${{steps.project.outputs.version}} path: staging From 6ebb043d0648da0094cd3de2bcf760689babf981 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Wed, 7 Apr 2021 12:35:22 -0400 Subject: [PATCH 18/31] Made requested changes --- .../streaming/connectors/http/HTTPSink.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java index f790534..9dec943 100644 --- a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java +++ b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java @@ -12,6 +12,7 @@ import java.net.HttpURLConnection; import java.net.URL; import java.nio.charset.StandardCharsets; +import java.util.concurrent.TimeUnit; public class HTTPSink extends RichSinkFunction { private static final Logger log = LoggerFactory.getLogger(HTTPSink.class); @@ -25,9 +26,10 @@ public HTTPSink(HTTPConnectionConfig httpConnectionConfig) { public void invoke(IN value, Context context) throws Exception { if (value != null) { URL url = new URL(httpConnectionConfig.getEndpoint()); - + + long start = System.currentTimeMillis(); + HttpURLConnection conn = httpConnectionConfig.isHttpsEnabled() ? (HttpsURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(); - conn.setDoOutput(true); conn.setRequestMethod(httpConnectionConfig.getMethod()); @@ -38,12 +40,12 @@ public void invoke(IN value, Context context) throws Exception { writer.close(); int status = conn.getResponseCode(); - log.info("Status={}", status); - if(status == 200) { - log.info("Message: The request has succeeded" ); - } + if(status >= 200 && status < 300) { + log.info("URL = {}", conn.getURL()); + log.info("HTTP Response code = {}", status); + log.info("HTTP Message: The request has succeeded, {}", conn.getResponseMessage()); - if (status != 200) { + }else if (status != 200) { BufferedReader in = new BufferedReader( new InputStreamReader(conn.getErrorStream())); String inputLine; @@ -63,6 +65,8 @@ public void invoke(IN value, Context context) throws Exception { + ", headers: " + httpConnectionConfig.getHeaders()); conn.disconnect(); + long elapsedTime = System.currentTimeMillis() - start; + log.info("Request Duration = " + Long.toString(elapsedTime) + " ms"); } } } From b020245c13cd664d1f2e88c7f4fb4366eb828451 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 11:21:04 -0400 Subject: [PATCH 19/31] changed log messages, also changed branch name --- .../flink/streaming/connectors/http/HTTPSink.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java index 9dec943..27595bf 100644 --- a/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java +++ b/src/main/java/net/galgus/flink/streaming/connectors/http/HTTPSink.java @@ -27,7 +27,7 @@ public void invoke(IN value, Context context) throws Exception { if (value != null) { URL url = new URL(httpConnectionConfig.getEndpoint()); - long start = System.currentTimeMillis(); + long start = System.nanoTime(); HttpURLConnection conn = httpConnectionConfig.isHttpsEnabled() ? (HttpsURLConnection) url.openConnection() : (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); @@ -40,12 +40,7 @@ public void invoke(IN value, Context context) throws Exception { writer.close(); int status = conn.getResponseCode(); - if(status >= 200 && status < 300) { - log.info("URL = {}", conn.getURL()); - log.info("HTTP Response code = {}", status); - log.info("HTTP Message: The request has succeeded, {}", conn.getResponseMessage()); - - }else if (status != 200) { + if (status != 200) { BufferedReader in = new BufferedReader( new InputStreamReader(conn.getErrorStream())); String inputLine; @@ -65,8 +60,10 @@ public void invoke(IN value, Context context) throws Exception { + ", headers: " + httpConnectionConfig.getHeaders()); conn.disconnect(); - long elapsedTime = System.currentTimeMillis() - start; - log.info("Request Duration = " + Long.toString(elapsedTime) + " ms"); + long elapsedNano = System.nanoTime() - start; + long elapsedTime = TimeUnit.NANOSECONDS.toMillis(elapsedNano); + log.info("Request from url = {}, with status = {} and message = {} in duration = {}ms", + conn.getURL(), status, conn.getResponseMessage(), Long.toString(elapsedTime)); } } } From bfca3c356198ff3d9064c13a6588bb3d6bc57919 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:06:10 -0400 Subject: [PATCH 20/31] mvn deploy --- .github/workflows/build.yaml | 18 ++++++++++-------- pom.xml | 9 +++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9975a1e..5bf470c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,13 +20,15 @@ jobs: - name: Show extracted Maven project version run: echo ${{ steps.project.outputs.version }} - - name: Build with Maven - run: mvn clean install - - name: copy jar to staging - run: mkdir staging && cp target/*.jar staging - - uses: actions/upload-artifact@v2 - with: - name: flink-connector-http-${{steps.project.outputs.version}} - path: staging + - name: Publish to GitHub Packages + env: + GITHUB_TOKEN: ${{ github.token }} + run: mvn deploy +# - name: copy jar to staging +# run: mkdir staging && cp target/*.jar staging +# - uses: actions/upload-artifact@v2 +# with: +# name: flink-connector-http-${{steps.project.outputs.version}} +# path: staging diff --git a/pom.xml b/pom.xml index 560a619..2a33a45 100644 --- a/pom.xml +++ b/pom.xml @@ -37,4 +37,13 @@ + + + + github + GitHub globeandmail Apache Maven Packages + https://github.com/globeandmail/flink-connector-http + + + \ No newline at end of file From 4ba3c5ff0cce89dc8d0b858125462ab36f2f5855 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:14:54 -0400 Subject: [PATCH 21/31] fixed yaml --- .github/workflows/build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5bf470c..4b6315b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -21,9 +21,10 @@ jobs: run: echo ${{ steps.project.outputs.version }} - name: Publish to GitHub Packages - env: - GITHUB_TOKEN: ${{ github.token }} - run: mvn deploy + env: + GITHUB_TOKEN: ${{ github.token }} + run: mvn deploy + # - name: copy jar to staging # run: mkdir staging && cp target/*.jar staging # - uses: actions/upload-artifact@v2 From f0e326c6215b34e354c3777a7028f65e188d1453 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:23:01 -0400 Subject: [PATCH 22/31] changed workflow --- .github/workflows/build.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4b6315b..eb74959 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,9 +22,11 @@ jobs: - name: Publish to GitHub Packages env: - GITHUB_TOKEN: ${{ github.token }} - run: mvn deploy - + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir ~/.m2 + echo "githubOWNER${GITHUB_TOKEN}" > ~/.m2/settings.xml + mvn deploy # - name: copy jar to staging # run: mkdir staging && cp target/*.jar staging # - uses: actions/upload-artifact@v2 From 9c4ceba3c862c28d39b4cfb5c1ed19f683919a9c Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:24:25 -0400 Subject: [PATCH 23/31] changed build command --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb74959..6c4d2dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mkdir ~/.m2 echo "githubOWNER${GITHUB_TOKEN}" > ~/.m2/settings.xml mvn deploy # - name: copy jar to staging From 49acf9e4c0f90f80180505145addfc7a9f387d4f Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:30:21 -0400 Subject: [PATCH 24/31] git username --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6c4d2dc..bba887e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,7 +24,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo "githubOWNER${GITHUB_TOKEN}" > ~/.m2/settings.xml + echo "githubglobeandmail${GITHUB_TOKEN}" > ~/.m2/settings.xml mvn deploy # - name: copy jar to staging # run: mkdir staging && cp target/*.jar staging From 35c8c9aee3560317ad44bd48f7b00ce14779823a Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:40:48 -0400 Subject: [PATCH 25/31] changed build file --- .github/workflows/build.yaml | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bba887e..e61c642 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,34 +3,15 @@ name: Java Maven build on: [push] jobs: - build: + publish: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 + - uses: actions/setup-java@v2 with: java-version: '11' distribution: 'adopt' - - name: Extract Maven project version - run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) - id: project - - - name: Show extracted Maven project version - run: echo ${{ steps.project.outputs.version }} - - name: Publish to GitHub Packages + run: mvn deploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "githubglobeandmail${GITHUB_TOKEN}" > ~/.m2/settings.xml - mvn deploy -# - name: copy jar to staging -# run: mkdir staging && cp target/*.jar staging -# - uses: actions/upload-artifact@v2 -# with: -# name: flink-connector-http-${{steps.project.outputs.version}} -# path: staging - - + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 59a4a285f987e2e0bb89b7e7f1e86dc41b9dc959 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:46:40 -0400 Subject: [PATCH 26/31] settings file --- .m2/settings.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .m2/settings.xml diff --git a/.m2/settings.xml b/.m2/settings.xml new file mode 100644 index 0000000..7eb76d7 --- /dev/null +++ b/.m2/settings.xml @@ -0,0 +1,13 @@ + + + + + github + USERNAME + TOKEN + + + \ No newline at end of file From 9ed61fceb8d0216406eb5d8040ec8fae394db1b0 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 12:51:43 -0400 Subject: [PATCH 27/31] yaml edit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a33a45..686a219 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ github GitHub globeandmail Apache Maven Packages - https://github.com/globeandmail/flink-connector-http + https://maven.pkg.github.com/globeandmail/flink-connector-http From 8d52d927a71359bbd9c17abd79a76a9504451c31 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 13:38:21 -0400 Subject: [PATCH 28/31] changed group id --- README.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96b446f..f0a55ff 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This command will install all the components in your `.m2` directory. To use you ``` - net.galgus + tgamforks.net.galgus flink-connector-http 1.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index 686a219..b58fec2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - net.galgus + tgamforks.net.galgus flink-connector-http 1.0-SNAPSHOT From 6692178e6e4b7ce537fd121422116dd8362619cc Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Thu, 8 Apr 2021 13:50:03 -0400 Subject: [PATCH 29/31] changed group id --- README.md | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f0a55ff..38fd1e3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ This command will install all the components in your `.m2` directory. To use you ``` - tgamforks.net.galgus + tgamforks flink-connector-http 1.0-SNAPSHOT diff --git a/pom.xml b/pom.xml index b58fec2..98a1f07 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - tgamforks.net.galgus + tgamforks flink-connector-http 1.0-SNAPSHOT From 936b13dfe62e0ce78c1f6f037ab23dcb3f9385d5 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Mon, 12 Apr 2021 14:05:43 -0400 Subject: [PATCH 30/31] removed settings --- .m2/settings.xml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .m2/settings.xml diff --git a/.m2/settings.xml b/.m2/settings.xml deleted file mode 100644 index 7eb76d7..0000000 --- a/.m2/settings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - github - USERNAME - TOKEN - - - \ No newline at end of file From 30463a3533076a964aa580b97aef4f4092e08592 Mon Sep 17 00:00:00 2001 From: Elman Reasat Date: Mon, 19 Apr 2021 12:31:54 -0400 Subject: [PATCH 31/31] changed version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 98a1f07..d5e5a6a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ tgamforks flink-connector-http - 1.0-SNAPSHOT + 1.0 flink-connector-http