33
33
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'
34
34
sed -i "s/-develop./develop/g" nextRelease.txt
35
35
VERSION=$(cat nextRelease.txt)
36
- echo "$VERSION"
36
+ echo VERSION= "$VERSION"
37
37
source ~/.venv/bin/activate
38
- ucc-gen --ta-version="$VERSION"
38
+ if [ -z "$CIRCLE_TAG" ]
39
+ then
40
+ ucc-gen --ta-version="$VERSION"
41
+ else
42
+ CIRCLE_TAG=${CIRCLE_TAG:1}
43
+ echo CIRCLE_TAG=$CIRCLE_TAG
44
+ ucc-gen --ta-version="$CIRCLE_TAG"
45
+ fi
39
46
- run :
40
47
name : Generating package
41
48
command : |
@@ -495,6 +502,26 @@ jobs:
495
502
name : " Publish on GitHub"
496
503
command : |
497
504
npx semantic-release
505
+
506
+ publish-gh :
507
+ docker :
508
+ - image : circleci/python:3.7
509
+ steps :
510
+ - setup_remote_docker :
511
+ docker_layer_caching : true
512
+ - attach_workspace :
513
+ at : /tmp/workspace
514
+ - checkout
515
+ - go/install
516
+ - run :
517
+ name : " Publish on GitHub"
518
+ command : |
519
+ PATH=$PATH:/usr/local/go/bin
520
+ go get -v -u github.com/tcnksm/ghr
521
+ [[ << pipeline.git.tag >> =~ ^v[0-9]*.[0-9]*.[0-9]*$ ]] || export ISPRE=-prerelease
522
+ $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
523
+ $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
524
+
498
525
publish-sbase :
499
526
docker :
500
527
- image : circleci/python:3.7
@@ -568,6 +595,7 @@ workflows:
568
595
requires :
569
596
- package
570
597
matrix :
598
+ alias : splunk-app-test-knowledge
571
599
parameters :
572
600
splunk_version : ["7.2","7.3","8.0","8.1"]
573
601
sc4s_version : ["1"]
@@ -582,6 +610,7 @@ workflows:
582
610
requires :
583
611
- package
584
612
matrix :
613
+ alias : splunk-app-test-ui
585
614
parameters :
586
615
splunk_version : ["7.3","8.0","8.1"]
587
616
sc4s_version : ["1"]
@@ -595,6 +624,7 @@ workflows:
595
624
requires :
596
625
- package
597
626
matrix :
627
+ alias : splunk-app-test-modinput
598
628
parameters :
599
629
splunk_version : ["7.3","8.0","8.1"]
600
630
sc4s_version : ["1"]
@@ -629,6 +659,12 @@ workflows:
629
659
- approval-release :
630
660
requires :
631
661
- package
662
+ # - splunk-app-inspect
663
+ # - splunk-app-test-knowledge
664
+ # - splunk-app-test-ui
665
+ # - splunk-app-test-modinput
666
+ # - splunk-app-unit-test
667
+ # - splunk-app-backend-test
632
668
context :
633
669
- gdi-github
634
670
type : approval
@@ -640,9 +676,6 @@ workflows:
640
676
- release :
641
677
requires :
642
678
- approval-release
643
- # # - splunk-app-inspect
644
- # # - splunk-app-unit-test
645
- # # - splunk-app-backend-test
646
679
context :
647
680
- gdi-github
648
681
publish :
@@ -654,6 +687,16 @@ workflows:
654
687
ignore : /.*/
655
688
tags :
656
689
only : /^v\d*\.\d*\.\d*.*$/
690
+ - publish-gh :
691
+ context :
692
+ - gdi-github
693
+ requires :
694
+ - package
695
+ filters :
696
+ branches :
697
+ ignore : /.*/
698
+ tags :
699
+ only : /^v\d*\.\d*\.\d*.*$/
657
700
- publish-sbase :
658
701
context :
659
702
- gdi-splunkbase
0 commit comments