-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
89 lines (80 loc) · 2.31 KB
/
config.yml
File metadata and controls
89 lines (80 loc) · 2.31 KB
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
# yamllint disable rule:line-length
version: 2.1
orbs:
circleci-cli: circleci/circleci-cli@volatile
vrsn: tx3stn/vrsn@volatile
anchors:
dependabot-branch-regex: &dependabot-branch-regex /^dependabot\/.*/
ignore-main: &ignore-main
filters:
branches:
ignore:
- main
ignore-main-and-dependabot: &ignore-main-and-dependabot
filters:
branches:
ignore:
- main
- *dependabot-branch-regex
only-main: &only-main
filters:
branches:
only:
- main
only-dependabot: &only-dependabot
filters:
branches:
only:
- *dependabot-branch-regex
jobs:
push-dev-tagged-orb:
executor: circleci-cli/default
steps:
- checkout
- run:
name: publish dev tagged orb
command: |
# get version from main branch to ensure docker container with tag exists for the orb to use.
VERSION=$(git --no-pager show main:VERSION | head -n 1)
sed -r "s/\"%%VRSN_VERSION%%\"/$VERSION/g" -i ./.circleci/orb.yml
circleci orb publish ./.circleci/orb.yml tx3stn/vrsn@dev:$CIRCLE_BRANCH --token $CIRCLECI_ORB_API_TOKEN
push-live-tagged-orb:
executor: circleci-cli/default
steps:
- checkout
- run:
name: publish live orb
command: |
VERSION=$(head -n 1 VERSION)
sed -r "s/\"%%VRSN_VERSION%%\"/$VERSION/g" -i ./.circleci/orb.yml
circleci orb publish ./.circleci/orb.yml "tx3stn/vrsn@$VERSION" --token $CIRCLECI_ORB_API_TOKEN
validate-orb:
executor: circleci-cli/default
steps:
- checkout
- run:
name: validate orb
command: circleci orb validate ./.circleci/orb.yml
workflows:
pull-request-build:
jobs:
- vrsn/bump-version:
bump-type: patch
ssh-key-fingerprint: SHA256:MWytBJLJVEh/0/9qNhvwcoAiM/dhuWpmxomHGGomiGI
<<: *only-dependabot
- vrsn/check-version:
<<: *ignore-main-and-dependabot
- validate-orb:
<<: *ignore-main
- push-dev-tagged-orb:
<<: *ignore-main
requires:
- validate-orb
merge-to-main:
jobs:
- validate-orb:
<<: *only-main
- push-live-tagged-orb:
<<: *only-main
requires:
- validate-orb