forked from ampproject/amp-wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
76 lines (61 loc) · 5.69 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
70
71
72
73
74
75
76
language: php
dist: trusty
env:
global:
- secure: HfFNS89yP+4V+rcdwKcOv2p0xxb8KSIJO2oMO8KWoBO83LONkdlA6M8sLJlUgIqglfB3dMonUcIXmjVVStoAuQH+Z6bQ9pFvLMED8nqcMHvEAUGhygphfZ4YYz0NLbAL4v0BGJZYVmC3+4uj5IHU31DaXt85C+QyTHU1ra9azevbSHe0y0hfWHVEjbp5BVCNVWgiYi6ROZLpBLg/YBFVH0hs05ladz54F5w/UPe//ZobShdReunat2WVMic1LBGBQ2wk733fqApYKFvipgdvgxndEqmmRxgywUNDNODnmYvc4vZ32zWPqPGYfeQT2q7M7loCZN5xIMAJbCLqZ0V1VmAH2FyG4Ep/HzNv7Xm//J5r2GVlzvNkkjqJrqUVPGp496KrNRt/JNQUnq3BxZB2oGhmTAYtQxmLxNi9C5GTyAsVvPAQidYyEOpSAC31+zVjPDe0Qzn0unT4cQeTcMaw3O1fA9oyk3YCjti6gFNVzxFFJKuGO0IdAnLUCieZkrTn+Qv7J7KGvhoUZr6RwB16x16Ls9D/XOGoz0oBpK4YmmC/3C/3g3p7C8nfpXpw13lcTTdVEwRUV1HjUsC8b+eEdEfRssGlEeZMkuo68JQGNwlIFwh65Fq5468uyEWPMK3bzHIh+oe6hqKgf7tsmKl8+e1BZV6Q1zrI9ySieA3zRiQ=
- secure: PeThzTkIj3YNVH+X7qun1xtpn8IAlilzYyXCvM20MMnqG9e0PHjea96hQVXRd27tpdZXlET8BPSq1PLFZo6F7GNof4JujmrHwkSLDtIVpD2K31bwEHtr6+8rnG/Hr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KKbc34II7UaDfkAMVf89oCsiCi5FPPFo8VP2VwTCn17W9halIY9L6Ub7FcJyM2Lrm+oMPJiTBDDYFf6sGOOCJBFYA9KEtxSFe/q8oeJQwQsSjxKvRffgb++Ug6p93Wgi2i4KX1T//6aDr3rCjVW6OqvCa68D+VGZo14dvz8H3vSWp9/FTLg4RtLDAenkIRRVcmDjVb91PyP1DrZqTAps2qKLpgrSr2wFkVZwysvykYmaUIN2A/PN4iXwp3PJ+5EqS3NkLKIAifP1nvWoePr41/Y0f616SY33N9kSFPCI75Itv0+qmdCajqs2fOrt11YmF3gpyglwXq/dec5mQCNHZo6zI4XI9hNg90TeVQ2Q7VQlRiMlHgMBiFq53nMYLh5cSTt3QA01et+8ylLShqcqggMjvDFFTEAmNUsSkuIgYNmTbLdXh4zRY/Kbf5/cl59h5gpzPxCo30OcNtsD8=
- COMMIT=${TRAVIS_COMMIT::7}
- REPO=amp-converter
- AWS_REGION=us-east-1
notifications:
slack: franklychat:zzmJpxdwNxhkyTaKEiRdHZ0h
services:
- docker
cache:
directories:
- node_modules
- vendor
- "$HOME/phpunit-bin"
- "$HOME/deployment-targets"
before_install:
- cp .netrc ~
install:
- if [[ $DEV_LIB_SKIP =~ composer ]]; then composer install --no-dev; fi
- nvm install 6 && nvm use 6
before_script:
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH;fi`
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
script:
- docker build -f Dockerfile -t franklyops/$REPO:$COMMIT .
- docker tag franklyops/$REPO:$COMMIT franklyops/$REPO:$TAG
- docker tag franklyops/$REPO:$COMMIT franklyops/$REPO:travis-$TRAVIS_BUILD_NUMBER
- if [ "$TRAVIS_BRANCH" == "develop" ]; then
docker tag franklyops/$REPO:$COMMIT franklyops/$REPO:dev-latest;
fi
- docker push franklyops/$REPO
after_script:
# Perform deployment (only if merge into 'develop' branch)
# Pull the config template
# Token replacements for the specific deployment (variables from TravisCI)
# Pull kubectl
# Pull aws-iam-authenticator
# Set Travis creds to be able to deploy
# Deploy platform
# Deploy web
- if [ "$TRAVIS_BRANCH" == "frankly-amp_fb-and-slideshow-fix" ]; then
curl -O https://[email protected]/franklyinc/kubernetes/master/common/kubeconfig-eks;
sed -i -e 's|KUBE_CA_CERT|'"${KUBE_CA_CERT}"'|g' kubeconfig-eks;
sed -i -e 's|KUBE_ENDPOINT|'"${KUBE_ENDPOINT}"'|g' kubeconfig-eks;
curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/bin/linux/amd64/kubectl;
chmod +x ./kubectl;
sudo mv ./kubectl /usr/local/bin/kubectl;
curl -O https://[email protected]/franklyinc/kubernetes/master/eks/aws-iam-authenticator;
chmod +x ./aws-iam-authenticator;
sudo mv ./aws-iam-authenticator /usr/local/bin/aws-iam-authenticator;
export AWS_ACCESS_KEY_ID=${TRAVIS_AWS_KEY};
export AWS_SECRET_ACCESS_KEY=${TRAVIS_AWS_SECRET};
kubectl --kubeconfig kubeconfig-eks set image deployment/$REPO-deployment $REPO=${DOCKER_USERNAME}/$REPO:travis-$TRAVIS_BUILD_NUMBER;
fi