From 547f87027b0c0d4217406bab77b30a38ec5d5fad Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Sun, 16 Jan 2022 09:41:22 -0600 Subject: [PATCH] Add initial Github workflows (basic build) (#157) In progress #155 --- .github/workflows/ci-pr.yml | 22 +++++++++++++++++ .github/workflows/ci-publish.yml | 41 ++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 38 +++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 .github/workflows/ci-pr.yml create mode 100644 .github/workflows/ci-publish.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml new file mode 100644 index 0000000..1f7e859 --- /dev/null +++ b/.github/workflows/ci-pr.yml @@ -0,0 +1,22 @@ +name: CI PRs + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + name: CI PR Build + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 8 + cache: maven + - name: Build kafka-samples + run: ./mvnw -B package + working-directory: kafka-samples + - name: Build multio-samples/ticktock + run: ./mvnw -B package + working-directory: multio-samples/ticktock diff --git a/.github/workflows/ci-publish.yml b/.github/workflows/ci-publish.yml new file mode 100644 index 0000000..eb49140 --- /dev/null +++ b/.github/workflows/ci-publish.yml @@ -0,0 +1,41 @@ +name: CI Publish + +on: + workflow_call: + secrets: + jfArtifactorySpring: + required: true + +jobs: + publish: + runs-on: ubuntu-latest + name: CI Publish + steps: + - uses: actions/checkout@v2 + - uses: jvalkeal/setup-maven@v1 + with: + maven-version: 3.8.4 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 8 + - uses: jfrog/setup-jfrog-cli@v1 + with: + version: 1.46.4 + env: + JF_ARTIFACTORY_SPRING: ${{ secrets.jfArtifactorySpring }} + - name: Configure JFrog Cli + run: | + jfrog rt mvnc \ + --server-id-resolve=repo.spring.io \ + --server-id-deploy=repo.spring.io \ + --repo-resolve-releases=libs-milestone \ + --repo-resolve-snapshots=libs-snapshot \ + --repo-deploy-releases=release \ + --repo-deploy-snapshots=snapshot + echo JFROG_CLI_BUILD_NAME=spring-shell-main >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV + - name: Build and Publish + run: | + jfrog rt mvn -B clean install -DskipTests + jfrog rt build-publish diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..461e1ea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + workflow_dispatch: + push: +# branches: +# - 'main' +# paths: +# - 'scenario-task' + paths-ignore: + - '.github/**' + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + name: CI Build + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 8 + cache: maven + - name: Build kafka-samples + run: ./mvnw -B package + working-directory: kafka-samples + - name: Build multio-samples/ticktock + run: ./mvnw -B package + working-directory: multio-samples/ticktock + +# publish: +# needs: [build] +# name: Call Publish Snapshot +# uses: spring-cloud/spring-cloud-dataflow-samples/.github/workflows/ci-publish.yml@main +# secrets: +# jfArtifactorySpring: ${{ secrets.JF_ARTIFACTORY_SPRING }}