diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c47a170..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,104 +0,0 @@ -## -## SPDX-License-Identifier: Apache-2.0 -## -## -version: 2.1 -orbs: - go: circleci/go@0.2.0 - splunk-app-package: - jobs: - package: - docker: - - image: livehybrid/splunk-ci-build:latest - steps: - - checkout - - run: - name: Setup Environment - command: | - pip install -r requirements.txt - rm -rf build/ - - run: - name: Generate Documentation - command: | - cat README.md | sed 's/package\/appserver/appserver/g' > package/README.md - grip README.md --export README.html --title "" - pandoc -s README.html -o package/README.pdf - - run: - name: Generate Addon - command: | - echo "Version is now calculated by ucc-gen" - ucc-gen build - - run: - name: Generating package - command: | - PACKAGE_ID=$(ls output/) - BUILD_DIR=output/$PACKAGE_ID - mkdir -p dist - rm -rf $BUILD_DIR/lib/**/*.pyc - rm -rf $BUILD_DIR/lib/**/*.so - ucc-gen package -o dist/ --path $BUILD_DIR - - run: - name: Inspect package - command: | - PACKAGE_ID=$(ls output/) - PACKAGE=$(ls dist/*) - mkdir -p reports - splunk-appinspect inspect $PACKAGE --mode=precert --included-tags=private_victoria --data-format junitxml --output-file reports/$PACKAGE_ID-victoria-cli.xml - splunk-appinspect inspect $PACKAGE --mode=precert --included-tags=splunk_appinspect --data-format junitxml --output-file reports/$PACKAGE_ID-splunkbase-cli.xml - splunk-appinspect inspect $PACKAGE --mode=precert --included-tags=cloud --data-format junitxml --output-file reports/$PACKAGE_ID-cloud-cli.xml - splunk-appinspect inspect $PACKAGE --mode=precert --included-tags=future --data-format junitxml --output-file reports/$PACKAGE_ID-future-cli.xml - - persist_to_workspace: - root: ./ - paths: - - output - - build - - store_test_results: - path: reports - - store_artifacts: - path: dist - destination: build-package-splunkbase - - store_artifacts: - path: build/package/deployment - destination: build-package-deployment - - store_artifacts: - path: build/VERSION - destination: build-version - - store_artifacts: - path: reports - destination: reports - publish-gh: - docker: - - image: cimg/go:1.19 - steps: - - attach_workspace: - at: /tmp/workspace - - checkout - - run: - name: "Publish on GitHub" - command: | - PATH=$PATH:/usr/local/go/bin - go install github.com/tcnksm/ghr@latest - [[ "${CIRCLE_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 "${CIRCLE_TAG}" /tmp/workspace/dist - $HOME/go/bin/ghr -t ${GH_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} ${ISPRE} "${CIRCLE_TAG}" /tmp/workspace/build/package/deployment - -workflows: - build: - jobs: - - splunk-app-package/package: - name: package - filters: - branches: - only: /.*/ - tags: - only: /^v\d*\.\d*\.\d*.*$/ - - splunk-app-package/publish-gh: - context: - - gdi-github - requires: - - package - filters: - branches: - ignore: /.*/ - tags: - only: /^v\d*\.\d*\.\d*.*$/