-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathwercker.yml
More file actions
64 lines (63 loc) · 2.09 KB
/
wercker.yml
File metadata and controls
64 lines (63 loc) · 2.09 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
# This references a standard debian container from the
# Docker Hub https://registry.hub.docker.com/_/debian/
# Read more about containers on our dev center
# http://devcenter.wercker.com/docs/containers/index.html
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
box: webgpu/pandoc
build:
steps:
- script:
name: install git
code: |
apt-get update
apt-get install -y git
- script:
name: initialize git submodules
code: |
git submodule update --init --recursive
- script:
name: install golang
code: |
version="1.6"
sudo apt-get update
sudo apt-get install -y bzr mercurial wget git
wget http://golang.org/dl/go${version}.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go${version}.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" | sudo tee -a /etc/profile
rm go${version}.linux-amd64.tar.gz
# Set GOPATH
export GOPATH="$HOME/go"
echo 'export GOPATH="$HOME/go"' | sudo tee -a /etc/profile
# Adds go bin directory to path so tools
# and buils are available on the commandline
export PATH="$PATH:$GOPATH/bin"
echo 'export PATH="$PATH:$GOPATH/bin"' | sudo tee -a /etc/profile
# Make actual go workspace dir structure
mkdir -p "$HOME/go/{src,pkg,bin}"
- script:
name: install ssh key
code: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
git config --global url."git@gitlab.com:".insteadOf "https://gitlab.com"
- script:
name: build documents
code: |
go get gitlab.com/abduld/wgx-pandoc
mkdir build
wgx-pandoc .
- s3sync:
key-id: $AWS_ACCESS_KEY_ID
key-secret: $AWS_SECRET_ACCESS_KEY
bucket-url: $AWS_BUCKET_URL
source-dir: build
opts: --acl-private
after-steps:
- wantedly/pretty-slack-notify:
webhook_url: $SLACK_WEBHOOK_URL
- script:
name: delete ssh key
code: |
rm ~/.ssh/id_rsa