Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Commit d0b197e

Browse files
Ryan FairclothAddon Factory template
andauthored
feat(package): package test config apps (#11)
* feat(package): package test config apps * fix: use tested action * fixup Co-authored-by: Addon Factory template <[email protected]>
1 parent fe89a3a commit d0b197e

File tree

16 files changed

+273
-8
lines changed

16 files changed

+273
-8
lines changed

.github/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
find packages -type f -name app.* -exec sed -i -e "s/0.0.0/${1}/g" {} +
4+
find packages -type d -name default -exec ./.github/package.sh {} \;

.github/package.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
slim package $(dirname $1) -o /tmp
File renamed without changes.
File renamed without changes.

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: release
2+
on:
3+
# Trigger the workflow on push or pull request,
4+
# but only for the main branch
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
- name: Install dependencies
20+
run: |
21+
pip3 install https://download.splunk.com/misc/packaging-toolkit/splunk-packaging-toolkit-1.0.1.tar.gz
22+
- name: Semantic Release
23+
uses: cycjimmy/semantic-release-action@v2
24+
with:
25+
semantic_version: 16
26+
# you can set branches for semantic-release above v16.
27+
branches: |
28+
[
29+
'+([0-9])?(.{+([0-9]),x}).x',
30+
'master',
31+
{
32+
name: 'develop',
33+
prerelease: true
34+
},
35+
{
36+
name: 'alpha',
37+
prerelease: true
38+
}
39+
]
40+
extra_plugins: |
41+
@semantic-release/[email protected]
42+
@semantic-release/exec
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

.releaserc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
[
6+
"@semantic-release/exec",
7+
{
8+
"publishCmd": "./.github/build.sh ${nextRelease.version}"
9+
}
10+
],
11+
[
12+
"@semantic-release/github",
13+
{
14+
"assets": [
15+
"/tmp/addonfactory*"
16+
],
17+
"addReleases": "top"
18+
}
19+
]
20+
]
21+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
{
2+
"schemaVersion": "2.0.0",
3+
"info": {
4+
"title": null,
5+
"id": {
6+
"group": null,
7+
"name": "addonfactory_all_indexes",
8+
"version": "0.0.0"
9+
},
10+
"author": [],
11+
"releaseDate": null,
12+
"description": null,
13+
"classification": {
14+
"intendedAudience": null,
15+
"categories": [],
16+
"developmentStatus": null
17+
},
18+
"commonInformationModels": null,
19+
"license": {
20+
"name": null,
21+
"text": null,
22+
"uri": null
23+
},
24+
"privacyPolicy": {
25+
"name": null,
26+
"text": null,
27+
"uri": null
28+
},
29+
"releaseNotes": {
30+
"name": null,
31+
"text": null,
32+
"uri": null
33+
}
34+
},
35+
"dependencies": null,
36+
"tasks": null,
37+
"inputGroups": null,
38+
"incompatibleApps": null,
39+
"platformRequirements": null,
40+
"supportedDeployments": [
41+
"*"
42+
],
43+
"targetWorkloads": ["*"]
44+
}
45+
# The following sections can be customized and added to the manifest. For detailed information,
46+
# see the documentation at http://dev.splunk.com/view/packaging-toolkit/SP-CAAAE9V
47+
#
48+
# Lists the app dependencies and version requirements
49+
# "dependencies": {
50+
# "<app-group>:<app-name>": {
51+
# "version": "*",
52+
# "package": "<source-package-name>",
53+
# "optional": [true|false]
54+
# }
55+
# }
56+
#
57+
# Lists the inputs that belong on the search head rather than forwarders
58+
# "tasks": []
59+
#
60+
# Lists the possible input groups with app dependencies, and inputs that should be included
61+
# "inputGroups": {
62+
# "<group-name>": {
63+
# "requires": {
64+
# "<app-group>:<app-name>": ["<dependent-input-groups>"]
65+
# },
66+
# "inputs": ["<defined-inputs>"]
67+
# }
68+
# }
69+
#
70+
# Lists the app IDs that cannot be installed on the system alongside this app
71+
# "incompatibleApps": {
72+
# "<app-group>:<app-name>": "<version>"
73+
# }
74+
#
75+
# Specify the platform version requirements for this app
76+
# "platformRequirements": {
77+
# "splunk": {
78+
# "Enterprise": "<version>"
79+
# }
80+
# }
81+
#
82+
# Lists the supported deployment types this app can be installed on
83+
# "supportedDeployments": ["*" | "_standalone" | "_distributed" | "_search_head_clustering"]
84+
#
85+
# Lists the targets where app can be installed to
86+
# "targetWorkloads": ["*" | "_search_heads" | "_indexers" | "_forwarders"]
87+
#
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[launcher]
2+
version= 0.0.0
3+
4+
[package]
5+
check_for_updates = false
6+
id = addonfactory_all_indexes
7+
8+
[install]
9+
allows_disable = false
10+
11+
[ui]
12+
is_visible = false
13+

0 commit comments

Comments
 (0)