forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow for package generation (#65)
* Ignore artifacts folder * Update build script - Updated to v2.11.0 version. - Skipped compilation of the plugins - The artifact nameis sent to a text file, to access it easily in GitHub Actions. * Add GH action to build min packages * Remove commented code * Remove unused code
- Loading branch information
Showing
4 changed files
with
85 additions
and
32 deletions.
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,62 @@ | ||
name: Build slim packages | ||
|
||
# This workflow runs when any of the following occur: | ||
# - Run manually | ||
on: | ||
workflow_dispatch: | ||
|
||
|
||
# Used to run locally using https://github.com/nektos/act | ||
env: | ||
ACT: | ||
VERSION: 2.11.0 | ||
SNAPSHOT: false | ||
PLATFORM: linux | ||
BUILD: bash scripts/build.sh | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# Permissions to upload the package | ||
permissions: | ||
packages: write | ||
contents: read | ||
strategy: | ||
matrix: | ||
# act is resource-heavy. Avoid running parallel builds with it: | ||
# DISTRIBUTION: [ rpm ] | ||
# ARCHITECTURE: [ x64 ] | ||
DISTRIBUTION: [ tar, rpm, deb ] | ||
ARCHITECTURE: [ x64, arm64 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/[email protected] | ||
|
||
- name: Execute build script | ||
run: | | ||
$BUILD -v $VERSION -s $SNAPSHOT -p $PLATFORM -a ${{ matrix.ARCHITECTURE }} -d ${{ matrix.DISTRIBUTION }} | ||
# The package name is stored in the artifacts/artifact_name.txt file | ||
- name: Read package name | ||
id: package_name | ||
run: | | ||
echo $(ls -la) | ||
echo "package_name=$(cat artifacts/artifact_name.txt)" >> $GITHUB_OUTPUT | ||
echo "$(cat artifacts/artifact_name.txt)" | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.package_name.outputs.package_name }} | ||
path: artifacts/dist/${{ steps.package_name.outputs.package_name }} | ||
if-no-files-found: error | ||
|
||
# assemble: | ||
# release: |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# build files | ||
artifacts/ | ||
|
||
# intellij files | ||
.idea/ | ||
|
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