Skip to content

Commit a1f0c12

Browse files
authored
[FDSE-2986] splunk10 compatibility (#6)
* chore(manifest):minor updates * style(dashboard):added currencypair value to the OHCL chart * chore(deps):updated dependencies * ci(ci):fixes and enhancements * ci(ci):fixed slim validate step * fix:updated built files with latest deps * ci(ci):fixed app bundle * chore:renamed dir with screenshots * ci:modified pipeline to support code move * chore:moved code * ci:run slim job for py3.9 only --------- Co-authored-by: Erica Pescio <[email protected]>
1 parent fe9d1d9 commit a1f0c12

Some content is hidden

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

51 files changed

+3678
-2218
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: CI
22

3-
on:
3+
on:
44
push:
55
paths-ignore:
66
- '.github/workflows/manual-release.yml'
@@ -9,93 +9,79 @@ jobs:
99
bundle-app:
1010
name: Bundle App
1111
runs-on: ubuntu-latest
12-
outputs:
13-
app_name: ${{ steps.appinfo.outputs.app_name }}
14-
app_id: ${{ steps.appinfo.outputs.app_id }}
1512
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v3
18-
19-
- name: Fetch and set app info
20-
id: appinfo
13+
- uses: actions/checkout@v4
14+
- name: Read App Info
15+
id: app
2116
run: |
22-
APP_ID=$(cat app.manifest | jq -r '.info.id.name')
23-
echo "app_id=${APP_ID}" >> $GITHUB_OUTPUT
24-
APP_NAME=$(echo "$APP_ID" | tr _ - )
25-
echo "app_name=${APP_NAME}" >> $GITHUB_OUTPUT
17+
app_id=$(cat splunk_*/app.manifest | jq -r '.info.id.name')
18+
app_version=$(cat splunk_*/app.manifest | jq -r '.info.id.version')
19+
echo "name=${app_id}" >> $GITHUB_OUTPUT
20+
echo "version=${app_version}" >> $GITHUB_OUTPUT
21+
working-directory: ./packages
2622

27-
- name: Excluding images from README
23+
- name: Bundle app source
24+
env:
25+
APP_NAME: ${{ steps.app.outputs.name }}
26+
APP_VERSION: ${{ steps.app.outputs.version }}
2827
run: |
28+
# Exclude images from README file
2929
sed -i '/^!/d' README.md
30+
cp README.md packages/$APP_NAME
31+
tar -C packages -zcvf $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/
3032
31-
- name: Bundle app source
32-
run: |
33-
mkdir dist
34-
tar -zcvf dist/${{ steps.appinfo.outputs.app_name }}.tgz --exclude='.[^/]*' --exclude=./dist .
35-
3633
- name: Upload artifact
37-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3835
with:
39-
name: app_tgz
40-
path: dist/${{ steps.appinfo.outputs.app_name }}.tgz
41-
36+
name: packaged_app
37+
path: ${{ steps.app.outputs.name }}*.tar.gz
38+
4239
slim-validate:
4340
name: SLIM Validation
4441
needs: bundle-app
4542
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
python-version: [ 3.9 ]
4646
steps:
4747
- name: Download artifact
48-
uses: actions/download-artifact@v3
48+
uses: actions/download-artifact@v4
4949
with:
50-
name: app_tgz
50+
name: packaged_app
5151

5252
- name: Set up Python
53-
uses: actions/setup-python@v4
53+
uses: actions/setup-python@v5
5454
with:
55-
python-version: 3.7
55+
python-version: ${{ matrix.python-version }}
5656

5757
- name: Install dependencies
5858
run: |
5959
python -m pip install --upgrade pip
6060
pip install splunk-packaging-toolkit
61-
62-
- name: Unpackage artifact
63-
run: |
64-
mkdir ${{ needs.bundle-app.outputs.app_id }}
65-
tar -xf ${{ needs.bundle-app.outputs.app_name }}.tgz -C ${{ needs.bundle-app.outputs.app_id }}
6661
6762
- name: Slim Validate
68-
run: slim validate ${{ needs.bundle-app.outputs.app_id }}
63+
run: slim validate *.tar.gz
6964

7065
appinspect-cli:
71-
name: AppInspect CLI Validation
66+
name: AppInspect CLI ${{ matrix.tags }}
7267
needs: bundle-app
7368
runs-on: ubuntu-latest
69+
strategy:
70+
matrix:
71+
tags:
72+
- "cloud"
73+
- "private_app"
74+
- "private_classic"
75+
- "private_victoria"
7476
steps:
75-
- name: Download artifact
76-
uses: actions/download-artifact@v3
77+
- uses: actions/download-artifact@v4
7778
with:
78-
name: app_tgz
79-
80-
- name: Unpackage artifact
81-
run: |
82-
mkdir -p build/${{ needs.bundle-app.outputs.app_id }}
83-
tar -xf ${{ needs.bundle-app.outputs.app_name }}.tgz -C build/${{ needs.bundle-app.outputs.app_id }}
84-
85-
- name: Setup Python
86-
uses: actions/setup-python@v4
79+
name: packaged_app
80+
path: dist
81+
- uses: splunk/[email protected]
8782
with:
88-
python-version: 3.7
89-
90-
- name: Install dependencies
91-
run: |
92-
python -m pip install splunk-appinspect
93-
94-
- name: Run AppInspect
95-
run: |
96-
splunk-appinspect inspect ${{ needs.bundle-app.outputs.app_id }} --output-file appinspect.json
97-
exit `cat appinspect.json | jq '.summary.failure'`
98-
working-directory: ./build
83+
app_path: dist
84+
included_tags: ${{ matrix.tags }}
9985

10086
# appinspect-api:
10187
# name: AppInspect API Validation

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ If not provided, default values will be used for optional fields `currencypair`,
2929

3030
> Field names **must** correspond to the ones specified above to be properly handled by the visualization
3131
32-
![alt text](.images/OHLC_candlestick.png "OHLC Chart - Candlestick Example")
32+
![alt text](etc/OHLC_candlestick.png "OHLC Chart - Candlestick Example")
3333

34-
![alt text](.images/OHLC_bars.png "OHLC Chart - Bars Example")
34+
![alt text](etc/OHLC_bars.png "OHLC Chart - Bars Example")
3535

3636
### Box Plot
3737
`<basesearch> | table box_name value`
@@ -43,7 +43,7 @@ Replace `box_name` and `value` with your fields to start.
4343
| `box_name` | string | Label of the box | `A` |
4444
| `value` | numeric | Data forming box dataset | `20` |
4545

46-
![alt text](.images/boxplot_chart.png "Boxplot Chart Example")
46+
![alt text](etc/boxplot_chart.png "Boxplot Chart Example")
4747

4848
### Multiple Axes Plot
4949
`<basesearch> | table _time scatter-y2-dataset1 scatter-y2_datasetN line-y-dataset1 line-y-datasetN`
@@ -60,12 +60,12 @@ Replace `_time`, `scatter-y2-datasetX` and `line-y-datasetX` with your fields to
6060

6161
> Field names **must** begin with `scatter` and `line` to be properly handled by the visualization
6262
63-
![alt text](.images/MultipleAxes_plot.png "Multiple Axes Plot")
63+
![alt text](etc/MultipleAxes_plot.png "Multiple Axes Plot")
6464

6565
## Example
6666
This app comes with a dashboard showcasing simple usages of mentioned charts.
6767

68-
* Navigate to `Apps / Search & Reporting / Dashboards`
68+
* Navigate to `Apps / Search & Reporting / Dashboards`
6969
* Click on the dashboard `Overview of Plotly Charts for Splunk`
7070
* Be inspired
7171

@@ -75,4 +75,4 @@ This app comes with a dashboard showcasing simple usages of mentioned charts.
7575
* :bulb: Got an idea for a **new feature**? [Open a feature request](https://github.com/splunk/splunk-plotly-collection-viz/issues/new?assignees=edro15&labels=&template=feature_request.md&title=)
7676

7777
## License
78-
This project is licensed under [Apache-2.0](LICENSE.md)
78+
This project is licensed under [Apache-2.0](./packages/splunk_plotly_collection_viz/LICENSE.md)

0 commit comments

Comments
 (0)