forked from fujiwara/lambroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircleci-orb.yml
56 lines (52 loc) · 1.44 KB
/
circleci-orb.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
version: 2.1
description: "orb for lambroll"
orbs:
detect: circleci/[email protected]
commands:
install:
description: "install lambroll"
parameters:
version:
description: lambroll version
type: string
default: v0.10.0
steps:
- detect/init
- run:
name: "Install lambroll"
command: |
case $OSD_FAMILY in
linux)
PKG_EXT=tar.gz
EXTRACT="tar zxvf"
;;
darwin)
PKG_EXT=zip
EXTRACT="unzip"
;;
*)
echo "Unsupported operating system. $OSD_FAMILY"
exit 1
;;
esac
DIRNAME=lambroll_<< parameters.version >>_${OSD_FAMILY}_amd64
FILENAME=${DIRNAME}.${PKG_EXT}
LAMBROLL_URL=https://github.com/fujiwara/lambroll/releases/download/<< parameters.version >>/${FILENAME}
curl -L $LAMBROLL_URL > /tmp/${FILENAME}
$EXTRACT /tmp/${FILENAME}
sudo install ${DIRNAME}/lambroll /usr/local/bin
examples:
install_lambroll:
description: Easily install lambroll command
usage:
version: 2.1
orbs:
lambroll: fujiwara/[email protected]
jobs:
lambroll_example:
steps:
- checkout
- lambroll/install
- run:
command: |
lambroll deploy