This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
config.yml
executable file
·90 lines (81 loc) · 3.18 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: 2.1
# add your orb below, to be used in integration tests (note: a @dev:alpha
# release must exist.);
orbs:
<orb-name>: <orb-namespace>/<orb-name>@<<pipeline.parameters.dev-orb-version>>
orb-tools: circleci/orb-tools@9.0
# Pipeline parameters
parameters:
# These pipeline parameters are required by the "trigger-integration-tests-workflow"
# job, by default.
run-integration-tests:
type: boolean
default: false
dev-orb-version:
type: string
default: "dev:alpha"
jobs:
# This job is an example of an integration testing job.
# This job should execute a command from your orb and verify
# the output is as expected, otherwise the job should fail.
#
# Rename this job and add more as needed.
#
integration-test-1:
executor: orb-tools/ubuntu
steps:
- checkout
# - your-orb/your-orb-command
workflows:
# This `lint-pack_validate_publish-dev` workflow will run on any commit.
lint_pack-validate_publish-dev:
unless: << pipeline.parameters.run-integration-tests >>
jobs:
- orb-tools/lint
# pack your orb YAML files to a single orb.yml
# validate the orb.yml file to ensure it is well-formed
- orb-tools/pack:
requires:
- orb-tools/lint
# release dev version of orb, for testing & possible publishing.
# orb will be published as dev:alpha and dev:${CIRCLE_SHA1:0:7}.
# requires a CircleCI API token to be stored as CIRCLE_TOKEN (default)
# https://circleci.com/docs/2.0/managing-api-tokens
# store CIRCLE_TOKEN as a project env var or Contexts resource
# if using Contexts, add your context below
- orb-tools/publish-dev:
orb-name: <orb-namespace>/<orb-name>
requires:
- orb-tools/pack
# 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
requires:
- orb-tools/publish-dev
# This `integration-tests_prod-release` 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 <your orb>@dev:${CIRCLE_SHA1:0:7}.
integration-tests_prod-release:
when: << pipeline.parameters.run-integration-tests >>
jobs:
# your integration test jobs go here: essentially, run all your orb's
# jobs and commands to ensure they behave as expected. or, run other
# integration tests of your choosing
# an example job
- 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: <orb-namespace>/<orb-name>
<orb-config-opts>
requires:
- integration-test-1
filters:
branches:
only: master