Remove dco and update artifact action to v4 (#1467) #1496
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
name: Security tests | |
# This workflow is triggered on pull requests to main branch | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- '*' | |
jobs: | |
build: | |
# Job name | |
name: Build and Run Security tests | |
runs-on: ubuntu-latest | |
steps: | |
# This step uses the setup-java Github action: https://github.com/actions/setup-java | |
- name: Set Up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
# This step uses the checkout Github action: https://github.com/actions/checkout | |
- name: Checkout Branch | |
uses: actions/checkout@v2 | |
# Security plugin dependency | |
- name: Checkout security | |
uses: actions/checkout@v2 | |
with: | |
repository: 'opensearch-project/security' | |
path: security | |
ref: '1.3' | |
- name: Build security | |
working-directory: ./security | |
run: | | |
./gradlew clean build -Dbuild.snapshot=false -x test | |
cp build/distributions/opensearch-security-1.3.19.0.zip ../src/test/resources/security/plugin/opensearch-security.zip | |
- name: Build and run Replication tests | |
run: | | |
ls -al src/test/resources/security/plugin | |
./gradlew clean release -Dbuild.snapshot=true -Dopensearch.version=1.3.19-SNAPSHOT -PnumNodes=1 -Psecurity=true | |
- name: Upload failed logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: logs | |
path: | | |
build/testclusters/integTest-*/logs/* | |
build/testclusters/leaderCluster-*/logs/* | |
build/testclusters/followCluster-*/logs/* | |
- name: Create Artifact Path | |
run: | | |
mkdir -p cross-cluster-replication-artifacts | |
cp ./build/distributions/*.zip cross-cluster-replication-artifacts | |
- name: Uploads coverage | |
with: | |
fetch-depth: 2 | |
uses: codecov/[email protected] |