forked from sustainableis/step-kubectl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
37 lines (31 loc) · 1.45 KB
/
wercker.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
box: wercker/default
build:
steps:
- shellcheck
- script:
name: config
code: |
export KUBERNETES_VERSION="1.3.1"
export KUBERNETES_MD5="ae6e9902ec70c1322d9a0a29ef385190"
export KUBERNETES_SHA1="5645b12beda22137204439de8260c62c9925f89b"
echo "Installing version $KUBERNETES_VERSION of kubernetes"
- script:
name: fetch kubernetes archive
code: |
curl -L https://github.com/kubernetes/kubernetes/releases/download/v${KUBERNETES_VERSION}/kubernetes.tar.gz > /tmp/kubernetes.tar.gz
- script:
name: validate kubernetes archive
code: |
cat /tmp/kubernetes.tar.gz | sha1sum | grep -q "$KUBERNETES_SHA1"
cat /tmp/kubernetes.tar.gz | md5sum | grep -q "$KUBERNETES_MD5"
- script:
name: extract kubernetes archive
code: |
mkdir /tmp/kubernetes/
tar xzvf /tmp/kubernetes.tar.gz -C /tmp/kubernetes/
- script:
name: prepare output
code: |
cp "$WERCKER_ROOT/LICENSE" "$WERCKER_ROOT/README.md" "$WERCKER_ROOT/run.sh" "$WERCKER_ROOT/wercker.yml" "$WERCKER_ROOT/wercker-step.yml" "$WERCKER_OUTPUT_DIR"
cp /tmp/kubernetes/kubernetes/platforms/linux/amd64/kubectl "$WERCKER_OUTPUT_DIR/kubectl"
chmod ugo+rx "$WERCKER_OUTPUT_DIR/kubectl"