Skip to content

Commit

Permalink
test env
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored and cliu123 committed Apr 6, 2022
1 parent b048953 commit 640a62a
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,34 @@ jobs:
steps:
- uses: actions/checkout@v2

- run: ./gradlew clean assemble

- uses: actions/setup-java@v1
with:
java-version: 11

- run: ./gradlew clean assemble
- run: |
echo security_plugin_version=$(./gradlew properties -q | grep -E "^version:" | awk '{print $2}') >> $GITHUB_ENV
test -s ./build/opensearch-security-$security_plugin_version.jar
security_plugin_version=$(./gradlew properties -q | grep -E '^version:' | awk '{print $2}')
security_plugin_version_no_snapshot=$(echo $security_plugin_version | sed 's/-SNAPSHOT//g')
security_plugin_version_only_number=$(echo $security_plugin_version_no_snapshot | cut -d- -f1)
test_qualifier=alpha2
echo "SECURITY_PLUGIN_VERSION=$security_plugin_version" >> $GITHUB_ENV
echo "SECURITY_PLUGIN_VERSION_NO_SNAPSHOT=$security_plugin_version_no_snapshot" >> $GITHUB_ENV
echo "SECURITY_PLUGIN_VERSION_ONLY_NUMBER=$security_plugin_version_only_number" >> $GITHUB_ENV
echo "TEST_QUALIFIER=$test_qualifier" >> $GITHUB_ENV
- run: ./gradlew clean assemble -Dbuild.snapshot=false
- run: |
echo security_plugin_version_no_snapshot=$(/gradlew properties -q | grep -E "^version:" | awk '{print $2}' | sed 's/-SNAPSHOT//g') >> $GITHUB_ENV
test -s ./build/opensearch-security-$security_plugin_version_no_snapshot.jar
echo ${{ env.SECURITY_PLUGIN_VERSION }}
echo ${{ env.SECURITY_PLUGIN_VERSION_NO_SNAPSHOT }}
echo ${{ env.SECURITY_PLUGIN_VERSION_ONLY_NUMBER }}
echo ${{ env.TEST_QUALIFIER }}
- run: ./gradlew clean assemble && test -s ./build/opensearch-security-${{ env.SECURITY_PLUGIN_VERSION }}.jar

- run: ./gradlew clean assemble -Dbuild.snapshot=false && test -s ./build/opensearch-security-${{ env.SECURITY_PLUGIN_VERSION_NO_SNAPSHOT }}.jar

- run: ./gradlew clean assemble -Dbuild.snapshot=false -Dbuild.version_qualifier=alpha1
- run: test -s ./build/opensearch-security-$security_plugin_version_no_snapshot.jar
- run: ./gradlew clean assemble -Dbuild.snapshot=false -Dbuild.version_qualifier=${{ env.TEST_QUALIFIER }} && test -s ./build/opensearch-security-${{ env.SECURITY_PLUGIN_VERSION_ONLY_NUMBER }}-${{ env.TEST_QUALIFIER }}.jar

- run: ./gradlew clean assemble -Dbuild.version_qualifier=alpha1
- run: test -s ./build/opensearch-security-$security_plugin_version.jar
- run: ./gradlew clean assemble -Dbuild.version_qualifier=${{ env.TEST_QUALIFIER }} && test -s ./build/opensearch-security-${{ env.SECURITY_PLUGIN_VERSION_ONLY_NUMBER }}-${{ env.TEST_QUALIFIER }}-SNAPSHOT.jar

- name: List files in the build directory if there was an error
run: ls -al ./build/
Expand Down

0 comments on commit 640a62a

Please sign in to comment.