forked from d2iq-archive/marathon
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It appears the default Travis script for sbt was conflicting with the version used in Marathon. On this occasion, we chose to migrate to Github Actions because it allowed the build to pass, including tests. Not removing Travis related files since they are tracked upstream and can contain modification reflecting impacting changes in the future.
- Loading branch information
Showing
4 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'criteo/*' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Fetch all history for all tags and branches | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git fetch --prune --unshallow | ||
./criteo_tag_commit.sh | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build artifact | ||
run: sbt clean universal:packageZipTarball | ||
- name: Identify artifact | ||
id: identify_artifact | ||
run: ./identify_artifact.sh | ||
- name: Run tests | ||
run: sbt test | ||
- name: Publish artifact | ||
uses: actions/upload-artifact@v2-preview | ||
if: success() | ||
with: | ||
name: ${{ steps.identify_artifact.outputs.artifact }} | ||
path: ${{ steps.identify_artifact.outputs.path }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.identify_artifact.outputs.path }} | ||
asset_name: ${{ steps.identify_artifact.outputs.artifact }} | ||
asset_content_type: application/x-gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Test | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Fetch all history for all tags and branches | ||
- run: | | ||
git fetch --prune --unshallow | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build artifact | ||
run: sbt clean universal:packageZipTarball | ||
- name: Identify artifact | ||
id: identify_artifact | ||
run: ./identify_artifact.sh | ||
- name: Run tests | ||
run: sbt test | ||
- name: Publish artifact | ||
uses: actions/upload-artifact@v2-preview | ||
if: success() | ||
with: | ||
name: ${{ steps.identify_artifact.outputs.artifact }} | ||
path: ${{ steps.identify_artifact.outputs.path }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
artifact_path=$(ls -1 target/universal/marathon-*.tgz) | ||
artifact=$(basename "$artifact_path") | ||
artifact_version="$(echo $artifact | sed -E 's/marathon-(.*)\.tgz/\1/')" | ||
|
||
echo "::set-output name=path::$artifact_path" | ||
echo "::set-output name=artifact::$artifact" | ||
echo "::set-output name=version::$artifact_version" |