| - job: | |
| name: gitiles-webapp-manual | |
| description: Builds gitiles manually from a specific commit | |
| wrappers: | |
| - timeout: | |
| timeout: 30 | |
| fail: true | |
| - timestamps | |
| - raw: | |
| xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/> | |
| properties: | |
| - build-discarder: | |
| days-to-keep: 20 | |
| artifact-days-to-keep: 20 | |
| parameters: | |
| - string: | |
| name: CHANGE_NUMBER | |
| description: "Legacy Change ID of patch to build" | |
| - string: | |
| name: CHANGE_REVISION | |
| default: '1' | |
| description: "Revision number of patch to build" | |
| - string: | |
| name: CHANGE_COMMIT | |
| description: "Optional SHA-1 hash of patch to build (takes precedence over Change ID)" | |
| properties: | |
| - authorization: | |
| anonymous: | |
| - job-discover | |
| - job-read | |
| - job-extended-read | |
| - inject: | |
| properties-file: env.properties | |
| script-content: | | |
| if [ "$CHANGE_COMMIT" ]; then | |
| echo "CHANGE_COMMIT=$CHANGE_COMMIT" > env.properties | |
| else | |
| CHANGE_NUMBER_SUFFIX=$(echo $CHANGE_NUMBER | grep -o '..$') | |
| echo "CHANGE_COMMIT=refs/remotes/origin/$CHANGE_NUMBER_SUFFIX/$CHANGE_NUMBER/$CHANGE_REVISION" > env.properties | |
| fi | |
| override-build-parameters: true | |
| scm: | |
| - git: | |
| url: https://gerrit.googlesource.com/gitiles | |
| refspec: +refs/changes/*:refs/remotes/origin/* | |
| branches: | |
| - '${CHANGE_COMMIT}' | |
| skip-tag: true | |
| builders: | |
| - shell: | | |
| set +x | |
| echo "Building gitiles from commit $CHANGE_COMMIT" | |
| echo '=============================================================' | |
| rm -Rf buck-out | |
| export BUCK_CLEAN_REPO_IF_DIRTY=y | |
| git submodule update --init | |
| buck build all | |
| buck test | |
| buck build //:install | |
| publishers: | |
| - archive: | |
| artifacts: 'buck-out/gen/all.zip' | |