Skip to content

Commit

Permalink
ci: test and release
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaircloth-splunk committed Feb 14, 2021
1 parent 5ea99b4 commit 29cd440
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 37 deletions.
44 changes: 7 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ jobs:
default: py3-3.7.8
docker:
- image: circleci/python:3.7
resource_class: xlarge
resource_class: large
steps:
- checkout
- run: git submodule sync
Expand Down Expand Up @@ -460,42 +460,6 @@ jobs:
- store_test_results:
path: test-results

release:
docker:
- image: circleci/node:12
steps:
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: /tmp/workspace
- checkout
- run:
name: "Apply Release Tag"
command: |
npx semantic-release
publish-sbase:
docker:
- image: circleci/python:3.7
steps:
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: /tmp/workspace
- checkout
- run:
name: Install utils
command: |
pip install git+https://github.com/pixelb/crudini
- run:
name: "Publish on Splunkbase"
command: |
source .splunkbase
PACKAGE=$(ls /tmp/workspace/build/package/splunkbase/*)
PACKAGE_ID=$(crudini --get package/default/app.conf id name)
[[ << pipeline.git.tag >> =~ ^v[0-9]*.[0-9]*.[0-9]*$ ]] || export ISPRE=-prerelease
[ "${ISPRE}" == "-prerelease" ] && SPLUNKBASE_VIS="false" || SPLUNKBASE_VIS="true"
curl -u ${SPLUNKBASE_USERNAME}:${SPLUNKBASE_PASSWORD} --request POST https://splunkbase.splunk.com/api/v1/app/${SPLUNKBASE_ID}/new_release/ -F "files[]=@${PACKAGE}" -F "filename=${PACKAGE_ID}.spl" -F "splunk_versions=${SPLUNKBASE_SPLUNK_VERSION}" -F "visibility=${SPLUNKBASE_VIS}"
reuse:
docker:
- image: circleci/python:3.7
Expand Down Expand Up @@ -619,6 +583,12 @@ workflows:
args: [""]
requires:
- package
- reuse
- splunk-app-inspect
- splunk-app-test-knowledge
- splunk-app-test-ui
- splunk-app-test-modinput
- splunk-app-backend-test
name: release
context:
- gdi-github
Expand Down
5 changes: 5 additions & 0 deletions .circleci/package_release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
##
## SPDX-FileCopyrightText: 2020 Splunk, Inc. <sales@splunk.com>
## SPDX-License-Identifier: LicenseRef-Splunk-1-2020
##
##
VERSION=$(echo $1 | sed "s/-develop./develop/g")
echo VERSION="$VERSION"
source ~/.venv/bin/activate
Expand Down
5 changes: 5 additions & 0 deletions .circleci/publish.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
##
## SPDX-FileCopyrightText: 2020 Splunk, Inc. <sales@splunk.com>
## SPDX-License-Identifier: LicenseRef-Splunk-1-2020
##
##
source .splunkbase
source ~/.venv/bin/activate
PACKAGE=$(ls build/package/splunkbase/*)
Expand Down

0 comments on commit 29cd440

Please # to comment.