Skip to content

Commit b4774d2

Browse files
committed
feat: initial commit
0 parents  commit b4774d2

File tree

16 files changed

+350
-0
lines changed

16 files changed

+350
-0
lines changed

Diff for: .circleci/config.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2.1
2+
setup: true
3+
orbs:
4+
orb-tools: circleci/[email protected]
5+
shellcheck: circleci/[email protected]
6+
7+
filters: &filters
8+
tags:
9+
only: /.*/
10+
11+
workflows:
12+
lint-pack:
13+
jobs:
14+
- orb-tools/lint:
15+
filters: *filters
16+
- orb-tools/pack:
17+
filters: *filters
18+
- orb-tools/review:
19+
filters: *filters
20+
- shellcheck/check:
21+
filters: *filters
22+
# Triggers the next workflow in the Orb Development Kit.
23+
- orb-tools/continue:
24+
pipeline_number: << pipeline.number >>
25+
vcs_type: << pipeline.project.type >>
26+
orb_name: rollout
27+
requires: [orb-tools/lint, orb-tools/pack, orb-tools/review, shellcheck/check]
28+
filters: *filters

Diff for: .circleci/test-deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
version: 2.1
2+
orbs:
3+
# Your orb will be automatically injected here during the pipeline.
4+
# Reference your orb's jobs and commands below as they will exist when built.
5+
orb-tools: circleci/[email protected]
6+
# The orb definition is intentionally not included here. It will be injected into the pipeline.
7+
rollout: {}
8+
9+
# Use this tag to ensure test jobs always run,
10+
# even though the downstream publish job will only run on release tags.
11+
filters: &filters
12+
tags:
13+
only: /.*/
14+
15+
# Filter for release tags.
16+
release-filters: &release-filters
17+
branches:
18+
ignore: /.*/
19+
tags:
20+
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
21+
22+
jobs:
23+
# Create jobs to test the commands of your orbs.
24+
# You may want to add additional validation steps to ensure the commands are working as expected.
25+
command-test:
26+
docker:
27+
- image: cimg/base:current
28+
steps:
29+
- checkout
30+
# Run your orb's commands to validate them.
31+
- rollout/greet
32+
workflows:
33+
test-deploy:
34+
jobs:
35+
# Make sure to include "filters: *filters" in every test job you want to run as part of your deployment.
36+
# Test your orb's commands in a custom job and test your orb's jobs directly as a part of this workflow.
37+
- command-test:
38+
filters: *filters
39+
# The orb must be re-packed for publishing, and saved to the workspace.
40+
- orb-tools/pack:
41+
filters: *release-filters
42+
- orb-tools/publish:
43+
orb_name: studion/rollout
44+
vcs_type: << pipeline.project.type >>
45+
pub_type: production
46+
# Ensure this job requires all test jobs and the pack job.
47+
requires:
48+
- orb-tools/pack
49+
- command-test
50+
context: orb-publishing
51+
filters: *release-filters

Diff for: .github/ISSUE_TEMPLATE/BUG.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "\U0001F41E Bug Report"
2+
description: Report any identified bugs.
3+
title: 'Bug: '
4+
labels: [bug]
5+
# assignees: ''
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: "Is there an existing issue for this?"
10+
description: "Please search [here](https://github.com/<organization>/<project-name>/issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered"
11+
options:
12+
- label: "I have searched the existing issues"
13+
required: true
14+
15+
- type: input
16+
attributes:
17+
label: "Orb version"
18+
description: |
19+
Which version of `<namespace>/<orb-name>` are you using?
20+
placeholder: "1.0.0"
21+
22+
- type: textarea
23+
validations:
24+
required: true
25+
attributes:
26+
label: "Current behavior"
27+
description: "How does the issue manifest?"
28+
29+
- type: textarea
30+
validations:
31+
required: true
32+
attributes:
33+
label: "Minimum reproduction config"
34+
description: "Enter a URL to a failed build or write a config example to reproduce the issue"
35+
placeholder: "https://app.circleci.com/..."
36+
37+
- type: textarea
38+
attributes:
39+
label: "Other"
40+
description: |
41+
Anything else you want to share?

