Permalink
Browse files

Using Travis to manage builds

  • Loading branch information...
1 parent cb98c9f commit 663dbc85084620ce2ede640f08e81a20e6167271 @kaihendry kaihendry committed Nov 6, 2016
Showing with 28 additions and 0 deletions.
  1. +28 −0 .travis.yml
View
@@ -0,0 +1,28 @@
+sudo: required
+language: generic
+services:
+- docker
+before_install:
+- pip install --user awscli
+- export PATH=$PATH:$HOME/.local/bin
+- docker pull webc/isobuilder
+- isobuildersha256=$(docker inspect --format='{{.RepoDigests}}' webc/isobuilder | grep -o sha256:....... | sed 's,sha256:,,')
+- docker run --name webc -it -v $TRAVIS_BUILD_DIR:/root/Debian-Live-config/webconverger/chroot
+ webc/isobuilder make
+- docker cp webc:/root/Debian-Live-config/webconverger/live-image-i386.hybrid.iso
+ ${TRAVIS_COMMIT::7}.iso
+- sha1=($(sha1sum ${TRAVIS_COMMIT::7}.iso))
+- echo ISO SHA1 ${sha1}
+- export key="$(date --rfc-3339=date)/${isobuildersha256}-${TRAVIS_COMMIT::7}/${sha1}.iso"
+- aws s3 cp --storage-class REDUCED_REDUNDANCY --acl public-read --metadata "travis_build_id=${TRAVIS_BUILD_ID}" ${TRAVIS_COMMIT::7}.iso
+ s3://build.webconverger.com/$key
+- touch index.html
+- aws s3 cp --acl public-read --storage-class REDUCED_REDUNDANCY index.html s3://build.webconverger.com/latest.iso
+ --website-redirect="https://build.webconverger.com/$key"
+- aws s3api list-objects --bucket build.webconverger.com --output json --prefix "20" | jq -r '.Contents | sort_by(.LastModified) | reverse | .[] | .Key + " " + ((.Size / 1000000000)|tostring)' | while read -r key size; do buildid=$(aws s3api head-object --bucket build.webconverger.com --key "$key" | jq -r .Metadata.travis_build_id);printf "<li><a href=https://travis-ci.org/Webconverger/webc/builds/%s>TravisCI</a> <a href=/%s>%s %.2f GB</a></li>\n" "$buildid" "$key" "$key" "$size"; done > index.html
+- aws s3 cp --acl public-read --storage-class REDUCED_REDUNDANCY index.html s3://build.webconverger.com/index.html
+
+env:
+ global:
+ - secure: dpGJ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