| <?xml version='1.0' encoding='UTF-8'?> |
| <!-- |
| Copyright 2015 The Bazel Authors. All rights reserved. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <project> |
| <actions/> |
| <description>Do the Github release of a Bazel binary</description> |
| <keepDependencies>false</keepDependencies> |
| <properties> |
| <com.coravy.hudson.plugins.github.GithubProjectProperty> |
| <projectUrl>{{ variables.GITHUB_URL }}</projectUrl> |
| </com.coravy.hudson.plugins.github.GithubProjectProperty> |
| <hudson.model.ParametersDefinitionProperty> |
| <parameterDefinitions> |
| <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition> |
| <name>REF_SPEC</name> |
| <description></description> |
| <uuid>ca709303-ae93-4be2-b9b8-5ab0c19672d1</uuid> |
| <type>PT_BRANCH_TAG</type> |
| <branch></branch> |
| <tagFilter>*</tagFilter> |
| <sortMode>NONE</sortMode> |
| <defaultValue></defaultValue> |
| </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition> |
| </parameterDefinitions> |
| </hudson.model.ParametersDefinitionProperty> |
| </properties> |
| <scm class="hudson.plugins.git.GitSCM"> |
| <configVersion>2</configVersion> |
| <userRemoteConfigs> |
| <hudson.plugins.git.UserRemoteConfig> |
| <refspec>+refs/heads/*:refs/remotes/origin/* +refs/notes/*:refs/notes/*</refspec> |
| <url>{{ variables.GITHUB_URL }}</url> |
| </hudson.plugins.git.UserRemoteConfig> |
| </userRemoteConfigs> |
| <branches> |
| <hudson.plugins.git.BranchSpec> |
| <name>${REF_SPEC}</name> |
| </hudson.plugins.git.BranchSpec> |
| </branches> |
| <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> |
| <submoduleCfg class="list"/> |
| <extensions> |
| <hudson.plugins.git.extensions.impl.CleanBeforeCheckout/> |
| <hudson.plugins.git.extensions.impl.AuthorInChangelog/> |
| </extensions> |
| </scm> |
| <quietPeriod>5</quietPeriod> |
| <assignedNode>deploy</assignedNode> |
| <canRoam>false</canRoam> |
| <disabled>false</disabled> |
| <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
| <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
| <triggers/> |
| <concurrentBuild>false</concurrentBuild> |
| <builders> |
| <hudson.plugins.copyartifact.CopyArtifact> |
| <project>Bazel</project> |
| <filter>**/ci/*</filter> |
| <target>input</target> |
| <excludes>**/ci/bazel,**/*.bazel.build.tar,**/*.bazel.build.tar.nobuild,**/*-jdk7*</excludes> |
| <selector class="hudson.plugins.copyartifact.TriggeredBuildSelector"> |
| <fallbackToLastSuccessful>true</fallbackToLastSuccessful> |
| <upstreamFilterStrategy>UseGlobalSetting</upstreamFilterStrategy> |
| </selector> |
| <flatten>true</flatten> |
| <doNotFingerprintArtifacts>false</doNotFingerprintArtifacts> |
| </hudson.plugins.copyartifact.CopyArtifact> |
| <hudson.tasks.Shell> |
| <command>#!/bin/bash |
| |
| export GITHUB_TOKEN=$(cat $GITHUB_TOKEN_FILE) |
| export GCS_BUCKET=bazel |
| export APT_GPG_KEY_ID=$(cat "${APT_GPG_KEY_ID_FILE}") |
| |
| # URLs |
| export GIT_REPOSITORY_URL="{{ variables.GITHUB_URL }}" |
| |
| source scripts/ci/build.sh |
| |
| args=() |
| for i in input/*; do |
| args+=("$(echo $i | cut -d "=" -f 3)" "$i") |
| done |
| |
| bazel_release "${args[@]}" |
| |
| mkdir -p output/ci |
| if [[ ! $(get_release_name) =~ .*test.* ]]; then |
| echo "${RELEASE_EMAIL_RECIPIENT}" > output/ci/recipient |
| echo "${RELEASE_EMAIL_SUBJECT}" > output/ci/subject |
| echo "${RELEASE_EMAIL_CONTENT}" > output/ci/content |
| else |
| echo "Test release, skiping sending mail..." |
| fi |
| echo "To: ${RELEASE_EMAIL_RECIPIENT}" |
| echo "Subject: ${RELEASE_EMAIL_SUBJECT}" |
| echo "Content: ${RELEASE_EMAIL_CONTENT}"</command> |
| </hudson.tasks.Shell> |
| </builders> |
| <publishers> |
| <hudson.plugins.emailext.ExtendedEmailPublisher> |
| <recipientList>${FILE, path="output/ci/recipient"}</recipientList> |
| <configuredTriggers> |
| <hudson.plugins.emailext.plugins.trigger.SuccessTrigger> |
| <email> |
| <recipientList></recipientList> |
| <subject>$PROJECT_DEFAULT_SUBJECT</subject> |
| <body>$PROJECT_DEFAULT_CONTENT</body> |
| <recipientProviders> |
| <hudson.plugins.emailext.plugins.recipients.ListRecipientProvider/> |
| </recipientProviders> |
| <attachmentsPattern></attachmentsPattern> |
| <attachBuildLog>false</attachBuildLog> |
| <compressBuildLog>false</compressBuildLog> |
| <replyTo>$PROJECT_DEFAULT_REPLYTO</replyTo> |
| <contentType>project</contentType> |
| </email> |
| </hudson.plugins.emailext.plugins.trigger.SuccessTrigger> |
| </configuredTriggers> |
| <contentType>default</contentType> |
| <defaultSubject>${FILE, path="output/ci/subject"}</defaultSubject> |
| <defaultContent>${FILE, path="output/ci/content"}</defaultContent> |
| <attachmentsPattern></attachmentsPattern> |
| <presendScript></presendScript> |
| <attachBuildLog>false</attachBuildLog> |
| <compressBuildLog>false</compressBuildLog> |
| <replyTo>bazel-ci@googlegroups.com</replyTo> |
| <saveOutput>false</saveOutput> |
| <disabled>false</disabled> |
| </hudson.plugins.emailext.ExtendedEmailPublisher> |
| </publishers> |
| <buildWrappers> |
| <hudson.plugins.build__timeout.BuildTimeoutWrapper> |
| <strategy class="hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy"> |
| <timeoutMinutes>240</timeoutMinutes> |
| </strategy> |
| <operationList> |
| <hudson.plugins.build__timeout.operations.FailOperation/> |
| <hudson.plugins.build__timeout.operations.WriteDescriptionOperation> |
| <description>Timed out</description> |
| </hudson.plugins.build__timeout.operations.WriteDescriptionOperation> |
| </operationList> |
| </hudson.plugins.build__timeout.BuildTimeoutWrapper> |
| </buildWrappers> |
| </project> |