forked from sustainableis/step-kubectl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
35 lines (29 loc) · 1.33 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
box: wercker/default
build:
steps:
- shellcheck
- script:
name: config
code: |
export KUBERNETES_VERSION="1.3.3"
export KUBERNETES_SHA256="a92a74a0d3f7d02d01ac2c8dfb5ee2e97b0485819e77b2110eb7c6b7c782478c"
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 | sha256sum | grep -q "$KUBERNETES_SHA256"
- 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"