Skip to content

Commit

Permalink
Merge pull request #80 from splunk/develop
Browse files Browse the repository at this point in the history
Release to main from develop
  • Loading branch information
Ryan Faircloth authored Dec 15, 2020
2 parents 655e2fb + 47d494d commit 2b76a0f
Show file tree
Hide file tree
Showing 11 changed files with 224 additions and 160 deletions.
160 changes: 16 additions & 144 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,15 @@ jobs:
- run:
name: Install Tools
command: |
pip install /tmp/workspace/dist/*
publish:
pip install /tmp/workspace/dist/* --use-deprecated=legacy-resolver
release:
docker:
- image: circleci/node:11
steps:
- checkout
- run: npx semantic-release

publish-pypi:
docker:
- image: circleci/python:3.7-node
steps:
Expand All @@ -90,7 +97,7 @@ jobs:
poetry install
poetry run poetry-dynamic-versioning
poetry run build-ucc
poetry publish --build -u $TWINE_USERNAME -p $TWINE_PASSWORD
poetry publish --build -u $PYPI_USERNAME -p $PYPI_TOKEN
- save_cache:
key: poetry-cache-{{ checksum "poetry.lock" }}
paths:
Expand All @@ -111,44 +118,7 @@ jobs:
paths:
- dist
- output
tag:
parameters:
semtag:
type: string
docker:
- image: circleci/python:3.7
environment:
SEMTAG: "<< parameters.semtag >>"
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "14:2e:73:04:b0:3d:21:7d:bb:c5:79:51:f9:52:b2:22"
- checkout
- run:
name: TAG
command: |
./semtag ${SEMTAG} -f

merge-beta-to-master:
docker:
- image: circleci/python:3.7
steps:
- checkout
- add_ssh_keys:
fingerprints:
- "7c:e9:cc:8d:8e:4d:9c:17:1d:e3:96:23:ce:bd:a4:c3"
- checkout
- run:
name: Merge
command: |
git config --global user.email "[email protected]"
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 << pipeline.git.revision >>
git push
workflows:
version: 2
build_test:
Expand All @@ -157,116 +127,18 @@ workflows:
- test:
requires:
- build
- approval-tag-alpha:
- release:
requires:
- test
type: approval
filters:
branches:
only: develop
- tag:
name: tag-alpha
requires:
- approval-tag-alpha
semtag: a
context:
- gdi-github
release:
jobs:
- publish:
- publish-pypi:
context:
- gdi-pypi
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*.*$/
- approval-tag-beta:
requires:
- publish
type: approval
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-a\..*$/
- tag:
name: tag-beta
semtag: b
requires:
- approval-tag-beta
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-a\..*$/
- approval-merge-beta-to-master:
requires:
- publish
type: approval
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- merge-beta-to-master:
requires:
- approval-merge-beta-to-master
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- approval-tag-final-major:
type: approval
requires:
- merge-beta-to-master
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- tag:
name: tag-final-major
semtag: "final -s major"
requires:
- approval-tag-final-major
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- approval-tag-final-minor:
type: approval
requires:
- merge-beta-to-master
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- tag:
name: tag-final-minor
semtag: "final -s minor"
requires:
- approval-tag-final-minor
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- approval-tag-final-patch:
type: approval
requires:
- merge-beta-to-master
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
- tag:
name: tag-final-patch
semtag: "final -s patch"
requires:
- approval-tag-final-patch
filters:
branches:
ignore: /.*/
tags:
only: /^v\d*\.\d*\.\d*-b\..*$/
33 changes: 33 additions & 0 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened, closed, synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Alpha Release
uses: cla-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# the below token should have repo scope and must be manually added by you in the repository's secret
PERSONAL_ACCESS_TOKEN: ${{ secrets.PAT_CLATOOL }}
with:
path-to-signatures: ".github/signatures/version1/cla.json"
path-to-document: "https://github.com/splunk/addonfactory-test-releaseci/blob/main/CLA.md" # e.g. a CLA or a DCO document
# branch should not be protected
branch: "master"
allowlist: dependabot
#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
#remote-repository-name: enter the remote repository name where the signatures should be stored (Default is storing the signatures in the same repository)
#create-file-commit-message: 'For example: Creating file for storing CLA Signatures'
#signed-commit-messag e: 'For example: $contributorName has signed the CLA in #$pullRequestNo'
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
#custom-pr-sign-comment: 'The signature to be committed in order to sign the CLA'
#custom-allsigned-prcomment: 'pull request comment when all contributors has signed, defaults to **CLA Assistant Lite bot** All Contributors have signed the CLA.'
21 changes: 21 additions & 0 deletions .github/workflows/release-notes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release-Notes-Preview

on:
pull_request:
# branches: [main, develop]
issue_comment:
types: [edited]

jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git fetch --prune --unshallow --tags
- uses: snyk/[email protected]
with:
releaseBranch: master
env:
GITHUB_PR_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .github/workflows/review-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Review Secrets
on: [push]

jobs:
review_secrets:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Trufflehog Actions Scan
uses: edplato/[email protected]

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 [[email protected]](mailto:[email protected]). 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 2b76a0f

Please sign in to comment.