-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
69 lines (69 loc) · 2.87 KB
/
.travis.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
language: go
sudo: required
dist: bionic
addons:
apt:
packages:
- lynx
- jq
- wget -q
- grep
- nginx
- curl
go:
- '1.13'
global:
- TMPDIR=/tmp
before_script:
- curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
- sudo rsync -az ${TRAVIS_BUILD_DIR}/ /usr/local/bootstrap/
- pushd packer
- if [ $VAGRANT_CLOUD_TOKEN ] ; then packer validate -syntax-only template.json ; fi
- popd
- cat /usr/local/bootstrap/var.env
- sed -i 's/LEADER_IP=192.168.9.11/LEADER_IP=127.0.0.1/g' /usr/local/bootstrap/var.env
- sed -i 's/REDIS_MASTER_IP=192.168.9.200/REDIS_MASTER_IP=127.0.0.1/g' /usr/local/bootstrap/var.env
- cat /usr/local/bootstrap/var.env
- sudo chmod -R 777 /tmp
- bash scripts/packer_install_base_packages.sh
- bash scripts/packer_install_base_services.sh
- bash scripts/install_consul.sh
- bash scripts/consul_enable_acls_1.4.sh
- bash scripts/install_vault.sh
- bash scripts/install_redis.sh
- bash scripts/install_nomad.sh
- bash scripts/install_SecretID_Factory.sh
- pwd
- ls -al /usr/local/bootstrap/
- sudo cp /home/travis/.vault-token /usr/local/bootstrap/.vault-token
- echo 314159265359 > /usr/local/bootstrap/.appRoleID
script:
- source /usr/local/bootstrap/var.env
- cat /usr/local/bootstrap/var.env
- echo 'Set environmental bootstrapping data in VAULT'
- export VAULT_TOKEN=reallystrongpassword
- export VAULT_ADDR=https://127.0.0.1:8322
- export VAULT_CLIENT_KEY=/tmp/vault.d/pki/tls/private/vault-cli-key.pem
- export VAULT_CLIENT_CERT=/tmp/vault.d/pki/tls/certs/vault-cli.pem
- export VAULT_CACERT=/tmp/ssl/certs/vault-ca-chain.pem
- vault status
# Configure consul environment variables for use with certificates
- export CONSUL_HTTP_ADDR=https://127.0.0.1:8321
- export CONSUL_CACERT=/tmp/ssl/certs/consul-ca-chain.pem
- export CONSUL_CLIENT_CERT=/tmp/consul.d/pki/tls/private/consul-peer-key.pem
- export CONSUL_CLIENT_KEY=/tmp/consul.d/pki/tls/certs/consul-peer.pem
- consul version
- go version
- inspec exec --chef-license=accept test/ImageBuild-Packer-Test
- bash scripts/travis_run_go_app.sh
deploy:
provider: releases
api_key:
secure: dAo/pXZ/jan3BcUA2bbhYl2v5QAW2JRAsaM0g077OJYxjUoepWarrb8puk0zdGfZ92ER+a7jwmXudbFVzk22Vp/aliIMkbrouQXVrXQaWZq0H45XD3grC5Pgbjdbn/s7gfCXk6IsZNkc1ztkpluFGox7iZXIYsrWJDvnjMNuhs6KWQpymKD8VQaQU1AqnWOOCWmkqLOy7pXtf9XQS44I5KkUibNFc5vxDqZriNCAkVSYZbvhmEphRb2iWGEtTxrJtU61Gj+fVpu6wpEO0JgWZNqmJTXgIXiPYb9i//uuRnA8qVym+PBl2azkMrmRV7TFbyzes1S5P5aWq0SgcYPKDtb7c5zJUzZkvpqkGDvriLUO2qyZq5PIC1Ega/bzLQMj/Nd8OMaJZjjoTNDc8frqQ9j84Q1WYTt1mhkMJF4LjXTar45nomR2GjBWfrETQBCGmO4fKYyNctx4cg8arz7MwftPIEt6orDegQzu8HR5oCX0hBvzDwK96JGtT8vfC4LfhtftTtTO2VqIMZ7lPbHzgyIswSBcVc9B7VIPS4Zka8JEzO1CRzeoL9u6HWNsUnre/U+twyxNmkZ1ZQW1kjeet8PT6S7eVRJuMofQJwhP42gz3yve8LaDaOxihlmD+UHnBVpDGSYl2ieLr+TAh2uwBNhs0bdEHJFNfwvNg9ySXKs=
file_glob: true
file:
- "./webcounter"
skip_cleanup: true
on:
repo: allthingsclowd/web_page_counter
tags: true