Skip to content

Commit

Permalink
Merge pull request #17 from splunk/develop
Browse files Browse the repository at this point in the history
Release from development
  • Loading branch information
Ryan Faircloth authored Dec 14, 2020
2 parents bb6c425 + 7dbad74 commit 6a916c5
Show file tree
Hide file tree
Showing 8 changed files with 231 additions and 902 deletions.
202 changes: 13 additions & 189 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,90 +3,10 @@ version: 2.1
orbs:
python: circleci/python@0.2.1

splunk-release:
executors:
python37:
docker:
- image: circleci/python:3.7
commands:
tag:
parameters:
gh_user:
description: Git Hub username
type: string
gh_token:
description: Git Hub token
type: string
tag_level:
description: Tag level
type: string
steps:
- run:
name: TAG
command: |
git remote set-url origin https://<<parameters.gh_user>>:<<parameters.gh_token>>@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git
./semtag <<parameters.tag_level>>
merge-to-master:
parameters:
gh_user:
description: Git Hub username
type: string
gh_token:
description: Git Hub token
type: string
steps:
- run:
name: Merge
command: |
git remote set-url origin https://<<parameters.gh_user>>:<<parameters.gh_token>>@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git
git config --global user.email "addonreleasesrv@splunk.com"
git config --global user.name "Add on release service"
git pull origin master
git merge master -m "Merge from master"
git checkout master
git merge develop
git push
jobs:
tag:
parameters:
gh_user:
description: Git Hub username
type: string
gh_token:
description: Git Hub token
type: string
tag_level:
description: Tag level
type: string
executor: python37
steps:
- checkout
- tag:
tag_level: <<parameters.tag_level>>
gh_user: <<parameters.gh_user>>
gh_token: <<parameters.gh_token>>
merge-to-master:
executor: python37
parameters:
gh_user:
description: Git Hub username
type: string
gh_token:
description: Git Hub token
type: string
steps:
- checkout
- merge-to-master:
gh_user: <<parameters.gh_user>>
gh_token: <<parameters.gh_token>>

executors:
linux:
machine:
image: ubuntu-1604:201903-01
macos:
macos:
xcode: 11.4
jobs:
build:
docker:
Expand Down Expand Up @@ -198,7 +118,6 @@ jobs:
echo USERNAME=Admin >>$SPLUNK_HOME/etc/system/local/user-seed.conf
echo PASSWORD=Chang3d! >>$SPLUNK_HOME/etc/system/local/user-seed.conf
/opt/splunk/bin/splunk start --accept-license
#- python/load-cache
- attach_workspace:
at: /tmp/workspace
- run:
Expand Down Expand Up @@ -226,6 +145,13 @@ jobs:
path: test-results
- store_artifacts:
path: htmlcov

release:
docker:
- image: circleci/node:11
steps:
- checkout
- run: npx semantic-release

publish-pypi:
docker:
Expand All @@ -247,124 +173,22 @@ jobs:
source $HOME/.poetry/env
poetry install
poetry run poetry-dynamic-versioning
poetry publish --build -u ${TWINE_USERNAME} -p ${TWINE_PASSWORD}
poetry publish --build -u ${PYPI_USERNAME} -p ${PYPI_TOKEN}
workflows:
main:
jobs:
- build
# - test-unit:
# requires:
# - build
# matrix:
# parameters:
# os: [linux]
# python-version: ["2.7.17", "3.7.4"]
# filters:
# branches:
# only: /.*/
# - test-splunk:
# requires:
# - build
# matrix:
# parameters:
# os: [linux]
# splunk-version: ["7.2", "7.3", "8.0"]
# python-version: ["2.7.17", "3.7.4"]
# filters:
# branches:
# only: /.*/
- approval-tag-alpha:
type: approval
filters:
branches:
only: develop
- release:
context:
- gdi-github
requires:
- build
- splunk-release/tag:
name: tag-alpha
tag_level: a
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
filters:
branches:
only: develop
requires:
- approval-tag-alpha
- approval-tag-beta:
requires:
- tag-alpha
type: approval
filters:
branches:
only: develop
- splunk-release/tag:
name: tag-beta
tag_level: b
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
requires:
- approval-tag-beta
- approval-merge-beta-to-master:
requires:
- tag-beta
type: approval
filters:
branches:
only: develop
- splunk-release/merge-to-master:
name: merge-beta-to-master
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
requires:
- approval-merge-beta-to-master
filters:
branches:
only: develop
- splunk-release/tag:
name: tag-candidate
tag_level: candidate
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
filters:
branches:
only: master
- approval-tag-final-major:
type: approval
requires:
- tag-candidate
- splunk-release/tag:
name: tag-final-major
tag_level: final -s major
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
requires:
- approval-tag-final-major
- approval-tag-final-minor:
type: approval
requires:
- tag-candidate
- splunk-release/tag:
name: tag-final-minor
tag_level: final -s minor
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
requires:
- approval-tag-final-minor
- approval-tag-final-patch:
type: approval
requires:
- tag-candidate
- splunk-release/tag:
name: tag-final-patch
tag_level: final -s patch
gh_user: ${GH_USER}
gh_token: ${GH_PAT}
requires:
- approval-tag-final-patch
publish:
jobs:
- publish-pypi:
context:
- gdi-pypi
filters:
branches:
ignore: /.*/
Expand Down
11 changes: 11 additions & 0 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
branches:
- "+([0-9])?(.{+([0-9]),x}).x"
- main
- name: develop
channel: beta
prerelease: true
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/github"
9 changes: 9 additions & 0 deletions CLA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
By submitting a Contribution to this Work, You agree that Your Contribution is made subject to the primary LICENSE file applicable to this Work. In addition, You represent that: (i) You are the copyright owner of the Contribution or (ii) You have the requisite rights to make the Contribution.

Definitions:

“You” shall mean: (i) yourself if you are making a Contribution on your own behalf; or (ii) your company, if you are making a Contribution on behalf of your company. If you are making a Contribution on behalf of your company, you represent that you have the requisite authority to do so.

"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You for inclusion in, or documentation of, this project/repository. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication submitted for inclusion in this project/repository, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the maintainers of the project/repository.

“Work” shall mean the collective software, content, and documentation in this project/repository.
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Code of conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [support@splunk.com](mailto:support@splunk.com). All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Loading

0 comments on commit 6a916c5

Please sign in to comment.