Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Add .circleci/config.yml #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 19 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,26 @@
parameters:
spec-root:
type: string
default: "./specs/"


# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

orbs:
tools: circleci/node@volatile
spectacle:
executors:
default:
docker:
- image: sourcey/spectacle
commands:
build-docs:
parameters:
file:
type: string
description: "local path to the openAPI json"
save-artifact:
type: boolean
default: true
publish-dir:
type: string
default: "~/spectacle/"
steps:
- run: spectacle -t <<parameters.publish-dir >> << parameters.file >>
- when:
condition: << parameters.save-artifact >>
steps:
store_artifacts:
path: << parameters.publish-dir >>
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
generate-docs:
executor: spectacle/default
say-hello:
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor
docker:
- image: cimg/base:stable
# Add steps to the job
# See: https://circleci.com/docs/2.0/configuration-reference/#steps
steps:
- checkout
- run: curl -o circleci-openapi.json https://circleci.com/api/v2/openapi.json
- spectacle/build-docs:
file: circleci-openapi.json
- run:
name: "Say hello"
command: "echo Hello, World!"

# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
main:
say-hello-workflow:
jobs:
- generate-docs

- say-hello