diff --git a/.github/build.sh b/.github/build.sh new file mode 100755 index 0000000..d1a24d3 --- /dev/null +++ b/.github/build.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +find packages -type f -name app.* -exec sed -i -e "s/0.0.0/${1}/g" {} + +find packages -type d -name default -exec ./.github/package.sh {} \; \ No newline at end of file diff --git a/.github/package.sh b/.github/package.sh new file mode 100755 index 0000000..aa29be4 --- /dev/null +++ b/.github/package.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +slim package $(dirname $1) -o /tmp \ No newline at end of file diff --git a/sc4s_sync.sh b/.github/sc4s_sync.sh similarity index 100% rename from sc4s_sync.sh rename to .github/sc4s_sync.sh diff --git a/splunk_sync.sh b/.github/splunk_sync.sh similarity index 100% rename from splunk_sync.sh rename to .github/splunk_sync.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7d399a8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: release +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install dependencies + run: | + pip3 install https://download.splunk.com/misc/packaging-toolkit/splunk-packaging-toolkit-1.0.1.tar.gz + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v2 + with: + semantic_version: 16 + # you can set branches for semantic-release above v16. + branches: | + [ + '+([0-9])?(.{+([0-9]),x}).x', + 'master', + { + name: 'develop', + prerelease: true + }, + { + name: 'alpha', + prerelease: true + } + ] + extra_plugins: | + @semantic-release/changelog@3.0.0 + @semantic-release/exec + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d17dae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.venv diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..426cc7b --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,21 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/exec", + { + "publishCmd": "./.github/build.sh ${nextRelease.version}" + } + ], + [ + "@semantic-release/github", + { + "assets": [ + "/tmp/addonfactory*" + ], + "addReleases": "top" + } + ] + ] +} \ No newline at end of file diff --git a/packages/all/common/addonfactory_all_indexes/app.manifest b/packages/all/common/addonfactory_all_indexes/app.manifest new file mode 100644 index 0000000..54de70a --- /dev/null +++ b/packages/all/common/addonfactory_all_indexes/app.manifest @@ -0,0 +1,87 @@ +{ + "schemaVersion": "2.0.0", + "info": { + "title": null, + "id": { + "group": null, + "name": "addonfactory_all_indexes", + "version": "0.0.0" + }, + "author": [], + "releaseDate": null, + "description": null, + "classification": { + "intendedAudience": null, + "categories": [], + "developmentStatus": null + }, + "commonInformationModels": null, + "license": { + "name": null, + "text": null, + "uri": null + }, + "privacyPolicy": { + "name": null, + "text": null, + "uri": null + }, + "releaseNotes": { + "name": null, + "text": null, + "uri": null + } + }, + "dependencies": null, + "tasks": null, + "inputGroups": null, + "incompatibleApps": null, + "platformRequirements": null, + "supportedDeployments": [ + "*" + ], + "targetWorkloads": ["*"] +} +# The following sections can be customized and added to the manifest. For detailed information, +# see the documentation at http://dev.splunk.com/view/packaging-toolkit/SP-CAAAE9V +# +# Lists the app dependencies and version requirements +# "dependencies": { +# ":": { +# "version": "*", +# "package": "", +# "optional": [true|false] +# } +# } +# +# Lists the inputs that belong on the search head rather than forwarders +# "tasks": [] +# +# Lists the possible input groups with app dependencies, and inputs that should be included +# "inputGroups": { +# "": { +# "requires": { +# ":": [""] +# }, +# "inputs": [""] +# } +# } +# +# Lists the app IDs that cannot be installed on the system alongside this app +# "incompatibleApps": { +# ":": "" +# } +# +# Specify the platform version requirements for this app +# "platformRequirements": { +# "splunk": { +# "Enterprise": "" +# } +# } +# +# Lists the supported deployment types this app can be installed on +# "supportedDeployments": ["*" | "_standalone" | "_distributed" | "_search_head_clustering"] +# +# Lists the targets where app can be installed to +# "targetWorkloads": ["*" | "_search_heads" | "_indexers" | "_forwarders"] +# diff --git a/packages/all/common/addonfactory_all_indexes/default/app.conf b/packages/all/common/addonfactory_all_indexes/default/app.conf new file mode 100644 index 0000000..f010ae4 --- /dev/null +++ b/packages/all/common/addonfactory_all_indexes/default/app.conf @@ -0,0 +1,13 @@ +[launcher] +version= 0.0.0 + +[package] +check_for_updates = false +id = addonfactory_all_indexes + +[install] +allows_disable = false + +[ui] +is_visible = false + diff --git a/packages/all/common/addonfactory_indexes/default/indexes.conf b/packages/all/common/addonfactory_all_indexes/default/indexes.conf similarity index 100% rename from packages/all/common/addonfactory_indexes/default/indexes.conf rename to packages/all/common/addonfactory_all_indexes/default/indexes.conf diff --git a/packages/all/sh/addonfactor_disable_popup/default/user-prefs.conf b/packages/all/sh/addonfactor_disable_popup/default/user-prefs.conf deleted file mode 100644 index 9c3cfdd..0000000 --- a/packages/all/sh/addonfactor_disable_popup/default/user-prefs.conf +++ /dev/null @@ -1,8 +0,0 @@ -[general] -render_version_messages = 0 -hideInstrumentationOptInModal = 1 -dismissedInstrumentationOptInVersion = 2 - -[general_default] -hideInstrumentationOptInModal = 1 -showWhatsNew = 0 diff --git a/packages/all/sh/addonfactory_sh_web/app.manifest b/packages/all/sh/addonfactory_sh_web/app.manifest new file mode 100644 index 0000000..ea9ec27 --- /dev/null +++ b/packages/all/sh/addonfactory_sh_web/app.manifest @@ -0,0 +1,87 @@ +{ + "schemaVersion": "2.0.0", + "info": { + "title": null, + "id": { + "group": null, + "name": "addonfactory_sh_web", + "version": "0.0.0" + }, + "author": [], + "releaseDate": null, + "description": null, + "classification": { + "intendedAudience": null, + "categories": [], + "developmentStatus": null + }, + "commonInformationModels": null, + "license": { + "name": null, + "text": null, + "uri": null + }, + "privacyPolicy": { + "name": null, + "text": null, + "uri": null + }, + "releaseNotes": { + "name": null, + "text": null, + "uri": null + } + }, + "dependencies": null, + "tasks": null, + "inputGroups": null, + "incompatibleApps": null, + "platformRequirements": null, + "supportedDeployments": [ + "*" + ], + "targetWorkloads": ["*"] +} +# The following sections can be customized and added to the manifest. For detailed information, +# see the documentation at http://dev.splunk.com/view/packaging-toolkit/SP-CAAAE9V +# +# Lists the app dependencies and version requirements +# "dependencies": { +# ":": { +# "version": "*", +# "package": "", +# "optional": [true|false] +# } +# } +# +# Lists the inputs that belong on the search head rather than forwarders +# "tasks": [] +# +# Lists the possible input groups with app dependencies, and inputs that should be included +# "inputGroups": { +# "": { +# "requires": { +# ":": [""] +# }, +# "inputs": [""] +# } +# } +# +# Lists the app IDs that cannot be installed on the system alongside this app +# "incompatibleApps": { +# ":": "" +# } +# +# Specify the platform version requirements for this app +# "platformRequirements": { +# "splunk": { +# "Enterprise": "" +# } +# } +# +# Lists the supported deployment types this app can be installed on +# "supportedDeployments": ["*" | "_standalone" | "_distributed" | "_search_head_clustering"] +# +# Lists the targets where app can be installed to +# "targetWorkloads": ["*" | "_search_heads" | "_indexers" | "_forwarders"] +# diff --git a/packages/all/sh/addonfactory_sh_web/default/app.conf b/packages/all/sh/addonfactory_sh_web/default/app.conf new file mode 100644 index 0000000..ef413a8 --- /dev/null +++ b/packages/all/sh/addonfactory_sh_web/default/app.conf @@ -0,0 +1,13 @@ +[launcher] +version= 0.0.0 + +[package] +check_for_updates = false +id = addonfactory_sh_web + +[install] +allows_disable = false + +[ui] +is_visible = false + diff --git a/packages/all/sh/addonfactory_auth/default/authorize.conf b/packages/all/sh/addonfactory_sh_web/default/authorize.conf similarity index 100% rename from packages/all/sh/addonfactory_auth/default/authorize.conf rename to packages/all/sh/addonfactory_sh_web/default/authorize.conf diff --git a/packages/all/common/disable_popups/default/user-prefs.conf b/packages/all/sh/addonfactory_sh_web/default/user-prefs.conf similarity index 100% rename from packages/all/common/disable_popups/default/user-prefs.conf rename to packages/all/sh/addonfactory_sh_web/default/user-prefs.conf diff --git a/packages/all/addon_factory_web/web.conf b/packages/all/sh/addonfactory_sh_web/default/web.conf similarity index 100% rename from packages/all/addon_factory_web/web.conf rename to packages/all/sh/addonfactory_sh_web/default/web.conf