This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified nebula version and added release workflow (#51)
* Modified nebula version and added release workflow * Job name corrected
- Loading branch information
Showing
2 changed files
with
61 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,60 @@ | ||
name: Release workflow | ||
# This workflow is triggered on creating tags to master or an opendistro release branch | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
java: [13] | ||
# Job name | ||
name: Build Job-scheduler with JDK ${{ matrix.java }} | ||
# This job runs on Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
# This step uses the checkout Github action: https://github.com/actions/checkout | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
# This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
- name: Set Up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
|
||
# Building zip, deb and rpm files | ||
- name: Build with Gradle | ||
run: ./gradlew build buildDeb buildRpm --no-daemon -Dbuild.snapshot=false | ||
|
||
- name: Create Artifact Path | ||
run: | | ||
mkdir -p job-scheduler-artifacts | ||
cp ./build/distributions/*.zip job-scheduler-artifacts | ||
cp ./build/distributions/*.deb job-scheduler-artifacts | ||
cp ./build/distributions/*.rpm job-scheduler-artifacts | ||
echo ::set-env name=TAG_VERSION::${GITHUB_REF/refs\/tags\//} | ||
# AWS authentication | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-west-2 | ||
|
||
# This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact | ||
- name: Upload Artifacts to S3 | ||
run: | | ||
s3_path=s3://artifacts.opendistroforelasticsearch.amazon.com/downloads | ||
aws s3 cp job-scheduler-artifacts/*.zip $s3_path/elasticsearch-plugins/opendistro-job-scheduler/ | ||
aws s3 cp job-scheduler-artifacts/*.deb $s3_path/debs/opendistro-job-scheduler/ | ||
aws s3 cp job-scheduler-artifacts/*.rpm $s3_path/rpms/opendistro-job-scheduler/ | ||
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths '/downloads/*' | ||
- name: Upload Workflow Artifacts | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: job-scheduler-plugin | ||
path: job-scheduler-artifacts |
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