From 0d535a35fc63dccbb988f5479094a3a294d7408d Mon Sep 17 00:00:00 2001 From: Gleb Kanterov Date: Mon, 14 Jun 2021 17:13:44 +0200 Subject: [PATCH] Fix the build --- .github/workflows/build.yaml | 30 +++++++++++++----------------- jflyte-build/pom.xml | 14 -------------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 809d1a479..73510d011 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,19 +11,12 @@ jobs: build-snapshot: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - with: - fetch-depth: "0" + - uses: actions/checkout@v2 - name: Cache local Maven repository uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-prepare-release-${{ hashFiles('pom.xml') }} - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11.0 - distribution: 'adopt' - name: Log in to Docker Hub if: ${{ github.ref == 'refs/heads/master' }} uses: docker/login-action@v1 @@ -31,20 +24,23 @@ jobs: registry: ghcr.io username: ${{ secrets.FLYTE_BOT_USERNAME }} password: ${{ secrets.FLYTE_BOT_PAT }} - - uses: s4u/maven-settings-action@v2.2.0 + - name: Setup JDK 11 + uses: actions/setup-java@v2 if: ${{ github.ref == 'refs/heads/master' }} with: - servers: | - [{ - "id": "flytekit-java-release", - "username": "${{ secrets.SONATYPE_USERNAME }}", - "password": "${{ secrets.SONATYPE_PASSWORD }}" - }] + java-version: 11.0 + distribution: 'adopt' + server-id: snapshots + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD - name: Verify with Maven - run: mvn verify + if: ${{ github.ref != 'refs/heads/master' }} + run: mvn --batch-mode verify - name: Release snapshot with Maven if: ${{ github.ref == 'refs/heads/master' }} + run: mvn --batch-mode deploy -DpreparationGoals=clean -Ddockerfile.push env: RELEASE_REPOSITORY_URL: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" SNAPSHOTS_REPOSITORY_URL: "https://s01.oss.sonatype.org/content/repositories/snapshots" - run: mvn deploy -DpreparationGoals=clean -DskipTests=true -Ddocker.image=gcr.io/flyteorg/jflyte -Ddockerfile.push \ No newline at end of file + MAVEN_USERNAME: flytekit + MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/jflyte-build/pom.xml b/jflyte-build/pom.xml index ecc3cfbc0..b0efc449c 100644 --- a/jflyte-build/pom.xml +++ b/jflyte-build/pom.xml @@ -28,7 +28,6 @@ jflyte-build - ${env.FLYTE_INTERNAL_IMAGE} ${project.version} true @@ -68,17 +67,4 @@ - - - env.FLYTE_INTERNAL_IMAGE default value - - - !env.FLYTE_INTERNAL_IMAGE - - - - docker.io/flyte/jflyte - - -