Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Modified nebula version and added release workflow (#51)
Browse files Browse the repository at this point in the history
* Modified nebula version and added release workflow

* Job name corrected
  • Loading branch information
gaiksaya authored Mar 31, 2020
1 parent b333469 commit e710e97
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/release-workflow.yml
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
}

plugins {
id 'nebula.ospackage' version "8.0.0"
id 'nebula.ospackage' version "8.2.0"
id 'java-library'
}

Expand Down

0 comments on commit e710e97

Please sign in to comment.