forked from opensearch-project/cross-cluster-replication
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.11 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Test and Build Workflow
# This workflow is triggered on pull requests to main branch
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
jobs:
build:
# Job name
name: Build Replication plugin
runs-on: ubuntu-latest
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
# dependencies: OpenSearch
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
# TODO: Switch to OS 1.x branch
repository: 'saikaranam-amazon/OpenSearch'
path: OpenSearch
ref: '1.1-repl-all-changes'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: |
./gradlew publishToMavenLocal -Dbuild.snapshot=true
# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
ref: 'main'
repository: 'opensearch-project/common-utils'
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=true -Dopensearch.version=1.1.0-SNAPSHOT
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
./gradlew clean release -Dbuild.snapshot=true -Dopensearch.version=1.1.0-SNAPSHOT
- name: Upload failed logs
uses: actions/upload-artifact@v2
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
uses: codecov/[email protected]