From 06a922dff84f915508482afa7d51cb1f480c7adc Mon Sep 17 00:00:00 2001 From: Mark Li Date: Wed, 3 May 2023 11:26:24 -0400 Subject: [PATCH] Match orb template --- .circleci/config.yml | 107 +++++------------- .circleci/test-deploy.yml | 44 +++++++ .github/ISSUE_TEMPLATE/BUG.md | 33 ------ .github/ISSUE_TEMPLATE/BUG.yml | 41 +++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 14 --- .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml | 34 ++++++ .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md | 44 +++---- .gitignore | 3 +- LICENSE | 2 +- README.md | 40 +++---- 10 files changed, 186 insertions(+), 176 deletions(-) create mode 100644 .circleci/test-deploy.yml delete mode 100644 .github/ISSUE_TEMPLATE/BUG.md create mode 100644 .github/ISSUE_TEMPLATE/BUG.yml delete mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index be395d0..fc21b62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,92 +1,41 @@ version: 2.1 - +setup: true orbs: - # Replace this with your own! - continuation: circleci/continuation@<> - orb-tools: circleci/orb-tools@10.0 - shellcheck: circleci/shellcheck@2.0 - -# Pipeline Parameters -## These parameters are used internally by orb-tools. Skip to the Jobs section. -parameters: - run-integration-tests: - description: An internal flag to prevent integration test from running before a development version has been created. - type: boolean - default: false - dev-orb-version: - description: > - The development version of the orb to test. - This value is automatically adjusted by the "trigger-integration-tests-workflow" job to correspond with the specific version created by the commit and should not be edited. - A "dev:alpha" version must exist for the initial pipeline run. - type: string - default: "dev:alpha" + orb-tools: circleci/orb-tools@11.5 + shellcheck: circleci/shellcheck@3.1 -jobs: - # Define one or more jobs which will utilize your orb's commands and parameters to validate your changes. - integration-test-1: - docker: - - image: cimg/base:stable - steps: - - checkout +filters: &filters + tags: + only: /.*/ workflows: - # Prior to producing a development orb (which requires credentials) basic validation, linting, and even unit testing can be performed. - # This workflow will run on every commit - test-pack: - unless: << pipeline.parameters.run-integration-tests >> + lint-pack: jobs: - - orb-tools/lint # Lint Yaml files - - orb-tools/pack # Pack orb source + - orb-tools/lint: + filters: *filters + - orb-tools/pack: + filters: *filters + - orb-tools/review: + filters: *filters - shellcheck/check: - dir: ./src/scripts - exclude: SC2148 - # If you accept building open source forks, protect your secrects behind a restricted context. - # A job containing restricted context (which holds your orb publishing credentials) may only be accessed by a user with proper permissions. - # An open source user may begin a pipeline with a PR, and once the pipeline is approved by an authorized user at this point, the pipeline will continue with the proper context permissions. - - hold-for-dev-publish: - type: approval + shell: bash + filters: *filters + - orb-tools/publish: + orb-name: circleci/continuation + vcs-type: << pipeline.project.type >> requires: - orb-tools/lint + - orb-tools/review - orb-tools/pack - shellcheck/check - # Publish development version(s) of the orb. - - orb-tools/publish-dev: - orb-name: circleci/continuation - context: orb-publisher - requires: [hold-for-dev-publish] - # Trigger an integration workflow to test the - # dev:${CIRCLE_SHA1:0:7} version of your orb - - orb-tools/trigger-integration-tests-workflow: - name: trigger-integration-dev - context: orb-publisher - requires: - - orb-tools/publish-dev - # This `integration-test_deploy` workflow will only run - # when the run-integration-tests pipeline parameter is set to true. - # It is meant to be triggered by the "trigger-integration-tests-workflow" - # job, and run tests on @dev:${CIRCLE_SHA1:0:7}. - integration-test_deploy: - when: << pipeline.parameters.run-integration-tests >> - jobs: - # Run any integration tests defined within the `jobs` key. - - integration-test-1 - # Publish a semver version of the orb. relies on - # the commit subject containing the text "[semver:patch|minor|major|skip]" - # as that will determine whether a patch, minor or major - # version will be published or if publishing should - # be skipped. - # e.g. [semver:patch] will cause a patch version to be published. - - orb-tools/dev-promote-prod-from-commit-subject: - orb-name: circleci/continuation + # Use a context to hold your publishing token. context: orb-publisher - add-pr-comment: false - fail-if-semver-not-indicated: true - publish-version-tag: false - requires: - - integration-test-1 - filters: - branches: - only: - - master - - main + filters: *filters + # Triggers the next workflow in the Orb Development Kit. + - orb-tools/continue: + pipeline-number: << pipeline.number >> + vcs-type: << pipeline.project.type >> + requires: + - orb-tools/publish + filters: *filters diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml new file mode 100644 index 0000000..0b4a5ab --- /dev/null +++ b/.circleci/test-deploy.yml @@ -0,0 +1,44 @@ +version: 2.1 +orbs: + continuation: circleci/continuation@dev:<> + orb-tools: circleci/orb-tools@11.5 + +filters: &filters + tags: + only: /.*/ + +jobs: + # You may want to add additional validation steps to ensure the commands are working as expected. + command-tests: + docker: + - image: cimg/base:current + steps: + - checkout + # Run your orb's commands to validate them. + - continuation/continue: + configuration_path: "" + when: on_fail + +workflows: + test-deploy: + jobs: + # Make sure to include "filters: *filters" in every test job you want to run as part of your deployment. + - command-tests: + filters: *filters + - orb-tools/pack: + filters: *filters + - orb-tools/publish: + orb-name: circleci/continuation + vcs-type: << pipeline.project.type >> + pub-type: production + requires: + - orb-tools/pack + - command-tests + context: orb-publisher + filters: + branches: + ignore: /.*/ + tags: + only: /^v[0-9]+\.[0-9]+\.[0-9]+$/ + +# VS Code Extension Version: 1.4.0 diff --git a/.github/ISSUE_TEMPLATE/BUG.md b/.github/ISSUE_TEMPLATE/BUG.md deleted file mode 100644 index 7f1ad45..0000000 --- a/.github/ISSUE_TEMPLATE/BUG.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -name: "\U0001F41E Bug report" -about: Report any bugs encountered while using this orb. -title: '' -labels: bug -assignees: '' - ---- - -## Orb version: - - - -## What happened: - - - -## Expected behavior: - - - -## Additional Information: - - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/BUG.yml b/.github/ISSUE_TEMPLATE/BUG.yml new file mode 100644 index 0000000..e8cb9bc --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG.yml @@ -0,0 +1,41 @@ +name: "\U0001F41E Bug Report" +description: Report any identified bugs. +title: 'Bug: ' +labels: [bug] +# assignees: '' +body: + - type: checkboxes + attributes: + label: "Is there an existing issue for this?" + description: "Please search [here](https://github.com/CircleCI-Public/continuation-orb/issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered" + options: + - label: "I have searched the existing issues" + required: true + + - type: input + attributes: + label: "Orb version" + description: | + Which version of `circleci/continuation` are you using? + placeholder: "1.0.0" + + - type: textarea + validations: + required: true + attributes: + label: "Current behavior" + description: "How does the issue manifest?" + + - type: textarea + validations: + required: true + attributes: + label: "Minimum reproduction config" + description: "Enter a URL to a failed build or write a config example to reproduce the issue" + placeholder: "https://app.circleci.com/..." + + - type: textarea + attributes: + label: "Other" + description: | + Anything else you want to share? diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md deleted file mode 100644 index df221b1..0000000 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: "\U0001F680 Feature Request" -about: Propose changes to the orb. -title: '' -labels: feature_request -assignees: '' ---- - -## Describe Request: - -## Examples: - -## Supporting Documentation Links: - diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml new file mode 100644 index 0000000..007e1ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -0,0 +1,34 @@ +name: "\U0001F4A1 Feature Request" +description: Have an idea for a new feature? Begin by submitting a Feature Request +title: 'Request: ' +labels: [enhancement] +# assignees: '' +body: + - type: checkboxes + attributes: + label: "Is there an existing issue that is already proposing this?" + 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" + options: + - label: "I have searched the existing issues" + required: true + + - type: textarea + validations: + required: true + attributes: + label: "Describe the problem imposed by not having this feature" + description: "Please describe the use-case you are attempting to implement, and the current limitations you are facing." + + - type: textarea + validations: + required: true + attributes: + label: "Describe the solution you'd like" + description: "A clear and concise description of what you want to happen. Add any considered drawbacks" + + + - type: textarea + attributes: + label: "Other" + description: | + Anything else you want to share? diff --git a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md index c9ebfd7..6b802b2 100644 --- a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md +++ b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST.md @@ -1,33 +1,25 @@ +## PR Type +What kind of change does this PR introduce? -**SEMVER Update Type:** -- [ ] Major -- [ ] Minor -- [ ] Patch + +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update (formatting) +- [ ] Refactoring (no functional changes) +- [ ] CI related changes +- [ ] Other... Please describe: -## Description: +## What is the current behavior? + - +Issue Number: N/A -## Motivation: +## What is the new behavior? - +## Does this PR introduce a breaking change? +- [ ] Yes +- [ ] No - **Closes Issues:** -- ISSUE URL + -## Checklist: - - - -- [ ] All new jobs, commands, executors, parameters have descriptions. -- [ ] Usage Example version numbers have been updated. -- [ ] Changelog has been updated. \ No newline at end of file +## Other information diff --git a/.gitignore b/.gitignore index 19eafbb..c9967f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # orb.yml is "packed" from source, and not published directly from the repository. -orb.yml \ No newline at end of file +orb.yml +.DS_Store diff --git a/LICENSE b/LICENSE index 8d7cb6b..5ca0b06 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 +Copyright (c) 2021 Circle Internet Services, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5a9b204..e854889 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,29 @@ # Continuation Orb -[![CircleCI Build Status](https://circleci.com/gh/CircleCI-Public/continuation-orb.svg?style=shield "CircleCI Build Status")](https://circleci.com/gh/CircleCI-Public/continuation-orb) [![CircleCI Orb Version](https://img.shields.io/badge/endpoint.svg?url=https://badges.circleci.io/orb/circleci/continuation)](https://circleci.com/developer/orbs/orb/circleci/continuation) [![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/CircleCI-Public/continuation-orb/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs) +[![CircleCI Build Status](https://circleci.com/gh/CircleCI-Public/continuation-orb.svg?style=shield "CircleCI Build Status")](https://circleci.com/gh/CircleCI-Public/continuation-orb) [![CircleCI Orb Version](https://badges.circleci.com/orbs/circleci/continuation.svg)](https://circleci.com/orbs/registry/orb/circleci/continuation) [![GitHub License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/CircleCI-Public/continuation-orb/master/LICENSE) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/orbs) Makes requests to the continuation API for setup workflows. ## Resources -[CircleCI Orb Registry Page](https://circleci.com/developer/orbs/orb/circleci/continuation) - The official registry page of this orb for all versions, executors, commands, and jobs described. -[CircleCI Orb Docs](https://circleci.com/docs/2.0/orb-intro/#section=configuration) - Docs for using and creating CircleCI Orbs. +[CircleCI Orb Registry Page](https://circleci.com/orbs/registry/orb/circleci/continuation) - The official registry page of this orb for all versions, executors, commands, and jobs described. + +[CircleCI Orb Docs](https://circleci.com/docs/2.0/orb-intro/#section=configuration) - Docs for using, creating, and publishing CircleCI Orbs. ### How to Contribute We welcome [issues](https://github.com/CircleCI-Public/continuation-orb/issues) to and [pull requests](https://github.com/CircleCI-Public/continuation-orb/pulls) against this repository! -### How to Publish -* Create and push a branch with your new features. -* When ready to publish a new production version, create a Pull Request from _feature branch_ to `master`. -* The title of the pull request must contain a special semver tag: `[semver:]` where `` is replaced by one of the following values. - -| Increment | Description| -| ----------| -----------| -| major | Issue a 1.0.0 incremented release| -| minor | Issue a x.1.0 incremented release| -| patch | Issue a x.x.1 incremented release| -| skip | Do not issue a release| - -Example: `[semver:major]` - -* Squash and merge. Ensure the semver tag is preserved and entered as a part of the commit message. -* On merge, after manual approval, the orb will automatically be published to the Orb Registry. - - -For further questions/comments about this or other orbs, visit the Orb Category of [CircleCI Discuss](https://discuss.circleci.com/c/orbs). +### How to Publish An Update +1. Merge pull requests with desired changes to the main branch. + - For the best experience, squash-and-merge and use [Conventional Commit Messages](https://conventionalcommits.org/). +2. Find the current version of the orb. + - You can run `circleci orb info circleci/continuation | grep "Latest"` to see the current version. +3. Create a [new Release](https://github.com/CircleCI-Public/continuation-orb/releases/new) on GitHub. + - Click "Choose a tag" and _create_ a new [semantically versioned](http://semver.org/) tag. (ex: v1.0.0) + - We will have an opportunity to change this before we publish if needed after the next step. +4. Click _"+ Auto-generate release notes"_. + - This will create a summary of all of the merged pull requests since the previous release. + - 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. +5. Now ensure the version tag selected is semantically accurate based on the changes included. +6. Click _"Publish Release"_. + - This will push a new tag and trigger your publishing pipeline on CircleCI.