-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
bjd2385
committed
Dec 3, 2021
0 parents
commit 32ef802
Showing
19 changed files
with
303 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Orb Development Pipeline | ||
|
||
This configuration file uses [orb-tools orb]() version 10 to automatically _pack_, _test_, and _publish_ CircleCI orbs using this project structure. View the comments within the config file for a full break down | ||
|
||
## Overview: | ||
|
||
**Imported Orbs** | ||
|
||
Both orb-tools and a development version of your orb will be imported into the config. On the first run, a `dev:alpha` development tag _must_ exist on your orb, but will be handled automatically from there on. | ||
|
||
**Jobs** | ||
|
||
In the _jobs_ key, you will define _integration tests_. These jobs will utilize the functionality of your orb at run-time and attempt to validate their usage with live examples. Integration tests can be an excellent way of determining issues with parameters and run-time execution. | ||
|
||
### Workflows | ||
|
||
There are two workflows which automate the pack, test, and publishing process. | ||
|
||
**test-pack** | ||
|
||
This is the first of the two workflows run. This workflow is responsible for any testing or prepping prior to integration tests. This is where linting occurs, shellchecking, BATS tests, or anything else that can be be tested without the need for further credentials. | ||
|
||
This Workflow will be placed on _hold_ prior to publishing a new development version of the orb (based on this commit), as this step requires access to specific publishing credentials. | ||
|
||
This allows users to fork the orb repository and begin the pipeline, while the code-owners review that the code is safe to test in an environment where publishing keys will be present. | ||
|
||
Once approved, the development version of the orb will publish and the _trigger-integration-tests-workflow_ job will run, kicking off the next workflow | ||
|
||
**integration-test_deploy** | ||
|
||
The second and final workflow is manually triggered by the _trigger-integration-tests-workflow_ job. In this run, the development version of the orb that was just published will be imported, and the integration tests will run. | ||
|
||
When running on the `master` branch (after merging to `master`), the workflow will additionally publish your new production orb. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
version: 2.1 | ||
|
||
parameters: | ||
workspace: | ||
type: string | ||
default: chart-testing | ||
|
||
orb-version: | ||
type: string | ||
default: 1.0.0 | ||
|
||
orbs: | ||
orb-tools: circleci/[email protected] | ||
shellcheck: circleci/[email protected] | ||
|
||
workflows: | ||
on-commit: | ||
jobs: | ||
# Run a bunch of tests against this repo | ||
- orb-tools/lint | ||
|
||
- orb-tools/pack: | ||
persist-to-workspace: false | ||
store-artifacts: false | ||
validate: true | ||
|
||
- shellcheck/check: | ||
dir: ./src/scripts | ||
exclude: SC2148 | ||
|
||
on-merge: | ||
jobs: | ||
- orb-tools/pack: | ||
destination-orb-path: orb.yml | ||
persist-to-workspace: true | ||
source-dir: src | ||
store-artifacts: false | ||
validate: true | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- orb-tools/publish: | ||
attach-workspace: true | ||
orb-path: workspace/orb.yml | ||
validate: false | ||
orb-ref: << pipeline.parameters.workspace >>/name@<< pipeline.parameters.orb-version >> | ||
requires: | ||
- orb-tools/pack | ||
context: orb-publishing | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# These are supported funding model platforms | ||
|
||
ko_fi: bjd2385 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
name: "\U0001F41E Bug report" | ||
about: Report any bugs encountered while using this orb. | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Orb version: | ||
|
||
<!--- | ||
e.g., 1.0.0 | ||
find this information in your config.yml file; | ||
if the version is @volatile, check the top of your CircleCI-generated, | ||
expanded configuration file, viewable from the "Configuration" tab of | ||
any job page, for the orb's specific semantic version number | ||
--> | ||
|
||
## What happened: | ||
|
||
<!--- | ||
please include any relevant links to CircleCI workflows or jobs | ||
where you saw this behavior | ||
--> | ||
|
||
## Expected behavior: | ||
|
||
<!--- what should happen, ideally? --> | ||
|
||
## Additional Information: | ||
|
||
<!--- Provide any additional context possible. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: "\U0001F680 Feature Request" | ||
about: Propose changes to the orb. | ||
title: '' | ||
labels: feature_request | ||
assignees: '' | ||
--- | ||
|
||
## Describe Request: | ||
|
||
## Examples: | ||
|
||
## Supporting Documentation Links: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
**SEMVER Update Type:** | ||
- [ ] Major | ||
- [ ] Minor | ||
- [ ] Patch | ||
|
||
## Description: | ||
|
||
<!--- | ||
Describe your changes in detail, preferably in an imperative mood, | ||
i.e., "add `commandA` to `jobB`" | ||
--> | ||
|
||
## Motivation: | ||
|
||
<!--- | ||
Share any open issues this PR references or otherwise describe the motivation to submit this pull request. | ||
--> | ||
|
||
**Closes Issues:** | ||
- ISSUE URL | ||
|
||
## Checklist: | ||
|
||
<!-- | ||
Thank you for contributing to CircleCI Orbs! | ||
before submitting your a request, please go through the following | ||
items and place an x in the [ ] if they have been completed | ||
--> | ||
|
||
- [ ] All new jobs, commands, executors, parameters have descriptions. | ||
- [ ] Usage Example version numbers have been updated. | ||
- [ ] Changelog has been updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
repository: | ||
name: circleci-orb-template | ||
description: template repository for publishing orbs | ||
homepage: https://github.com/bjd2385/circleci-orb-template | ||
|
||
# A comma-separated list of topics to set on the repository | ||
topics: circleci, orb | ||
private: true | ||
has_issues: true | ||
has_projects: false | ||
has_wiki: false | ||
has_downloads: false | ||
default_branch: master | ||
|
||
allow_squash_merge: true | ||
allow_merge_commit: true | ||
allow_rebase_merge: true | ||
delete_branch_on_merge: true | ||
|
||
enable_automated_security_fixes: false | ||
enable_vulnerability_alerts: false | ||
|
||
labels: | ||
- name: bug | ||
color: CC0000 | ||
description: An issue with the system 🐛. | ||
|
||
- name: feature | ||
color: '#336699' | ||
description: New functionality. | ||
|
||
branches: | ||
- name: master | ||
protection: | ||
required_pull_request_reviews: | ||
# The number of approvals required. (1-6) | ||
required_approving_review_count: 1 | ||
# Dismiss approved reviews automatically when a new commit is pushed. | ||
dismiss_stale_reviews: true | ||
# Blocks merge until code owners have reviewed. | ||
require_code_owner_reviews: true | ||
# Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories. | ||
dismissal_restrictions: | ||
users: [] | ||
teams: [] | ||
# Required. Require status checks to pass before merging. Set to null to disable | ||
required_status_checks: | ||
# Required. Require branches to be up to date before merging. | ||
strict: true | ||
# Required. The list of status checks to require in order to merge into this branch | ||
contexts: | ||
- on-commit | ||
#- jira-lint | ||
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. | ||
enforce_admins: true | ||
# Prevent merge commits from being pushed to matching branches | ||
required_linear_history: true | ||
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. | ||
restrictions: | ||
apps: [] | ||
users: [] | ||
teams: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# orb.yml is "packed" from source, and not published directly from the repository. | ||
orb.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
extends: relaxed | ||
|
||
rules: | ||
line-length: | ||
max: 200 | ||
allow-non-breakable-inline-mappings: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Brandon Doyle | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
`example` orb for CircleCI | ||
-------------------------- | ||
|
||
This orb provides a set of commands and jobs for [`example`](https://example.com) in CircleCI workflows. Commands include | ||
|
||
### Usage | ||
|
||
### Development | ||
|
||
This orb has been developed in *unpacked* form. You may view its packed source with | ||
```shell | ||
$ circleci orb pack src/ | ||
``` | ||
#### `pre-commit` | ||
|
||
This repository uses `pre-commit` to uphold certain code styling and standards. You may install the hooks listed in [`.pre-commit-config`](.pre-commit-config) with | ||
```shell | ||
$ pre-commit install | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2.1 | ||
|
||
description: | | ||
An example orb repository template. | ||
# This information will be displayed in the orb registry and is not mandatory. | ||
display: | ||
home_url: "https://github.com/bjd2385/circleci-orb-template" | ||
source_url: "https://github.com/bjd2385/circleci-orb-template" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
description: | | ||
Hello! | ||
parameters: {} | ||
steps: {} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: base default CircleCI executor. | ||
parameters: | ||
tag: | ||
default: stable-20.04 | ||
description: Default Ubuntu 20.04 executor. | ||
type: string | ||
docker: | ||
- image: 'cimg/base:<< parameters.tag >>' |
Empty file.
Empty file.
Empty file.