зеркало из https://github.com/mozilla/DeepSpeech.git
53 строки
2.2 KiB
Plaintext
53 строки
2.2 KiB
Plaintext
$if: 'event.event in build.allowed'
|
|
then:
|
|
taskId: ${taskcluster.taskId}
|
|
provisionerId: ${taskcluster.docker.provisionerId}
|
|
workerType: ${taskcluster.docker.workerType}
|
|
taskGroupId: ${taskcluster.taskGroupId}
|
|
schedulerId: ${taskcluster.schedulerId}
|
|
created: { $fromNow: '0 sec' }
|
|
deadline: { $fromNow: '1 day' }
|
|
expires: { $fromNow: '6 months' }
|
|
scopes:
|
|
- "index:insert-task:project.deepspeech.*"
|
|
|
|
payload:
|
|
maxRunTime: { $eval: to_int(build.maxRunTime) }
|
|
image: ${build.docker_image}
|
|
|
|
features:
|
|
taskclusterProxy: true
|
|
|
|
command:
|
|
- "/bin/bash"
|
|
- "--login"
|
|
- "-cxe"
|
|
- $let:
|
|
extraSystemSetup: { $eval: strip(str(build.system_setup)) }
|
|
taskIndexExpire: { $fromNow: '6 months' }
|
|
in: >
|
|
(apt-get -qq -y remove --purge ubuntu-advantage-tools || true) &&
|
|
apt-get -qq update && apt-get -qq -y install curl git && ${extraSystemSetup};
|
|
cache_file=`curl -sSIL -o /dev/null -w "%{http_code}" ${build.cache.url}` &&
|
|
if [ "$cache_file" != "200" ]; then
|
|
${extraSystemSetup} &&
|
|
adduser --system --home ${system.homedir.linux} ${system.username} && cd ${system.homedir.linux}/ &&
|
|
mkdir -p /tmp/artifacts/ && chmod 777 /tmp/artifacts &&
|
|
echo -e "#!/bin/bash\nset -xe\n env && id && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha}" > /tmp/clone.sh && chmod +x /tmp/clone.sh &&
|
|
sudo -H -u ${system.username} /bin/bash /tmp/clone.sh &&
|
|
sudo -H -u ${system.username} --preserve-env /bin/bash ${system.homedir.linux}/DeepSpeech/ds/${build.scripts.build} &&
|
|
sudo -H -u ${system.username} --preserve-env /bin/bash ${system.homedir.linux}/DeepSpeech/ds/${build.scripts.package} ${taskIndexExpire} taskcluster ${build.cache.namespace}
|
|
fi;
|
|
|
|
artifacts:
|
|
"public":
|
|
type: "directory"
|
|
path: "/tmp/artifacts/"
|
|
expires: { $fromNow: '6 months' }
|
|
|
|
metadata:
|
|
name: ${build.metadata.name}
|
|
description: ${build.metadata.description}
|
|
owner: ${event.head.user.email}
|
|
source: ${event.head.repo.url}
|