Skip to content

Instantly share code, notes, and snippets.

@gbalint
Created December 6, 2017 14:54
Show Gist options
  • Save gbalint/6505cad14132f6bf57d6d1dc37e05ee1 to your computer and use it in GitHub Desktop.
Save gbalint/6505cad14132f6bf57d6d1dc37e05ee1 to your computer and use it in GitHub Desktop.
Swarm custom CI script using Travis API
body='{
"request": {
"message": "Test build from the api",
"branch":"master",
"config": {
"merge_mode": "merge",
"matrix": {
"include": [
{
"os": "linux",
"dist": "trusty",
"sudo": "required",
"go": "1.9.x",
"script": [
"sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install fuse",
"sudo modprobe fuse",
"sudo chmod 666 /dev/fuse",
"sudo chown root:$USER /etc/fuse.conf",
"go run build/ci.go install",
"go run build/ci.go test -coverage"
]
},
{
"os": "linux",
"dist": "trusty",
"sudo": "required",
"go": "1.9.x",
"env": [
"lint"
],
"script": [
"sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install fuse",
"sudo modprobe fuse",
"sudo chmod 666 /dev/fuse",
"sudo chown root:$USER /etc/fuse.conf",
"go run build/ci.go lint"
]
}
]
}
}
}
}'
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token XXXXXXXXX" \
-d "$body" \
https://api.travis-ci.org/repo/ethersphere%2Fgo-ethereum/requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment