This repository has been archived by the owner on Mar 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
/
.travis.yml
128 lines (119 loc) · 10.6 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
language: scala
dist: xenial
jdk:
- openjdk11
before_install:
- sudo apt-get -qq -y install conntrack jq
git:
# disable git clone depth for dynamic versions from tags
depth: false
env:
global:
- CACHE_NAME=cloudstate-cache-01
# Docs deploy token; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate DEPLOY_DOCS_TOKEN=<cloudstate-bot.github.token>
- secure: "DCmB7Mq1Dl+/rDl46RVQplSoyC5nS1jkGf8OYoRG7lfc0fDj4ZPDSy6nEQX9BGUY0uJmmr77ojQWvnx0tHeXs6Ci4lHftJ7nmC1pttRmezbhjj5YRdYB7xfe1I2vT7qOhcv+qAHjAteXNxoLqqomp49ov2hzwsfesCbyKlJ3EtLyyWldUgOGad66VBgsVJjkXkarXngM1VEty/GINheSwNVaeF9aiX4eY/GksHKUNFn3N4vvubU9VlGHVjBAbPDXUp81L1rlkOHgSgKtehHy/FpcsHeStAoZMNNDCfnK0CKHCtKEJ8FhYKAwQR8WIEYU8cMjSYQVP0UQaC7mH//RwMECPEXZi8uB1mryIwfHu3l6AlIMh9tz9mgrZxSsX4Qba/v5IiM7hD4/IZCi83qCru1DPYBmd37LvUPWRB3m9tApxlDE+gspBFrqIc2u4524lLkWzu/gvsJam/VUDnrdmiJZblJi/XM+6FEo32o/aEiXi6l/cxDAu2kHJIO4MblSXvMu4hl69XTG/q9vc3rtkfVrzTtHJt2LWFNsHzN0odUH4FYmQz0bcqjBc6gI0elnM2gD+7EpxyAMNNBnAZ/oV7ktpfpmbc0/W7kw0t9f4kiYYR3ebO/efmuuIlFC1nJs2ouXVvuzP1GcMkq6lExpD4Fqulf1RXmDHcruj3Cr5a4="
# DockerHub password for cloudstatebot
- secure: "3YFGW7bUil+CFQSbgjCSMnFezWIGFdv6/eaNlKKhaxOueDoLmVrLqNhCXkS2Nz3f4tvPFzDN9VH3RyzEIG1u53nQvMw7vceV5szj4oyM4pGZ3TnugtEQFfRHJsUFAWFuRTr9etukBlxCo8HHT3FvcM5uKYQAmBt23wO/NuF8hFXDYQ6c6WHTvP6gzLP5lG70fVJ3ViA1QZEfOaEnOJNqknFtmGj8j0pQTE8oxXTSz61KDBzN3C9PtupDo2Xj0dtpurSZnGRt4BJYoBJkgBiQQJ0W/p5YWGHewdyV12/GgafhkyrPkSx02iOsq3yJrnX238xP/2QQCpMTtZ1lVMQsdXYmpX40hCoEXdxG1qlhH4ISNtXmck1J1VMRVg+sg8+PyFlRZObKcHtIWeGYOu8+T34zn0t+7VPswq0UY2xtPhetk9csNNtGQ7vTKKNFcFUdrROSEV/wmV/eudue473j5YZDDGEm43a04P81FsHVWxV9+uwuCiofMz3E1TcZJkySHYt3XnFhWGtdbJMHOkaYsrW++UA1wjWgn/EPcwNWpxiKJVoQmw3WYb0PH7ZXWaeQ/hqGpT+lhQzrNlP18us72c6kx7KW4aHgpWHEqsjceuSkoaAbCvxQxGbJqwDRyzOKdqTiVpapvd/wXAdatzcf1O+0n3C2lzLUbTpSkRx+s/8="
# Bintray username; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate BINTRAY_USER=<bintray.username>
- secure: "1VJczIq2S9/gKMJNBcjUm8JNhvrgTeIrdceKcMKy3JU5aEYQbpGA7kjiCOQJ93Qnsko+N/NPzfqfh1zxTIHM62hm4nL/EBmQ/tJbjYw9w7yTzGhRyvz+c7dByE3h4PsMuqziDioyN1gV8L7MZ8Zrk0Xzze+EoBDdLxNhenVS/yKmJ8QiZ8FeqMjl/xmMZnMWNdlU+zhQGZ2we2/FexLciVYAq+FrL0aigNPe55eEqwdU/+ZSxAtBSlGP4CJ6XOcLgf7yi11n/xubT88wpxXN5u97MwlE7bxu+t2NyxyKgSXOseqO7dV3mrGqmGm2xWkRRrhOxcrjBEzo5/q0HVwuFhUTw2GnOqj/0hQ5XlzZto8H5qFsjK2di0lJnMmAeYWGslj83/tu8uxaGIEYNegpYJN+koEWeAf6O1OdweCxVYTPCAKggI4NQeu/3+gbY0H8+2RGaN3S1SEhV1b4DEHBIO5VGqFLbQ//yP/W6AqUpuspIxhWSoEuIBDZqVEKf0eku974mQ8OmpoMubr1vB/I85qiFZOEt9xeWQQ+ui1Due1f1xIxKKhOAStvDH3JQNfxd35Dq1tZmcsrDB11y1Q785T/E0UHNvjvP1kQ39NaKUHiAcbFQxBF4XfcQ15MVKiuiGZlF4kvWI9oCRRu9i50KbnSRBaq2WQrT0p0UZCuBso="
# Bintray API key; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate BINTRAY_PASS=<bintray.apikey>
- secure: "chDdVAkjcTc1HjahcD2m00AgMseYXIDU7UVN5K0q/mPXGkXgOzpiFeu2vE5v0joGviD8hTZ7uLz2tfq91yaqzMeHnH32ZCdz4EGgwbKPriHfzy4Uk/wHWG9qMq+az2GhVryROxJrqqsKJkajcUauPaCmXfc1mljgq/rvTelyxNHYJFnza9B3t4KvB8Vg55e0Gsa/ysz60FEzZu3cReJGch7CcYBiBxh2zw8B5z5kaDTjeX0r681fi9rAKthJOm6An8YhZpfCmBUTa8CCpaoPAWiz5wXW5+C7ccrc769QQ4rrWu+C0pLzQYUyWxlxEUni8BGbfhMlTaHFkVhSV10yqVc+aS7vrWXirAJ1o9nG+yAiMBCHzGVEhgkRc8xJj2ONHEiGAjZU2653P+/oSApouuhLSIaPtE5Cw0ylBrUUiNx3K+E3Ej6UH6hpaRTURD6r8lJwmaXbMP85BlPSnqgqLYXaZX1kB+a6nTeiZgeQCY5k1YVLPLvJw9nBOSHc0t2Fea3lkLfuOb813GeIGmxoboPdtwhX8JCLCK4lX2si2qyNI4sJfeoxKt8jAcjuOl+LCC1PcU1ZU9C01FzUByVyZBG6nY2GFwGYXX6CrhRZtEpIm4tyRnlTeeTeMl4fK0E3RU9v3gRYj3pfJ40UZaT7th7hFHvV2fW+qQU4vuuXqW8="
# Sonatype user token username; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate SONA_USER=<sonatype.token.username>
- secure: "uzrFSzBPe+TnkRZlCnJ8r46FEgrxXBp9E2K3HfMg6HW+yUcYkv0z1Zf+QZHjD/ZKMd/XAg457IvOwxx1dPlIVgYjxpgGSkdiTimii/c7xkH0f8tg8PdZKqTw1WAO70ut3dtcH96HjtL0bsdKGtcDm60LbyPUKoXOQyfilUIUERmbpMx5cEbKauZdl6E+3wEz5bPD+MdWDWElFONCSJHpoOgl6Z6jAc1Z3VbXT932/WKBGwEedjPTgwtHkVa0FK4a0ehWQ41ZfXbQgyiF9LOiuuL+wFmOh9QTFixhvkLLtiD73ywkFRePEWul8IAFNClZEIGvc1SdsHhKVKPkDfgvI6RRtxjly62Y8VmnXFDe7Pi2UZwFNTYZkmBz0R+7zCb52NlUwUGNl6YwthmxInB1bU1BDJSwxnpAkZ85OEbyl92VXXtgFTxOhylzg976SQPR9qzT6Dl0gUmsq9VxiQaRYZNXarAWUVJlseEmq+RMMjYK35K+RlkC+J19u54F8ob5mbUSTsPhnnsHqZG61o9uVsfKBkK+k9MVwZqk/SF9eHAPiv6vW8DN4KS6gPQQSPuBxI4Ruj6RyYz9IGh05fT0NrbP0xJaqox4lrCCtZ72VsxXTp8qfI8NHE8CUpHM072YMHR5BR1bPbptMcqIkfnmYqWTyqWdczcJaYF07WYwS2w="
# Sonatype user token password; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate SONA_PASS=<sonatype.token.username>
- secure: "1+YZiGEGRfCcFqYqwJPwFk1TI15weQHbBxP9elnQa5gsc4a+YpdoyOA9y30BcoUPiB0xNpLwG449k5xUVKmpaNjU4iRlfvIGKF6tSEwuQ1BKyihNXgh9Iin+500BprRF7jXXaf96cJv45lEQRDv9Obsygtsv6VU0wbt/Ixc93PTf/Kk2DEetDxQuMN3abIC+tpFw5vtdIyE4UqC0FbmW/9MEO35Vdd9doxO5YCOvs3rDxw6GKs3x3Am88UD8FLhI6UnjGkSsii0rmXniNG18im5Gtyqr2vZXDrVaWYAf9dJd7j2TUJ0muVJZOhLlNc9RUP2dWs9zU0s0YAlxg6F8sdp4BEB1YpgWCWImRjgPjMTDS4FwcI5cjJ2FOOlU03VoeWxNhKKAK5kDTQ9+A+NA/a8sauBa5X4pituiXsuXb0aXC98EaL7UowtJu3UlKCIh7sbyFqItJbLGUxLB25TdOH146A5NMsc/ftXhutp4JV02ozy81oBI+o6Mv287vXqVdKWSATkwGdZmN01Lm+IITc3t6U7ZtiBXCL6iF3slPcAaI/Rj1Air4tAh252Nzi2uLpsj8Hyk9sPiDPPIhS3p6ccaPCYYI2+MuJ5acxd/gjqYQL18q54vJxjrfkJiLzQgFmaDAd84n1fNJ15rdb/Thh80l5pNt8WtMwrPuiTmKKM="
# Github release token; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate GITHUB_TOKEN=<cloudstate-bot.github.token>
- secure: "CO7MKtUWdsXRv0g798GZxa79vb4SwhD5+g9DlHPNLfMfXq17P34Ukdiz6vx04GjuIWA5s82ZTHXUkq/gr5CheS5SwTaji5D4Uy1IApYStCallHoXEuI+W6nXSe0fEnSyW9EfGyLou+4VM/pbuWH9FvEg+Lvci/nLiQq9g1I9aDFCxYYfr8ka+XxTOESb6Z9XHqoXpiNufgyQRYTPgvM5ImE0bdY21xSDR3IqsgtZZ40AQRgVyrZNIxNGPqkhVtGoSshquF/yXdk6A5Kuaw2m5HP7v9ohWnr8PGe6Y4t0X2cjTyowHnj0yqwD09xp/zBlMcWkoLY0ujNm7yooalTGCwySdKuB6QgLxZpXDshGHkVn+Z/pHW0//NrfsQpQcLEiG1XQ/8MlKTF1e1CuItGjO4WFDjOrQBvEQLxMhQXQY2po8VRUsZxRwBCf+A67PAkyI3cX1foH/JKa/plFxdNDEdmTZJUqk7huKrq9JQVUseH1zNSYX+HwDOAaugkwGIfm4YB+AIkWALUpka8fugc3FgVfLYAuLN6QYgMSi/vpqt6CBFrkTtZyuTr+seX8mqSPBrrlbjuQ8sInrHZgXVUXRNeDX8Sb2zk877Bn8CWw89XPred/SpJQ9Mvb0ke/Mu4kJ048wexjT2ken3gq6TYuCU3qcqScGhB13onTlQWAoqQ="
# NPM automation token; encrypted with: travis encrypt --pro -r cloudstateio/cloudstate NPM_TOKEN=<cloudstatebot.automation.token>
- secure: "uAqPWHAyVe9uUHTddHUjzoSnKc+1Da2x6M43uog9uHFFLgYbSP644vmxk0jPbx0A8elVApZ9Y3H32XmW4smCqyK67D/f16oCtb/N5paMDzCEzSvWih+E3Qvm8uEghVAkVjvJHZncCEuaAJ/68yuTPpcWyG3RucaSaXfxJ07SfjUJTeY2u0ltRHXQs2uMslgFPMjV1YpLBQThDBlTSsHrdfDjgJ5CLROMHYLlI4o/0wRfs/Yx61E92b0H8vORsMqK5NKU8WCNICtJIxwioqS8BzBR6PSP1dvEanSYYNJurh8opQN1oDhUxzX60okXB29Bvtmpq8n7rzUsmVzKrhOBQP6Y2l9fKoKv/xQBLiMnjZsr/wWkaFK9CJFqR9zqWmgp5MaOIZDnAqLEO+2RVyDfe8bXj0TVUW/ReFAU4owTkuXmswqOFY0R9ll/CTPHpQ7yysF+29vINsyYDg3hKFCZUu+6EHstr5sPGhcXdU68R5mhgkgdH7e1LUUAfbAzZgsygj6tLsXsD73kwSAlFDfzORpwp3udZkI1E7Ec5jIveCuRP0QN2nWsiLypBqWGpN9PBVdesFDvv4vKejnMggBMIiRongpKvSoK0t8hpNlhQMYRepMaVJoeVRKDcCwIjrIAosP0/8/8FYa/+yzPV/D4FnCGXauaQf0/g4fg2SidXRw="
services:
- docker
jobs:
include:
- stage: Format checks
name: "Code format check (address by running `sbt scalafmtAll scalafmtSbt`)"
script: sbt scalafmtCheckAll scalafmtSbtCheck || { echo "[error] Code not formatted prior to commit. Run 'sbt scalafmtAll scalafmtSbt' then commit the reformatted code."; false; }
- stage: Unit tests
name: npm tests
before_script:
- cd node-support && nvm install && nvm use && npm install && cd -
- cd samples/js-shopping-cart && nvm install && nvm use && npm install && cd -
- cd node-support/docs/src/modules/javascript/examples && nvm install && nvm use && npm install && cd -
script:
- cd node-support && npm test && cd -
- cd samples/js-shopping-cart && npm test && cd -
- cd node-support/docs/src/modules/javascript/examples && npm test && cd -
- name: sbt tests
before_script:
- sbt update
- docker pull google/cloud-sdk:latest
- docker run --rm --expose=8085 --volume=/data -m 140MB --name=googlepubsub -d -p 8085:8085 google/cloud-sdk:latest /bin/sh -c "gcloud beta emulators pubsub start --project=test --host-port=0.0.0.0:8085 --data-dir=/data"
- docker ps -a
script: sbt -jvm-opts travis/jvmopts 'set concurrentRestrictions in Global += Tags.limitAll(1)' test
after_script:
- docker stop googlepubsub
- name: docs validation
before_script:
- cd node-support && nvm install && nvm use && cd -
script:
- make -C docs
- make -C java-support/docs
- make -C node-support/docs
- stage: Integration tests
name: TCK
before_script:
- sbt update
- cd node-support && nvm install && nvm use && npm install && cd -
- cd node-support/tck && nvm install && nvm use && npm install && cd -
script:
- sbt 'set concurrentRestrictions in Global += Tags.limitAll(1)' tck/it:test
- stage: Deploy
name: Publish release
if: tag =~ ^v
script:
- echo "$DOCKER_PASSWORD" | docker login -u cloudstatebot --password-stdin
- sbt "set concurrentRestrictions in Global += Tags.limitAll(1)" "dockerBuildAllNonNative publish" operator/docker:publish tck/docker:publish
- sbt proxy/publish proxy/bintrayRelease proxy/bintraySyncMavenCentral
- sbt -Duse.native.builds=false operator/compileK8sDescriptors
- sbt protocols/package
- travis/upload-release-assets.sh
- make -C docs deploy
- stage: Deploy
name: Publish latest builds
if: branch = master AND type = push
script:
- echo "$DOCKER_PASSWORD" | docker login -u cloudstatebot --password-stdin
- sbt -Duse.native.builds=false -Ddocker.tag=latest "set concurrentRestrictions in Global += Tags.limitAll(1)" "dockerBuildAllNonNative publish" operator/docker:publish tck/docker:publish
- cd .devcontainer && ./build.sh push && cd -
- sbt java-support-tck/docker:publish
- stage: Deploy
name: Publish Java Support release
if: tag =~ ^java-support-
script:
- sbt java-support/publish java-support/bintrayRelease java-support/bintraySyncMavenCentral
- make -C java-support/docs deploy
- echo "$DOCKER_PASSWORD" | docker login -u cloudstatebot --password-stdin
- sbt java-support-tck/docker:publish
- stage: Deploy
name: Publish Node Support release
if: tag =~ ^node-support-
before_script:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> node-support/.npmrc
- cd node-support && nvm install && npm install && cd -
script:
- cd node-support && npm publish && cd -
- make -C node-support/docs deploy
cache:
directories:
- "$HOME/.ivy2/cache"
- "$HOME/.sbt"
- "$HOME/.npm"
- "$HOME/.cache/coursier"
before_cache:
- du -h -d 1 $HOME/.ivy2/
- du -h -d 2 $HOME/.sbt/
- du -h -d 4 $HOME/.cache/coursier/
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
- find $HOME/.cache/coursier -name "*.lock" -print -delete