Skip to content

Commit e9c2a03

Browse files
authored
ci:updated pipelines, upgraded test dependencies (#46)
* chore(bumpversion):updated path to files * ci:merged pipeline to build app and run appinspect * ci:replaced manual release with release based on changelog file * chore:added changelog file * ci:added manual pipeline to bump app version * ci(tests):removed slim validation * docs(contributing):updated release section * test:install PSC v3.2.1 instead of 4.1.2 in splunk * ci(tests):removed splunk 8.2.0,updated mltk package * build(docker-compose):updated mltk to v5.4.2 * build:replaced package-lock.json * ci(tests):skip npm install step * test:reset splunk password * style:removed whitespaces * chore(docker-compose):removed version * ci(tests):added splunk health check * ci(tests):replaced localhost with ip * ci(tests):added baseUrl with ip instead of localhost * tests:modified basedUrl * ci(tests):use localhost instead of ip for curls * ci(tests):fixed wrong variable usage * style:removed comment * style:removed comment * ci(tests):added tests in splunk 10 * ci(tests):added splunk general terms acceptance parameter to launch splunk --------- Co-authored-by: Erica Pescio <[email protected]>
1 parent 4200d72 commit e9c2a03

File tree

16 files changed

+1606
-778
lines changed

16 files changed

+1606
-778
lines changed

.bumpversion.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[bumpversion]
22
current_version = 1.4.0
33
commit = True
4-
tag = True
4+
tag = False
55

6-
[bumpversion:file:app.manifest]
6+
[bumpversion:file:packages/splunk-3D-graph-network-topology-viz/app.manifest]
77
search = "version": "{current_version}"
88
replace = "version": "{new_version}"
99

10-
[bumpversion:file:default/app.conf]
10+
[bumpversion:file:packages/splunk-3D-graph-network-topology-viz/default/app.conf]
1111
search = version = {current_version}
1212
replace = version = {new_version}
1313

14-
[bumpversion:file:appserver/static/visualizations/3d_graph_network_topology_viz/package.json]
14+
[bumpversion:file:packages/splunk-3D-graph-network-topology-viz/appserver/static/visualizations/3d_graph_network_topology_viz/package.json]
1515
search = "version": "{current_version}"
1616
replace = "version": "{new_version}"
1717

18-
[bumpversion:file:appserver/static/visualizations/3d_graph_network_topology_viz/package-lock.json]
18+
[bumpversion:file:packages/splunk-3D-graph-network-topology-viz/appserver/static/visualizations/3d_graph_network_topology_viz/package-lock.json]
1919
search = "version": "{current_version}"
2020
replace = "version": "{new_version}"

.github/workflows/appinspect.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build the App and Run AppInspect
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'packages/**'
7+
types: [opened, reopened, synchronize]
8+
9+
# Allow only 1 concurrent execution
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
name: Generate App Bundle
17+
runs-on: ubuntu-latest
18+
outputs:
19+
artifact_name: ${{ steps.app.outputs.artifact_name }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Read App Info
23+
id: app
24+
run: |
25+
app_id=$(cat splunk-*/app.manifest | jq -r '.info.id.name')
26+
app_version=$(cat splunk-*/app.manifest | jq -r '.info.id.version')
27+
echo "name=${app_id}" >> $GITHUB_OUTPUT
28+
echo "version=${app_version}" >> $GITHUB_OUTPUT
29+
echo "artifact_name=${app_id}-${app_version}" >> $GITHUB_OUTPUT
30+
working-directory: ./packages
31+
32+
- name: Bundle App Source
33+
env:
34+
APP_NAME: ${{ steps.app.outputs.name }}
35+
APP_VERSION: ${{ steps.app.outputs.version }}
36+
run: |
37+
# Exclude images from README file
38+
sed -i '/^!/d' README.md
39+
cp README.md packages/$APP_NAME
40+
tar -C packages -zcvf $APP_NAME-$APP_VERSION.tar.gz $APP_NAME/
41+
42+
- name: Upload artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: ${{ steps.app.outputs.artifact_name }}
46+
path: ${{ steps.app.outputs.name }}*.tar.gz
47+
48+
slim-validate:
49+
name: SLIM Validation
50+
needs: build
51+
runs-on: ubuntu-latest
52+
strategy:
53+
matrix:
54+
python-version: [ 3.9 ]
55+
steps:
56+
- name: Download artifact
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: ${{ needs.build.outputs.artifact_name }}
60+
61+
- name: Set up Python
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
66+
- name: Install dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install splunk-packaging-toolkit
70+
71+
- name: Slim Validate
72+
run: slim validate *.tar.gz
73+
74+
appinspect-cli:
75+
name: AppInspect CLI ${{ matrix.tags }}
76+
needs: build
77+
runs-on: ubuntu-latest
78+
strategy:
79+
matrix:
80+
tags:
81+
- "cloud"
82+
- "private_app"
83+
- "private_classic"
84+
- "private_victoria"
85+
steps:
86+
- uses: actions/download-artifact@v4
87+
with:
88+
name: ${{ needs.build.outputs.artifact_name }}
89+
path: dist
90+
- uses: splunk/[email protected]
91+
with:
92+
app_path: dist
93+
included_tags: ${{ matrix.tags }}

.github/workflows/build.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/bumpversion.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Bump Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
bumpPart:
7+
description: 'Bump part (major, minor or patch)'
8+
required: true
9+
default: "minor"
10+
11+
# Add permission to push to repo
12+
permissions:
13+
contents: write
14+
15+
# Allow only 1 concurrent execution
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
bump:
22+
name: Bump App Version
23+
runs-on: ubuntu-latest
24+
# Sanity check on the input
25+
if: contains(['major', 'minor', 'patch'], ${{ github.event.inputs.bumpPart }})
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Bump version
29+
id: bumpversion
30+
uses: jasonamyers/[email protected]
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
DEFAULT_BUMP: ${{ github.event.inputs.bumpPart }}
34+
- name: Push
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
run: |
38+
remote_repo="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
39+
git push "$remote_repo" HEAD:"${GITHUB_REF#refs/heads/}"

0 commit comments

Comments
 (0)