Add CentOS jenkins ci hooks
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
[](http://travis-ci.org/purpleidea/mgmt)
|
[](http://travis-ci.org/purpleidea/mgmt)
|
||||||
[](DOCUMENTATION.md)
|
[](DOCUMENTATION.md)
|
||||||
[](https://webchat.freenode.net/?channels=#mgmtconfig)
|
[](https://webchat.freenode.net/?channels=#mgmtconfig)
|
||||||
|
[](https://ci.centos.org/job/purpleidea-mgmt/)
|
||||||
|
|
||||||
## Documentation:
|
## Documentation:
|
||||||
Please see: [DOCUMENTATION.md](DOCUMENTATION.md) or [PDF](https://pdfdoc-purpleidea.rhcloud.com/pdf/https://github.com/purpleidea/mgmt/blob/master/DOCUMENTATION.md).
|
Please see: [DOCUMENTATION.md](DOCUMENTATION.md) or [PDF](https://pdfdoc-purpleidea.rhcloud.com/pdf/https://github.com/purpleidea/mgmt/blob/master/DOCUMENTATION.md).
|
||||||
@@ -15,6 +16,7 @@ Please look in the [examples/](examples/) folder!
|
|||||||
|
|
||||||
## Bugs:
|
## Bugs:
|
||||||
Please set the `DEBUG` constant in [main.go](https://github.com/purpleidea/mgmt/blob/master/main.go) to `true`, and post the logs when you report the [issue](https://github.com/purpleidea/mgmt/issues).
|
Please set the `DEBUG` constant in [main.go](https://github.com/purpleidea/mgmt/blob/master/main.go) to `true`, and post the logs when you report the [issue](https://github.com/purpleidea/mgmt/issues).
|
||||||
|
Bonus points if you provide an [OMV](https://github.com/purpleidea/mgmt/tree/master/test/omv) reproducible test case.
|
||||||
There are currently a few known bugs which I hope to squash soon.
|
There are currently a few known bugs which I hope to squash soon.
|
||||||
|
|
||||||
## Notes:
|
## Notes:
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ if [ $travis -eq 0 ]; then
|
|||||||
fi
|
fi
|
||||||
sudo yum install -y golang golang-googlecode-tools-stringer
|
sudo yum install -y golang golang-googlecode-tools-stringer
|
||||||
sudo yum install -y hg # some go dependencies are stored in mercurial
|
sudo yum install -y hg # some go dependencies are stored in mercurial
|
||||||
sudo yum install -y etcd
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build etcd
|
# build etcd
|
||||||
|
|||||||
25
misc/make-gopath.sh
Executable file
25
misc/make-gopath.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# setup a simple go environment
|
||||||
|
|
||||||
|
if ! env | grep -q '^GOPATH='; then
|
||||||
|
export GOPATH="$HOME/gopath/"
|
||||||
|
mkdir "$GOPATH"
|
||||||
|
if ! grep -q '^export GOPATH=' ~/.bashrc; then
|
||||||
|
echo "export GOPATH=~/gopath/" >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
echo "setting go path to: $GOPATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "gopath is: $GOPATH"
|
||||||
|
|
||||||
|
# some versions of golang apparently require this to run go get :(
|
||||||
|
if ! env | grep -q '^GOBIN='; then
|
||||||
|
export GOBIN="${GOPATH}bin/"
|
||||||
|
mkdir "$GOBIN"
|
||||||
|
if ! grep -q '^export GOBIN=' ~/.bashrc; then
|
||||||
|
echo 'export GOBIN="${GOPATH}bin/"' >> ~/.bashrc
|
||||||
|
fi
|
||||||
|
echo "setting go bin to: $GOBIN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "gobin is: $GOBIN"
|
||||||
5
test.sh
5
test.sh
@@ -21,3 +21,8 @@ if env | grep -q -e '^TRAVIS=true$' -e '^JENKINS_URL='; then
|
|||||||
go test -race
|
go test -race
|
||||||
./test/test-shell.sh
|
./test/test-shell.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# run omv tests on jenkins physical hosts only
|
||||||
|
if env | grep -q -e '^JENKINS_URL='; then
|
||||||
|
./test/test-omv.sh
|
||||||
|
fi
|
||||||
|
|||||||
51
test/omv/helloworld.yaml
Normal file
51
test/omv/helloworld.yaml
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
:domain: example.com
|
||||||
|
:network: 192.168.123.0/24
|
||||||
|
:image: fedora-23
|
||||||
|
:cpus: ''
|
||||||
|
:memory: ''
|
||||||
|
:disks: 0
|
||||||
|
:disksize: 40G
|
||||||
|
:boxurlprefix: ''
|
||||||
|
:sync: rsync
|
||||||
|
:syncdir: ''
|
||||||
|
:syncsrc: ''
|
||||||
|
:folder: ".omv"
|
||||||
|
:extern:
|
||||||
|
- type: git
|
||||||
|
repository: https://github.com/purpleidea/mgmt
|
||||||
|
directory: mgmt
|
||||||
|
:cd: ''
|
||||||
|
:puppet: false
|
||||||
|
:classes: []
|
||||||
|
:shell:
|
||||||
|
- mkdir /tmp/mgmt/
|
||||||
|
:docker: false
|
||||||
|
:kubernetes: false
|
||||||
|
:ansible: []
|
||||||
|
:playbook: []
|
||||||
|
:ansible_extras: {}
|
||||||
|
:cachier: false
|
||||||
|
:vms:
|
||||||
|
- :name: etcd
|
||||||
|
:shell:
|
||||||
|
- iptables -F
|
||||||
|
- cd /vagrant/mgmt/ && make deps && make build && cp mgmt ~/bin/
|
||||||
|
- etcd -bind-addr "`hostname --ip-address`:2379" &
|
||||||
|
- cd && mgmt --help
|
||||||
|
:namespace: omv
|
||||||
|
:count: 0
|
||||||
|
:username: ''
|
||||||
|
:password: ''
|
||||||
|
:poolid: true
|
||||||
|
:repos: []
|
||||||
|
:update: false
|
||||||
|
:reboot: false
|
||||||
|
:unsafe: false
|
||||||
|
:nested: false
|
||||||
|
:tests:
|
||||||
|
- omv up etcd
|
||||||
|
- vssh root@etcd -c pidof etcd
|
||||||
|
- omv destroy
|
||||||
|
:comment: simple hello world test case for mgmt
|
||||||
|
:reallyrm: false
|
||||||
3
test/test-omv.sh
Executable file
3
test/test-omv.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash -ie
|
||||||
|
# simple test harness for testing mgmt via omv
|
||||||
|
vtest+ omv/helloworld.yaml
|
||||||
Reference in New Issue
Block a user