Diff for: .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "\U0001F4A1 Feature Request"
2+
description: Have an idea for a new feature? Begin by submitting a Feature Request
3+
title: 'Request: '
4+
labels: [enhancement]
5+
# assignees: ''
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: "Is there an existing issue that is already proposing this?"
10+
description: "Please search [here](https://github.com/CircleCI-Public/circleci-config-sdk-ts/issues?q=is%3Aissue) to see if an issue already exists for the feature you are requesting"
11+
options:
12+
- label: "I have searched the existing issues"
13+
required: true
14+
15+
- type: textarea
16+
validations:
17+
required: true
18+
attributes:
19+
label: "Describe the problem imposed by not having this feature"
20+
description: "Please describe the use-case you are attempting to implement, and the current limitations you are facing."
21+
22+
- type: textarea
23+
validations:
24+
required: true
25+
attributes:
26+
label: "Describe the solution you'd like"
27+
description: "A clear and concise description of what you want to happen. Add any considered drawbacks"
28+
29+
30+
- type: textarea
31+
attributes:
32+
label: "Other"
33+
description: |
34+
Anything else you want to share?

Diff for: .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## PR Type
2+
What kind of change does this PR introduce?
3+
4+
<!-- Please check the one that applies to this PR using "x". -->
5+
- [ ] Bugfix
6+
- [ ] Feature
7+
- [ ] Code style update (formatting)
8+
- [ ] Refactoring (no functional changes)
9+
- [ ] CI related changes
10+
- [ ] Other... Please describe:
11+
12+
## What is the current behavior?
13+
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
14+
15+
Issue Number: N/A
16+
17+
## What is the new behavior?
18+
19+
## Does this PR introduce a breaking change?
20+
- [ ] Yes
21+
- [ ] No
22+
23+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
24+
25+
## Other information

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# orb.yml is "packed" from source, and not published directly from the repository.
2+
orb.yml
3+
.DS_Store

