-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdebbuilder.yml
87 lines (84 loc) · 3.81 KB
/
debbuilder.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
---
- hosts: debbuilders
gather_facts: no
user: ubuntu
sudo: true
vars:
acs_ver: 4.2.1
acs_url: https://dist.apache.org/repos/dist/release/cloudstack/releases
tasks:
- name: add maven3 ppa
action: command /usr/bin/add-apt-repository -y ppa:natecarlson/maven3
- name: update cache
apt: update_cache=yes
- name: Install deps and niceties
apt: name=$item state=latest
with_items:
- wget
- dpkg
- ant
- debhelper
- openjdk-6-jdk
- tomcat6
- libws-commons-util-java
- genisoimage
- python-mysqldb
- libcommons-codec-java
- libcommons-httpclient-java
- liblog4j1.2-java
- maven3
- name: Create Maven3 directory link
file: path=/usr/bin/mvn src=/usr/bin/mvn3 state=link
- name: create .m2 directory
file: path=/root/.m2 state=directory
- name: Copy in settings.xml to use ACS-specific Archiva repo
template: src=settings.xml dest=/root/.m2/settings.xml
# CloudStack source tarball download and manipulation
- name: Get KEYS
get_url: dest=/opt/KEYS url=http://www.apache.org/dist/cloudstack/KEYS
- name: Get CloudStack
get_url: dest=/opt/cs.tar.bz2 url={{acs_url}}/{{acs_ver}}/apache-cloudstack-{{acs_ver}}-src.tar.bz2
- name: Get md5
get_url: dest=/opt/cs.tar.bz2.md5 url={{acs_url}}/{{acs_ver}}/apache-cloudstack-{{acs_ver}}-src.tar.bz2.md5
- name: Get sha
get_url: dest=/opt/cs.tar.bz2.sha256 url={{acs_url}}/{{acs_ver}}/apache-cloudstack-{{acs_ver}}-src.tar.bz2.sha
- name: Get sigs
get_url: dest=/opt/cs.tar.bz2.asc url={{acs_url}}/{{acs_ver}}/apache-cloudstack-{{acs_ver}}-src.tar.bz2.asc
- name: import KEYS
shell: gpg --import /opt/KEYS
- name: verify sigs
shell: gpg --verify /opt/cs.tar.bz2.asc
# Below isn't working because of hash formatting, not an ansible problem.
# - name: verify md5
# shell: chdir=/opt md5sum -c ./cs.tar.bz2.md5
# - name: verify sha256sum
# shell: chdir=/opt sha256sum -c ./cs.tar.bz2.sha256
- name: unpack CloudStack
action: command creates=/opt/apache-cloudstack-{{acs_ver}}-src chdir=/opt tar xjvf /opt/cs.tar.bz2
- name: Get iControl.jar
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/cloud-iControl.jar url=http://zooi.widodh.nl/cloudstack/build-dep/cloud-iControl.jar
- name: Get manageontap.jar
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/manageontap.jar url=http://zooi.widodh.nl/cloudstack/build-dep/cloud-manageontap.jar
- name: Get VMware VIM.jar
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/vim.jar url=http://zooi.widodh.nl/cloudstack/build-dep/vmware-vim.jar
- name: get apputils.jar
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/apputils.jar url=http://zooi.widodh.nl/cloudstack/build-dep/vmware-apputils.jar
- name: get netscaler jar 1
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/cloud-netscaler.jar url=https://s3.amazonaws.com/deps.cloudstack.org/cloud-netscaler-sdx.jar
- name: get netscaler jar 2
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/cloud-netscaler.jar url=https://s3.amazonaws.com/deps.cloudstack.org/cloud-netscaler-sdx.jar
- name: get vim25_51
get_url: dest=/opt/apache-cloudstack-{{acs_ver}}-src/deps/vim25_51.jar url=https://s3.amazonaws.com/deps.cloudstack.org/vim25.jar
- name: Install the deps
action: command chdir=/opt/apache-cloudstack-{{acs_ver}}-src/deps ./install-non-oss.sh
- name: run maven to get deps
action: command chdir=/opt/apache-cloudstack-{{acs_ver}}-src/ mvn3 -P deps
- name: build debs
action: command chdir=/opt/apache-cloudstack-{{acs_ver}}-src/ dpkg-buildpackage -uc -us
#TODO:
# What isn't yet done:
# Figure out how to build nonoss debs. Is this a dpkg alternative?
# Make changes for 4.3 - s/nonoss/noredist/g
# Building a deb repo
# Taring the repo up
# pushing the content to S3