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

Commit

Permalink
test: Added circle_tag param for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
zahrasidhpuri-crest committed Jan 21, 2021
1 parent ebc2f1e commit 5a6a068
Show file tree
Hide file tree
Showing 2 changed files with 49 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"

0 comments on commit 5a6a068

Please sign in to comment.