Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
kanterov committed Jun 14, 2021
1 parent 72b1795 commit 9a4113b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,36 @@ 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
with:
registry: ghcr.io
username: ${{ secrets.FLYTE_BOT_USERNAME }}
password: ${{ secrets.FLYTE_BOT_PAT }}
- uses: s4u/[email protected]
- 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
MAVEN_USERNAME: flytekit
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
15 changes: 1 addition & 14 deletions jflyte-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<artifactId>jflyte-build</artifactId>

<properties>
<docker.image>${env.FLYTE_INTERNAL_IMAGE}</docker.image>
<docker.image>ghcr.io/flyteorg/flytekit-java</docker.image>
<docker.tag>${project.version}</docker.tag>

<maven.deploy.skip>true</maven.deploy.skip>
Expand Down Expand Up @@ -68,17 +68,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>env.FLYTE_INTERNAL_IMAGE default value</id>
<activation>
<property>
<name>!env.FLYTE_INTERNAL_IMAGE</name>
</property>
</activation>
<properties>
<env.FLYTE_INTERNAL_IMAGE>docker.io/flyte/jflyte</env.FLYTE_INTERNAL_IMAGE>
</properties>
</profile>
</profiles>
</project>

0 comments on commit 9a4113b

Please sign in to comment.