Diff for: .yamllint

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extends: relaxed
2+
3+
rules:
4+
line-length:
5+
max: 200
6+
allow-non-breakable-inline-mappings: true
7+

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 <organization>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Diff for: README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Orb Template
2+
3+
4+
[![CircleCI Build Status](https://circleci.com/gh/ExtensionEngine/pipeline-rollout-orb.svg?style=shield "CircleCI Build Status")](https://circleci.com/gh/ExtensionEngine/pipeline-rollout-orb) [![CircleCI Orb Version](https://badges.circleci.com/orbs/studion/rollout.svg)](https://circleci.com/developer/orbs/orb/studion/rollout) [![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/ExtensionEngine/pipeline-rollout-orb/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs)
5+
6+
7+
8+
A project template for Orbs.
9+
10+
This repository is designed to be automatically ingested and modified by the CircleCI CLI's `orb init` command.
11+
12+
_**Edit this area to include a custom title and description.**_
13+
14+
---
15+
16+
## Resources
17+
18+
[CircleCI Orb Registry Page](https://circleci.com/developer/orbs/orb/studion/rollout) - The official registry page of this orb for all versions, executors, commands, and jobs described.
19+
20+
[CircleCI Orb Docs](https://circleci.com/docs/orb-intro/#section=configuration) - Docs for using, creating, and publishing CircleCI Orbs.
21+
22+
### How to Contribute
23+
24+
We welcome [issues](https://github.com/ExtensionEngine/pipeline-rollout-orb/issues) to and [pull requests](https://github.com/ExtensionEngine/pipeline-rollout-orb/pulls) against this repository!
25+
26+
### How to Publish An Update
27+
1. Merge pull requests with desired changes to the main branch.
28+
- For the best experience, squash-and-merge and use [Conventional Commit Messages](https://conventionalcommits.org/).
29+
2. Find the current version of the orb.
30+
- You can run `circleci orb info studion/rollout | grep "Latest"` to see the current version.
31+
3. Create a [new Release](https://github.com/ExtensionEngine/pipeline-rollout-orb/releases/new) on GitHub.
32+
- Click "Choose a tag" and _create_ a new [semantically versioned](http://semver.org/) tag. (ex: v1.0.0)
33+
- We will have an opportunity to change this before we publish if needed after the next step.
34+
4. Click _"+ Auto-generate release notes"_.
35+
- This will create a summary of all of the merged pull requests since the previous release.
36+
- If you have used _[Conventional Commit Messages](https://conventionalcommits.org/)_ it will be easy to determine what types of changes were made, allowing you to ensure the correct version tag is being published.
37+
5. Now ensure the version tag selected is semantically accurate based on the changes included.
38+
6. Click _"Publish Release"_.
39+
- This will push a new tag and trigger your publishing pipeline on CircleCI.

Diff for: src/@orb.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2.1
2+
3+
description: >
4+
Sample orb description
5+
# What will your orb allow users to accomplish?
6+
# Descriptions should be short, simple, and informative.
7+
8+
# This information will be displayed in the orb registry and is not mandatory.
9+
display:
10+
home_url: "https://www.example.com/docs"
11+
source_url: "https://github.com/ExtensionEngine/pipeline-rollout-orb"
12+
13+
# If your orb requires other orbs, you can import them like this. Otherwise remove the "orbs" stanza.
14+
# orbs:
15+
# hello: circleci/[email protected]

Diff for: src/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Orb Source
2+
3+
Orbs are shipped as individual `orb.yml` files, however, to make development easier, it is possible to author an orb in _unpacked_ form, which can be _packed_ with the CircleCI CLI and published.
4+
5+
The default `.circleci/config.yml` file contains the configuration code needed to automatically pack, test, and deploy any changes made to the contents of the orb source in this directory.
6+
7+
## @orb.yml
8+
9+
This is the entry point for our orb "tree", which becomes our `orb.yml` file later.
10+
11+
Within the `@orb.yml` we generally specify 4 configuration keys
12+
13+
**Keys**
14+
15+
1. **version**
16+
Specify version 2.1 for orb-compatible configuration `version: 2.1`
17+
2. **description**
18+
Give your orb a description. Shown within the CLI and orb registry
19+
3. **display**
20+
Specify the `home_url` referencing documentation or product URL, and `source_url` linking to the orb's source repository.
21+
4. **orbs**
22+
(optional) Some orbs may depend on other orbs. Import them here.
23+
24+
## See:
25+
- [Orb Author Intro](https://circleci.com/docs/2.0/orb-author-intro/#section=configuration)
26+
- [Reusable Configuration](https://circleci.com/docs/2.0/reusing-config)

Diff for: src/commands/greet.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
description: >
2+
This command echos "Hello World" using file inclusion.
3+
# What will this command do?
4+
# Descriptions should be short, simple, and clear.
5+
parameters:
6+
to:
7+
type: string
8+
default: "World"
9+
description: "Hello to whom?"
10+
steps:
11+
- run:
12+
environment:
13+
PARAM_TO: <<parameters.to>>
14+
name: Hello Greeting
15+
command: <<include(scripts/greet.sh)>>

Diff for: src/examples/example.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
description: >
2+
Sample example description.
3+
# Provide a use-case based example for using this orb.
4+
# Everything in the `usage` section will be displayed in the orb registry.
5+
# Comments are not retained.
6+
usage:
7+
version: 2.1
8+
orbs:
9+
<orb-name>: <namespace>/<orb-name>@1.2.3
10+
workflows:
11+
use-my-orb:
12+
jobs:
13+
- <orb-name>/<job-name>

Diff for: src/executors/default.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
description: >
2+
This is a sample executor using Docker and Node. If you want to provide a custom environment in your orb, insert your image here.
3+
If you do not require an executor, you can simply delete this directory.
4+
docker:
5+
- image: 'cimg/node:<<parameters.tag>>'
6+
parameters:
7+
tag:
8+
default: lts
9+
description: >
10+
Pick a specific cimg/node image variant:
11+
https://hub.docker.com/r/cimg/node/tags
12+
type: string

Diff for: src/jobs/hello.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
description: >
2+
Sample description
3+
# What will this job do?
4+
5+
executor: default
6+
7+
parameters:
8+
to:
9+
type: string
10+
default: "World"
11+
description: "Hello to whom?"
12+
steps:
13+
- greet:
14+
to: << parameters.to >>

Diff for: src/scripts/greet.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This example uses envsubst to support variable substitution in the string parameter type.
3+
# https://circleci.com/docs/orbs-best-practices/#accepting-parameters-as-strings-or-environment-variables
4+
TO=$(circleci env subst "${PARAM_TO}")
5+
# If for any reason the TO variable is not set, default to "World"
6+
echo "Hello ${TO:-World}!"

0 commit comments

Comments
 (0)