-
Notifications
You must be signed in to change notification settings - Fork 344
Build OpenSearch in CD workflow in order to build security plugin #1364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,14 +11,25 @@ jobs: | |
|
|
||
| steps: | ||
|
|
||
| - name: Set up JDK 11 | ||
| - name: Set up JDK 14 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 11.0.x | ||
| java-version: 14.0.x | ||
| server-id: sonatype-nexus-staging | ||
| server-username: SONATYPE_USER | ||
| server-password: SONATYPE_PASSWORD | ||
|
|
||
| - name: Checkout OpenSearch | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'opensearch-project/OpenSearch' | ||
| path: OpenSearch | ||
| ref: '1.0' | ||
|
|
||
| - name: Build OpenSearch | ||
|
||
| working-directory: ./OpenSearch | ||
| run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false | ||
|
|
||
| - name: Checkout security | ||
| uses: actions/checkout@v2 | ||
|
|
||
|
|
@@ -41,42 +52,43 @@ jobs: | |
| zip -r artifacts.zip artifacts | ||
| echo "TAG_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
|
|
||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v1 | ||
| with: | ||
| aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }} | ||
| aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }} | ||
| aws-region: us-west-2 | ||
|
|
||
| - name: Upload Artifacts to S3 | ||
| run: | | ||
| zip=`ls artifacts/*.zip` | ||
| rpm=`ls artifacts/*.rpm` | ||
| deb=`ls artifacts/*.deb` | ||
|
|
||
| # Inject the build number before the suffix | ||
| zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip` | ||
| rpm_outfile=`basename ${rpm%.rpm}-build-${GITHUB_RUN_NUMBER}.rpm` | ||
| deb_outfile=`basename ${deb%.deb}-build-${GITHUB_RUN_NUMBER}.deb` | ||
|
|
||
| s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/elasticsearch-plugins/security/" | ||
|
|
||
| echo "Copying ${zip} to ${s3_prefix}${zip_outfile}" | ||
| aws s3 cp --quiet $zip ${s3_prefix}${zip_outfile} | ||
|
|
||
| echo "Copying ${rpm} to ${s3_prefix}${rpm_outfile}" | ||
| aws s3 cp --quiet $rpm ${s3_prefix}${rpm_outfile} | ||
|
|
||
| echo "Copying ${deb} to ${s3_prefix}${deb_outfile}" | ||
| aws s3 cp --quiet $deb ${s3_prefix}${deb_outfile} | ||
|
|
||
| - name: Upload Artifacts to Maven Central | ||
| env: | ||
| SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
| run: | | ||
| gpg --batch --import --no-tty <(echo -e "${{ secrets.PGP_PRIVATE_KEY }}") | ||
| mvn -B deploy -Padvanced -Prelease -DskipTests -Dgpg.passphrase=${{ secrets.PGP_PASSPHRASE }} | ||
| # TODO: Update the following configuration commented out once the new CI/CD process of OpenSearch is confirmed. | ||
cliu123 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # - name: Configure AWS Credentials | ||
| # uses: aws-actions/configure-aws-credentials@v1 | ||
| # with: | ||
| # aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }} | ||
| # aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }} | ||
| # aws-region: us-west-2 | ||
| # | ||
| # - name: Upload Artifacts to S3 | ||
| # run: | | ||
| # zip=`ls artifacts/*.zip` | ||
| # rpm=`ls artifacts/*.rpm` | ||
| # deb=`ls artifacts/*.deb` | ||
| # | ||
| # # Inject the build number before the suffix | ||
| # zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip` | ||
| # rpm_outfile=`basename ${rpm%.rpm}-build-${GITHUB_RUN_NUMBER}.rpm` | ||
| # deb_outfile=`basename ${deb%.deb}-build-${GITHUB_RUN_NUMBER}.deb` | ||
| # | ||
| # s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/elasticsearch-plugins/security/" | ||
| # | ||
| # echo "Copying ${zip} to ${s3_prefix}${zip_outfile}" | ||
| # aws s3 cp --quiet $zip ${s3_prefix}${zip_outfile} | ||
| # | ||
| # echo "Copying ${rpm} to ${s3_prefix}${rpm_outfile}" | ||
| # aws s3 cp --quiet $rpm ${s3_prefix}${rpm_outfile} | ||
| # | ||
| # echo "Copying ${deb} to ${s3_prefix}${deb_outfile}" | ||
| # aws s3 cp --quiet $deb ${s3_prefix}${deb_outfile} | ||
| # | ||
| # - name: Upload Artifacts to Maven Central | ||
| # env: | ||
| # SONATYPE_USER: ${{ secrets.SONATYPE_USER }} | ||
| # SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
| # run: | | ||
| # gpg --batch --import --no-tty <(echo -e "${{ secrets.PGP_PRIVATE_KEY }}") | ||
| # mvn -B deploy -Padvanced -Prelease -DskipTests -Dgpg.passphrase=${{ secrets.PGP_PASSPHRASE }} | ||
|
|
||
| - name: Create Github Draft Release | ||
| id: create_release | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.