File tree 2 files changed +32
-6
lines changed
2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,25 @@ script: ./gradlew -Pversion=$TRAVIS_TAG -PgwtCompilerWorkers=1 downloadUrlDepend
64
64
# Conditionally tag git and build docker image.
65
65
after_success : " ./travis.after_success.sh"
66
66
67
+ # Deploy the swagger-ui content and swagger specs to gh-pages
67
68
# Push to GitHub releases for any tagged commit - the key was generated by the Travis CLI.
68
69
deploy :
69
- provider : releases
70
- api_key :
71
- secure : xUPJboaSjxs3lKCqXu5zYzdV75S+lu5EZ6RD+RigmQ5MSjeuFBhoBKYaJUz+ejaoFLfF8WSUbmlgTeRMK7QI4MtCqjy08uREext8sm0behMREz4mmPEb9eTLu+WfIXFbnOPG4pKzkAtHA3x+hNQN3EWga1Xa2WXGYdOuK1B7vnrYOPo9D2zI12JCaoXt0KUQ70LwE07uwBIuDn+0EbVsAftFatJh7jZXeMsE8GmdcwsM/DObKjtTLBH3bpE8pPPJ8H0ssuIsQk2jHg91cTgrlB0q0K1a5TjeKKMGPMY6S6UR9cB7l7FqCVEsOd7T/ExdKp1TflMRyuuKG9ACBXTaegfBt7pP7KYEpYtidC5p/b1J4cYvazVTIfo6m93wnOJAdcD1XeMqNIQZVSxNuflmgM8xZz+UuqPBF4dk3Z5Eoh4sTH+t6WmZY6YoIt6tRMQ8xRyvkTfzsfYUtsV4csyeB2oy5s/GJmYGtR5GjjK6T+mh8RmI/DVWW50ubdFaAYYdz+LSgfpGhBXEBkYPghMSjYiPDsJStXsOwRSQbR9LmRO7jk08PxxT33pLr8Ct0HoQPpSP8Fom4q1ntrZBDjeHL8/2cQtRKqUg3X9G0sU7aW5i0G4U7BE42Xkcc/VVJhFrVbRj5+xQq70uMyUmHi2Wh+mBQSY+ZlBrvr6FRcKj42E=
72
- file : stroom-app/build/libs/stroom-app-all.jar
73
- skip_cleanup : true
74
- on :
70
+ - provider : pages
71
+ skip_cleanup : true
72
+ github_token : $GITHUB_TOKEN
73
+ local_dir : gh-pages
74
+ target_branch : gh-pages
75
+ on :
76
+ branch : master
77
+ - provider : releases
78
+ api_key :
79
+ secure : xUPJboaSjxs3lKCqXu5zYzdV75S+lu5EZ6RD+RigmQ5MSjeuFBhoBKYaJUz+ejaoFLfF8WSUbmlgTeRMK7QI4MtCqjy08uREext8sm0behMREz4mmPEb9eTLu+WfIXFbnOPG4pKzkAtHA3x+hNQN3EWga1Xa2WXGYdOuK1B7vnrYOPo9D2zI12JCaoXt0KUQ70LwE07uwBIuDn+0EbVsAftFatJh7jZXeMsE8GmdcwsM/DObKjtTLBH3bpE8pPPJ8H0ssuIsQk2jHg91cTgrlB0q0K1a5TjeKKMGPMY6S6UR9cB7l7FqCVEsOd7T/ExdKp1TflMRyuuKG9ACBXTaegfBt7pP7KYEpYtidC5p/b1J4cYvazVTIfo6m93wnOJAdcD1XeMqNIQZVSxNuflmgM8xZz+UuqPBF4dk3Z5Eoh4sTH+t6WmZY6YoIt6tRMQ8xRyvkTfzsfYUtsV4csyeB2oy5s/GJmYGtR5GjjK6T+mh8RmI/DVWW50ubdFaAYYdz+LSgfpGhBXEBkYPghMSjYiPDsJStXsOwRSQbR9LmRO7jk08PxxT33pLr8Ct0HoQPpSP8Fom4q1ntrZBDjeHL8/2cQtRKqUg3X9G0sU7aW5i0G4U7BE42Xkcc/VVJhFrVbRj5+xQq70uMyUmHi2Wh+mBQSY+ZlBrvr6FRcKj42E=
80
+ file :
81
+ - stroom-app/build/libs/stroom-app-all.jar
82
+ - stroom-app/build/swagger/swagger.json
83
+ - stroom-app/build/swagger/swagger.yaml
84
+ skip_cleanup : true
85
+ on :
75
86
tags : true
76
87
77
88
# clean out gradle caches as per travis docs
Original file line number Diff line number Diff line change @@ -56,4 +56,19 @@ if [ "$doDockerBuild" = true ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] ; then
56
56
docker push gchq/stroom
57
57
fi
58
58
59
+ # Deploy the generated swagger specs and swagger UI (obtained from github) to gh-pages
60
+ if [ " $TRAVIS_BRANCH " = " master" ]; then
61
+ ghPagesDir=$TRAVIS_BUILD_DIR /gh-pages
62
+ swaggerUiCloneDir=$TRAVIS_BUILD_DIR /swagger-ui
63
+ mkdir -p $ghPagesDir
64
+ # copy our generated swagger specs to gh-pages
65
+ cp $TRAVIS_BUILD_DIR /stroom-app/build/swagger/swagger.* $ghPagesDir /
66
+ # clone swagger-ui repo so we can get the ui html/js/etc
67
+ git clone --depth 1 https://github.com/swagger-api/swagger-ui.git $swaggerUiCloneDir
68
+ # copy the bits of swagger-ui that we need
69
+ cp -r $swaggerUiCloneDir /dist/* $ghPagesDir /
70
+ # repalce the default swagger spec url in swagger UI
71
+ sed -i ' s#url: ".*"#url: "https://gchq.github.io/stroom/swagger.json"#g' $ghPagesDir /index.html
72
+ fi
73
+
59
74
You can’t perform that action at this time.
0 commit comments