-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
92 lines (80 loc) · 3.84 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
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
90
91
92
box: wercker-labs/docker
build:
steps:
- script:
name: setup
code: |
sudo apt-get update -y -qq
- install-packages:
packages: ruby ruby-dev bzr mercurial git wget
- script:
name: install java
code: |-
# Remove java from base box
sudo apt-get -y -qq purge openjdk-\* icedtea-\* icedtea6-\*
# Assert that java is not available anymore
! type java || { echo "I expected java to be not available. Java version is: $(java -version). Aborting."; exit 1; }
# Add webupd8 team repository that contains the 3 major oracle-java versions
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get -y -qq update
# Accept the oracle license
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
# Install oracle-java7
sudo apt-get install oracle-java7-installer -y -qq
# We should have java again
type java || { echo "I expected java to be available after oracle-java7-installer installation. Aborting."; exit 1; }
# Install ant
sudo apt-get install ant ant-contrib ivy ivy-doc -y -qq
# We should have ant and ivy available
type ant || { echo "I expected ant to be available. Aborting."; exit 1; }
# Install maven
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main" -y
sudo apt-get update -y -qq
sudo apt-get install maven3 -y -qq --force-yes
sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
type mvn || { echo "I expected maven to be available. Aborting."; exit 1; }
- script:
name: setup
code: |
sudo gem install bundle --no-ri --no-rdoc
sudo gem install rake --no-ri --no-rdoc
sudo gem install serverspec --no-ri --no-rdoc
# Install golang
version="1.3.1"
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 ansible
code: |
sudo apt-get -y install software-properties-common
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get -y update
sudo apt-get -y install ansible
- script:
name: copy settings.xml for maven
code: |
mkdir ~/.m2 && cp ./settings.xml ~/.m2/settings.xml
- ainoya/[email protected]:
key_name: WALTERSAMPLE_KEY
- ainoya/[email protected]:
key_name: ANSIBLE
- script:
name: build walter
code: |
git clone https://github.com/walter-cd/walter.git vendor/walter
cd vendor/walter && ./build
- script:
name: execute deployment pipeline with walter
code : ./vendor/walter/bin/walter -c ./pipeline.yml