Skip to content

Commit 386b779

Browse files
authored
Moved contents of bundle-workflow to the root. (#678)
Signed-off-by: dblock <[email protected]>
1 parent b93f2e2 commit 386b779

File tree

253 files changed

+369
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+369
-379
lines changed

bundle-workflow/.flake8 .flake8

File renamed without changes.

.github/workflows/bundle-workflow.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ name: bundle-workflow
33
on:
44
push:
55
paths:
6-
- bundle-workflow/**
6+
- src/**
7+
- tests/**
78
pull_request:
89
paths:
9-
- bundle-workflow/**
10+
- src/**
11+
- tests/**
1012

1113
jobs:
1214
test:
@@ -18,9 +20,6 @@ jobs:
1820
runs-on: ${{ matrix.os }}
1921
env:
2022
PYTHON_VERSION: 3.7
21-
defaults:
22-
run:
23-
working-directory: ./bundle-workflow
2423
steps:
2524
- uses: actions/checkout@v2
2625
- name: Set up Python ${{ env.PYTHON_VERSION }}
@@ -46,4 +45,4 @@ jobs:
4645
- name: Upload Coverage Report
4746
uses: codecov/codecov-action@v2
4847
with:
49-
files: ./bundle-workflow/coverage.xml
48+
files: ./coverage.xml

.github/workflows/manifests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
python -m pip install --upgrade pipenv wheel
4444
- name: OpenSearch Manifests
4545
run: |
46-
./bundle-workflow/ci.sh ${{ matrix.manifest }} --snapshot
46+
./ci.sh ${{ matrix.manifest }} --snapshot

.github/workflows/versions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
key: ${{ runner.os }}-build-cache-maven-local
3131
- name: Update OpenSearch Manifests
3232
run: |
33-
./bundle-workflow/manifests.sh update
33+
./manifests.sh update
3434
- name: Create Pull Request
3535
uses: peter-evans/create-pull-request@v3
3636
with:

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ out.txt
1616

1717
/artifacts/
1818
/bundle/
19-
/bundle-workflow/artifacts/
20-
/bundle-workflow/bundle/

bundle-workflow/.pre-commit-config.yaml .pre-commit-config.yaml

+4-8
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,21 @@ repos:
77
- id: isort
88
stages: [commit]
99
name: isort
10-
entry: bash -c 'cd bundle-workflow && pipenv run isort --check .'
10+
entry: bash -c 'pipenv run isort --check .'
1111
language: system
1212
types: [python]
13-
files: ^bundle-workflow/
1413
- id: flake8
1514
stages: [commit]
1615
name: flake8
17-
entry: bash -c 'cd bundle-workflow && pipenv run flake8 .'
16+
entry: bash -c 'pipenv run flake8 .'
1817
language: system
19-
files: ^bundle-workflow/
2018
- id: mypy
2119
stages: [commit]
2220
name: mypy
23-
entry: bash -c 'cd bundle-workflow && pipenv run mypy .'
21+
entry: bash -c 'pipenv run mypy .'
2422
language: system
25-
files: ^bundle-workflow/
2623
- id: pytest
2724
stages: [commit]
2825
name: pytest
29-
entry: bash -c 'cd bundle-workflow && pipenv run pytest'
26+
entry: bash -c 'pipenv run pytest'
3027
language: system
31-
files: ^bundle-workflow/

DEVELOPER_GUIDE.md

+6-13
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ npm install -g yarn
7070
Install dependencies.
7171

7272
```
73-
cd bundle-workflow
74-
~/.../bundle-workflow $ pipenv install
73+
$ pipenv install
7574
Installing dependencies from Pipfile.lock (1f4869)...
7675
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
7776
To activate this project's virtualenv, run pipenv shell.
@@ -80,16 +79,16 @@ Alternatively, run a command inside the virtualenv with pipenv run.
8079

8180
### Run Tests
8281

83-
This project uses [pytest](https://docs.pytest.org/en/6.x/) to ensure code quality. See [bundle-workflow/tests](bundle-workflow).
82+
This project uses [pytest](https://docs.pytest.org/en/6.x/) to ensure code quality. See [tests](tests).
8483

8584
```
86-
~/.../bundle-workflow $ pipenv run pytest
85+
$ pipenv run pytest
8786
2 passed in 02s
8887
```
8988

9089
### Run bundle-workflow
9190

92-
Try running `./build.sh` from [bundle-workflow](./bundle-workflow). It should complete and show usage.
91+
Try running `./build.sh`. It should complete and show usage.
9392

9493
```
9594
$ ./build.sh
@@ -124,7 +123,7 @@ Use `isort .` to fix any sorting order.
124123

125124
```
126125
$ pipenv run isort .
127-
Fixing bundle-workflow/tests/system/test_arch.py
126+
Fixing tests/system/test_arch.py
128127
```
129128

130129
Use [black](https://black.readthedocs.io/en/stable/) to auto-format your code.
@@ -143,7 +142,7 @@ This project uses [mypy](https://github.com/python/mypy) as an optional static t
143142

144143
```
145144
pipenv run mypy .
146-
bundle-workflow/src/assemble.py:14: error: Cannot find implementation or library stub for module named "assemble_workflow.bundle"
145+
src/assemble.py:14: error: Cannot find implementation or library stub for module named "assemble_workflow.bundle"
147146
```
148147

149148
### Code Coverage
@@ -160,12 +159,6 @@ TOTAL 23491 12295 48%
160159

161160
### Pre-Commit Cheatsheet
162161

163-
Run from `bundle-workflow` before making pull requests.
164-
165-
```
166-
cd bundle-workflow
167-
```
168-
169162
The pre-commit hook checks for imports, type, style and test.
170163

171164
```

bundle-workflow/Jenkinsfile Jenkinsfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pipeline {
4444
steps {
4545
script {
4646
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
47-
sh "./bundle-workflow/build.sh manifests/$INPUT_MANIFEST --snapshot"
47+
sh "./build.sh manifests/$INPUT_MANIFEST --snapshot"
4848
withCredentials([usernamePassword(credentialsId: 'Sonatype', usernameVariable: 'SONATYPE_USERNAME', passwordVariable: 'SONATYPE_PASSWORD')]) {
4949
sh('$WORKSPACE/publish/publish-snapshot.sh $WORKSPACE/artifacts/$ARTIFACT_PATH/maven')
5050
}
@@ -120,8 +120,8 @@ pipeline {
120120
void build() {
121121
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
122122

123-
sh "./bundle-workflow/build.sh manifests/$INPUT_MANIFEST"
124-
sh './bundle-workflow/assemble.sh artifacts/manifest.yml'
123+
sh "./build.sh manifests/$INPUT_MANIFEST"
124+
sh './assemble.sh artifacts/manifest.yml'
125125

126126
script { manifest = readYaml(file: 'artifacts/manifest.yml') }
127127
def artifactPath = "${manifest.build.version}/${OPENSEARCH_BUILD_ID}/${manifest.build.architecture}";

ONBOARDING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ This document describes steps to onboard a new plugin to release workflow for co
1010

1111
3. Ensure your `build.sh` reads and passes along both `-Dbuild.snapshot=` and `-Dopensearch.version=` flags. Snapshot builds should produce a -SNAPSHOT tagged artifact for example `opensearch-plugin-1.1.0.0-SNAPSHOT.zip` where a release build of the same component would produce `opensearch-plugin-1.1.0.0.zip`.
1212

13-
4. Execute `./bundle-workflow/build.sh` to ensure your component builds and all artifacts are correctly placed into ./artifacts/ with correct output names.
13+
4. Execute `./build.sh` to ensure your component builds and all artifacts are correctly placed into ./artifacts/ with correct output names.
1414

15-
5. Execute `./bundle-workflow/assemble.sh` to ensure the full bundle is assembled and placed in to /bundles/*.tar.gz. Unpack the tarball to ensure all your components are placed in their correct locations.
15+
5. Execute `./assemble.sh` to ensure the full bundle is assembled and placed in to /bundles/*.tar.gz. Unpack the tarball to ensure all your components are placed in their correct locations.
1616

1717
6. Publish a PR to this repo including the updated manifest and the names of the artifacts being added.
1818

1919
### Step 2: Onboard to `test-workflow`
2020

21-
1. Update the test configuration file, [test_manifest.yml](https://github.com/opensearch-project/opensearch-build/blob/main/bundle-workflow/src/test_workflow/config/test_manifest.yml), for a particular release, to include your plugin. This test configuration defines full suite of tests - `integ`, `bwc`, that can be run on the plugin.
21+
1. Update the test configuration file, [test_manifest.yml](src/test_workflow/config/test_manifest.yml), for a particular release, to include your plugin. This test configuration defines full suite of tests - `integ`, `bwc`, that can be run on the plugin.
2222

23-
2. For integration testing, the `test-workflow` runs integration tests available in the plugin repository. You will need to add `integ-test` config for your plugin in test_manifest.yml, [example](https://github.com/opensearch-project/opensearch-build/blob/85bbe204e947d5d1579af771bbafe399c11cbd70/bundle-workflow/src/test_workflow/config/test_manifest.yml#L3).
23+
2. For integration testing, the `test-workflow` runs integration tests available in the plugin repository. You will need to add `integ-test` config for your plugin in test_manifest.yml, [example](src/test_workflow/config/test_manifest.yml#L3).
2424
1. It supports two test configs - `with-security` and `without-security`, which runs test with security plugin enabled and disabled respectively. Choose one or both depending on what your plugin integration tests support.
2525
2. If your plugin is dependent on `job-scheduler` zip, you can define that in `build-dependencies` in the config. Currently, the test workflow only supports `job-scheduler` as build dependency. Please create an issue if your plugin needs more support.
2626

27-
3. For backward compatibility testing, the `test-workflow` runs backward compatibility tests available in the plugin repository, (see [reference]((https://github.com/opensearch-project/anomaly-detection/blob/d9a122d05282f7efc1e24c61d64f18dec0fd47af/build.gradle#L428))). Like integration test, it has a set of configurable options defined in test_manifest.yml, [example](https://github.com/opensearch-project/opensearch-build/blob/85bbe204e947d5d1579af771bbafe399c11cbd70/bundle-workflow/src/test_workflow/config/test_manifest.yml#L8).
27+
3. For backward compatibility testing, the `test-workflow` runs backward compatibility tests available in the plugin repository, (see [reference]((https://github.com/opensearch-project/anomaly-detection/blob/d9a122d05282f7efc1e24c61d64f18dec0fd47af/build.gradle#L428))). Like integration test, it has a set of configurable options defined in test_manifest.yml, [example](src/test_workflow/config/test_manifest.yml#L8).

bundle-workflow/Pipfile Pipfile

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)