Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #49 from splunk/test/github-publish-release
Browse files Browse the repository at this point in the history
Test/GitHub publish release
  • Loading branch information
zahrasidhpuri-crest authored Jan 21, 2021
2 parents ebc2f1e + b7c459b commit fb439e3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
53 changes: 48 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ orbs:
npx -p @semantic-release/exec -p semantic-release semantic-release --dry-run --plugins "@semantic-release/commit-analyzer,@semantic-release/exec" --analyzeCommits @semantic-release/commit-analyzer --verifyRelease @semantic-release/exec --verifyReleaseCmd 'echo ${nextRelease.version} > nextRelease.txt'
sed -i "s/-develop./develop/g" nextRelease.txt
VERSION=$(cat nextRelease.txt)
echo "$VERSION"
echo VERSION="$VERSION"
source ~/.venv/bin/activate
ucc-gen --ta-version="$VERSION"
if [ -z "$CIRCLE_TAG" ]
then
ucc-gen --ta-version="$VERSION"
else
CIRCLE_TAG=${CIRCLE_TAG:1}
echo CIRCLE_TAG=$CIRCLE_TAG
ucc-gen --ta-version="$CIRCLE_TAG"
fi
- run:
name: Generating package
command: |
Expand Down Expand Up @@ -495,6 +502,26 @@ jobs:
name: "Publish on GitHub"
command: |
npx semantic-release
publish-gh:
docker:
- image: circleci/python:3.7
steps:
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: /tmp/workspace
- checkout
- go/install
- run:
name: "Publish on GitHub"
command: |
PATH=$PATH:/usr/local/go/bin
go get -v -u github.com/tcnksm/ghr
[[ << pipeline.git.tag >> =~ ^v[0-9]*.[0-9]*.[0-9]*$ ]] || export ISPRE=-prerelease
$HOME/go/bin/ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${ISPRE} -delete "<< pipeline.git.tag >>" /tmp/workspace/build/package/splunkbase
$HOME/go/bin/ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${ISPRE} "<< pipeline.git.tag >>" /tmp/workspace/build/package/deployment
publish-sbase:
docker:
- image: circleci/python:3.7
Expand Down Expand Up @@ -568,6 +595,7 @@ workflows:
requires:
- package
matrix:
alias: splunk-app-test-knowledge
parameters:
splunk_version: ["7.2","7.3","8.0","8.1"]
sc4s_version: ["1"]
Expand All @@ -582,6 +610,7 @@ workflows:
requires:
- package
matrix:
alias: splunk-app-test-ui
parameters:
splunk_version: ["7.3","8.0","8.1"]
sc4s_version: ["1"]
Expand All @@ -595,6 +624,7 @@ workflows:
requires:
- package
matrix:
alias: splunk-app-test-modinput
parameters:
splunk_version: ["7.3","8.0","8.1"]
sc4s_version: ["1"]
Expand Down Expand Up @@ -629,6 +659,12 @@ workflows:
- approval-release:
requires:
- package
# - splunk-app-inspect
# - splunk-app-test-knowledge
# - splunk-app-test-ui
# - splunk-app-test-modinput
# - splunk-app-unit-test
# - splunk-app-backend-test
context:
- gdi-github
type: approval
Expand All @@ -640,9 +676,6 @@ workflows:
- release:
requires:
- approval-release
## - splunk-app-inspect
## - splunk-app-unit-test
## - splunk-app-backend-test
context:
- gdi-github
publish:
Expand All @@ -654,6 +687,16 @@ workflows:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*.*$/
- publish-gh:
context:
- gdi-github
requires:
- package
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*.*$/
- publish-sbase:
context:
- gdi-splunkbase
Expand Down
6 changes: 1 addition & 5 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ branches:
prerelease: true
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- - "@semantic-release/github"
- assets:
- /tmp/workspace/build/package/splunkbase/*
- /tmp/workspace/build/package/deployment/*
- "@semantic-release/release-notes-generator"
1 change: 1 addition & 0 deletions tests/knowledge/test_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ def empty_method(self):
pass



0 comments on commit fb439e3

Please sign in to comment.