From e0277853b24d79554a8c60fa046c78132b17b538 Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Fri, 14 Feb 2020 10:34:00 +0100 Subject: [PATCH] Manually update the TC index when needed --- .taskcluster.yml | 1 + taskcluster/.shared.yml | 12 ++++--- taskcluster/android-arm64-cpu-opt.yml | 1 + taskcluster/android-armv7-cpu-opt.yml | 1 + taskcluster/android-x86_64-cpu-opt.yml | 1 + taskcluster/darwin-amd64-cpu-opt.yml | 1 + taskcluster/darwin-amd64-ctc-opt.yml | 1 + taskcluster/darwin-amd64-tflite-opt.yml | 1 + taskcluster/darwin-opt-base.tyml | 4 +-- taskcluster/linux-amd64-cpu-opt.yml | 1 + taskcluster/linux-amd64-ctc-opt.yml | 1 + taskcluster/linux-amd64-gpu-opt.yml | 1 + taskcluster/linux-amd64-tflite-opt.yml | 1 + taskcluster/linux-arm64-cpu-opt.yml | 1 + taskcluster/linux-opt-base.tyml | 2 +- taskcluster/linux-rpi3-cpu-opt.yml | 1 + taskcluster/node-gyp-cache-base.tyml | 18 ++++++---- taskcluster/node-gyp-cache.yml | 2 -- taskcluster/swig-darwin-opt-base.tyml | 45 ++++++++++++++----------- taskcluster/swig-linux-opt-base.tyml | 17 ++++++---- taskcluster/win-opt-base.tyml | 2 +- 21 files changed, 72 insertions(+), 43 deletions(-) diff --git a/.taskcluster.yml b/.taskcluster.yml index 265c44fb..0181831a 100644 --- a/.taskcluster.yml +++ b/.taskcluster.yml @@ -27,6 +27,7 @@ tasks: scopes: [ "queue:create-task:highest:proj-deepspeech/*", "queue:route:index.project.deepspeech.*", + "index:insert-task:project.deepspeech.*", "queue:route:notify.irc-channel.*", "queue:scheduler-id:taskcluster-github", "generic-worker:cache:deepspeech-homebrew-bin", diff --git a/taskcluster/.shared.yml b/taskcluster/.shared.yml index ac9a4db8..f305424b 100644 --- a/taskcluster/.shared.yml +++ b/taskcluster/.shared.yml @@ -59,14 +59,16 @@ cpp: packages: 'install_pkg_local_homebrew "sox"' env: 'export EXTRA_ENV="DYLD_LIBRARY_PATH=$LOCAL_HOMEBREW_DIRECTORY/lib/:$DYLD_LIBRARY_PATH"' system: - node_gyp_cache: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.node-gyp-cache.0/artifacts/public/node-gyp-cache.tar.gz' + node_gyp_cache: + url: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.node-gyp-cache.1/artifacts/public/node-gyp-cache.tar.gz' + namespace: 'project.deepspeech.node-gyp-cache.1' swig: repo: "https://github.com/lissyx/swig" - sha1: "04baa423c41008712e811cd5c1ee94e9e90894aa" + sha1: "b5fea54d39832d1d132d7dd921b69c0c2c9d5118" cache: - linux_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.linux.amd64.04baa423c41008712e811cd5c1ee94e9e90894aa/artifacts/public/ds-swig.tar.gz' - darwin_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.darwin.amd64.04baa423c41008712e811cd5c1ee94e9e90894aa/artifacts/public/ds-swig.tar.gz' - win_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.win.amd64.04baa423c41008712e811cd5c1ee94e9e90894aa/artifacts/public/ds-swig.tar.gz' + linux_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.linux.amd64.b5fea54d39832d1d132d7dd921b69c0c2c9d5118/artifacts/public/ds-swig.tar.gz' + darwin_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.darwin.amd64.b5fea54d39832d1d132d7dd921b69c0c2c9d5118/artifacts/public/ds-swig.tar.gz' + win_amd64: 'https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.win.amd64.b5fea54d39832d1d132d7dd921b69c0c2c9d5118/artifacts/public/ds-swig.tar.gz' username: 'build-user' homedir: linux: '/home/build-user' diff --git a/taskcluster/android-arm64-cpu-opt.yml b/taskcluster/android-arm64-cpu-opt.yml index 0c848506..4203ed0b 100644 --- a/taskcluster/android-arm64-cpu-opt.yml +++ b/taskcluster/android-arm64-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.android-arm64" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.android-arm64" diff --git a/taskcluster/android-armv7-cpu-opt.yml b/taskcluster/android-armv7-cpu-opt.yml index 87acb567..eee9f6c7 100644 --- a/taskcluster/android-armv7-cpu-opt.yml +++ b/taskcluster/android-armv7-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.android-armv7" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.android-armv7" diff --git a/taskcluster/android-x86_64-cpu-opt.yml b/taskcluster/android-x86_64-cpu-opt.yml index 0b36a872..5415d5df 100644 --- a/taskcluster/android-x86_64-cpu-opt.yml +++ b/taskcluster/android-x86_64-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.android-x86_64" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.android-x86_64" diff --git a/taskcluster/darwin-amd64-cpu-opt.yml b/taskcluster/darwin-amd64-cpu-opt.yml index 7155e666..f1167bb4 100644 --- a/taskcluster/darwin-amd64-cpu-opt.yml +++ b/taskcluster/darwin-amd64-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: darwin-opt-base.tyml dependencies: - "swig-darwin-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.osx" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.osx" diff --git a/taskcluster/darwin-amd64-ctc-opt.yml b/taskcluster/darwin-amd64-ctc-opt.yml index 51d07c49..41f20a30 100644 --- a/taskcluster/darwin-amd64-ctc-opt.yml +++ b/taskcluster/darwin-amd64-ctc-opt.yml @@ -2,6 +2,7 @@ build: template_file: darwin-opt-base.tyml dependencies: - "swig-darwin-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.osx-ctc" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.osx-ctc" diff --git a/taskcluster/darwin-amd64-tflite-opt.yml b/taskcluster/darwin-amd64-tflite-opt.yml index 2bfc145d..72aaccab 100644 --- a/taskcluster/darwin-amd64-tflite-opt.yml +++ b/taskcluster/darwin-amd64-tflite-opt.yml @@ -2,6 +2,7 @@ build: template_file: darwin-opt-base.tyml dependencies: - "swig-darwin-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.osx-tflite" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.osx-tflite" diff --git a/taskcluster/darwin-opt-base.tyml b/taskcluster/darwin-opt-base.tyml index 31340321..7ebb1bb1 100644 --- a/taskcluster/darwin-opt-base.tyml +++ b/taskcluster/darwin-opt-base.tyml @@ -125,7 +125,7 @@ payload: - directory: ${system.homedir.osx}/Library/Caches/node-gyp/ format: tar.gz content: - url: ${system.node_gyp_cache} + url: ${system.node_gyp_cache.url} - directory: ds-swig format: tar.gz content: @@ -134,7 +134,7 @@ payload: - directory: ${system.homedir.osx}/Library/Caches/node-gyp/ format: tar.gz content: - url: ${system.node_gyp_cache} + url: ${system.node_gyp_cache.url} - directory: ds-swig format: tar.gz content: diff --git a/taskcluster/linux-amd64-cpu-opt.yml b/taskcluster/linux-amd64-cpu-opt.yml index 254acf92..f855775e 100644 --- a/taskcluster/linux-amd64-cpu-opt.yml +++ b/taskcluster/linux-amd64-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.cpu" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.cpu" diff --git a/taskcluster/linux-amd64-ctc-opt.yml b/taskcluster/linux-amd64-ctc-opt.yml index ed84addb..e30d2dd8 100644 --- a/taskcluster/linux-amd64-ctc-opt.yml +++ b/taskcluster/linux-amd64-ctc-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.cpu-ctc" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.cpu-ctc" diff --git a/taskcluster/linux-amd64-gpu-opt.yml b/taskcluster/linux-amd64-gpu-opt.yml index 87a00e39..a4541656 100644 --- a/taskcluster/linux-amd64-gpu-opt.yml +++ b/taskcluster/linux-amd64-gpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.gpu" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.gpu" diff --git a/taskcluster/linux-amd64-tflite-opt.yml b/taskcluster/linux-amd64-tflite-opt.yml index dcfa30bd..f2fd6265 100644 --- a/taskcluster/linux-amd64-tflite-opt.yml +++ b/taskcluster/linux-amd64-tflite-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.tflite" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.tflite" diff --git a/taskcluster/linux-arm64-cpu-opt.yml b/taskcluster/linux-arm64-cpu-opt.yml index 5afd609e..3faa61ac 100644 --- a/taskcluster/linux-arm64-cpu-opt.yml +++ b/taskcluster/linux-arm64-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.arm64" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.arm64" diff --git a/taskcluster/linux-opt-base.tyml b/taskcluster/linux-opt-base.tyml index 0cb510e5..edebf5fc 100644 --- a/taskcluster/linux-opt-base.tyml +++ b/taskcluster/linux-opt-base.tyml @@ -48,7 +48,7 @@ then: adduser --system --home ${system.homedir.linux} ${system.username} && apt-get -qq update && apt-get -qq -y install git pixz wget pkg-config libsox-dev && ${extraSystemSetup} && cd ${system.homedir.linux}/ && - echo -e "#!/bin/bash\nset -xe\n env && id && (wget -O - $TENSORFLOW_BUILD_ARTIFACT | pixz -d | tar -C ${system.homedir.linux}/ -xf - ) && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && ln -s ~/DeepSpeech/ds/native_client/ ~/DeepSpeech/tf/native_client && mkdir -p ${system.homedir.linux}/.cache/node-gyp/ && wget -O - ${system.node_gyp_cache} | tar -C ${system.homedir.linux}/.cache/node-gyp/ -xzf - && mkdir -p ${system.homedir.linux}/ds-swig/bin/ && wget -O - ${system.swig.cache.linux_amd64} | tar -C ${system.homedir.linux}/ds-swig/ -xzf -" > /tmp/clone.sh && chmod +x /tmp/clone.sh && + echo -e "#!/bin/bash\nset -xe\n env && id && (wget -O - $TENSORFLOW_BUILD_ARTIFACT | pixz -d | tar -C ${system.homedir.linux}/ -xf - ) && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && ln -s ~/DeepSpeech/ds/native_client/ ~/DeepSpeech/tf/native_client && mkdir -p ${system.homedir.linux}/.cache/node-gyp/ && wget -O - ${system.node_gyp_cache.url} | tar -C ${system.homedir.linux}/.cache/node-gyp/ -xzf - && mkdir -p ${system.homedir.linux}/ds-swig/bin/ && wget -O - ${system.swig.cache.linux_amd64} | tar -C ${system.homedir.linux}/ds-swig/ -xzf -" > /tmp/clone.sh && chmod +x /tmp/clone.sh && sudo -H -u ${system.username} /bin/bash /tmp/clone.sh && ${system.homedir.linux}/DeepSpeech/tf/tc-apt.sh && ${extraSystemConfig} && sudo -H -u ${system.username} --preserve-env /bin/bash ${system.homedir.linux}/DeepSpeech/ds/${build.scripts.build} && diff --git a/taskcluster/linux-rpi3-cpu-opt.yml b/taskcluster/linux-rpi3-cpu-opt.yml index c6487c2b..9f69f26e 100644 --- a/taskcluster/linux-rpi3-cpu-opt.yml +++ b/taskcluster/linux-rpi3-cpu-opt.yml @@ -2,6 +2,7 @@ build: template_file: linux-opt-base.tyml dependencies: - "swig-linux-amd64" + - "node-gyp-cache" routes: - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.arm" - "index.project.deepspeech.deepspeech.native_client.${event.head.branchortag}.${event.head.sha}.arm" diff --git a/taskcluster/node-gyp-cache-base.tyml b/taskcluster/node-gyp-cache-base.tyml index e4c3d05c..5c0e895d 100644 --- a/taskcluster/node-gyp-cache-base.tyml +++ b/taskcluster/node-gyp-cache-base.tyml @@ -8,12 +8,16 @@ then: created: { $fromNow: '0 sec' } deadline: { $fromNow: '1 day' } expires: { $fromNow: '6 months' } - routes: { $eval: build.routes } + scopes: + - "index:insert-task:project.deepspeech.*" payload: maxRunTime: { $eval: to_int(build.maxRunTime) } image: "node:12" + features: + taskclusterProxy: true + # This task will inspect system.node_gyp_cache taskcluster index existence: # - if the artifact does not exists, it will build it # - if the artifact exists, it will re-mirror it (if we don't do that, new @@ -24,18 +28,20 @@ then: - "-cxe" - $let: extraSystemSetup: { $eval: strip(str(build.system_setup)) } - extraSystemConfig: { $eval: strip(str(build.system_config)) } + taskIndexExpire: { $fromNow: '6 months' } in: > apt-get -qq update && apt-get -qq -y install curl git && ${extraSystemSetup}; - cache_file=`curl -sSIL -o /dev/null -w "%{http_code}" ${system.node_gyp_cache}` && + cache_file=`curl -sSIL -o /dev/null -w "%{http_code}" ${system.node_gyp_cache.url}` && if [ "$cache_file" != "200" ]; then mkdir -p ~/DeepSpeech/ds/ && git clone --quiet ${event.head.repo.url} ~/DeepSpeech/ds/ && cd ~/DeepSpeech/ds && git checkout --quiet ${event.head.sha} && ~/DeepSpeech/ds/${build.scripts.build} && - ~/DeepSpeech/ds/${build.scripts.package} - else - mkdir -p /tmp/artifacts/ && curl -sSL -o /tmp/artifacts/node-gyp-cache.tar.gz ${system.node_gyp_cache} + ~/DeepSpeech/ds/${build.scripts.package} && + curl -sSL --fail -X PUT \ + -H "Content-Type: application/json" \ + -d "{\"taskId\":\"$TASK_ID\",\"rank\":0,\"expires\":\"${taskIndexExpire}\",\"data\":{}}" \ + "http://taskcluster/index/v1/task/${system.node_gyp_cache.namespace}" fi; artifacts: diff --git a/taskcluster/node-gyp-cache.yml b/taskcluster/node-gyp-cache.yml index fd314704..a9be39de 100644 --- a/taskcluster/node-gyp-cache.yml +++ b/taskcluster/node-gyp-cache.yml @@ -1,7 +1,5 @@ build: template_file: node-gyp-cache-base.tyml - routes: - - "index.project.deepspeech.node-gyp-cache.0" scripts: build: "taskcluster/node-gyp-populate.sh" package: "taskcluster/node-gyp-package.sh" diff --git a/taskcluster/swig-darwin-opt-base.tyml b/taskcluster/swig-darwin-opt-base.tyml index 881973ed..0f08e596 100644 --- a/taskcluster/swig-darwin-opt-base.tyml +++ b/taskcluster/swig-darwin-opt-base.tyml @@ -10,8 +10,8 @@ dependencies: created: { $fromNow: '0 sec' } deadline: { $fromNow: '1 day' } expires: { $fromNow: '6 months' } -routes: - - "index.project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}" +scopes: + - "index:insert-task:project.deepspeech.*" payload: maxRunTime: { $eval: to_int(build.maxRunTime) } @@ -20,24 +20,29 @@ payload: - - "/bin/bash" - "--login" - "-cxe" - - > - export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" && - export TASKCLUSTER_TASKDIR="$(pwd)" && - export TASKCLUSTER_ORIG_TASKDIR="$(pwd)" && - export LC_ALL=C && - export MACOSX_DEPLOYMENT_TARGET=10.10 && - export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/ && - export HOMEBREW_NO_AUTO_UPDATE=1 && - env && - swig_bin=`curl -sSIL -o /dev/null -w "%{http_code}" https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}/artifacts/public/ds-swig.tar.gz` && - if [ "$swig_bin" != "200" ]; then - git clone --quiet ${system.swig.repo} $TASKCLUSTER_TASKDIR/swig/ && - cd $TASKCLUSTER_TASKDIR/swig/ && git checkout --quiet ${system.swig.sha1} && - $TASKCLUSTER_TASKDIR/swig/${build.scripts.build} && - $TASKCLUSTER_TASKDIR/swig/${build.scripts.package} - else - mkdir -p $TASKCLUSTER_ARTIFACTS/ && curl -sSL -o $TASKCLUSTER_ARTIFACTS/ds-swig.tar.gz https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}/artifacts/public/ds-swig.tar.gz - fi; + - $let: + taskIndexExpire: { $fromNow: '6 months' } + in: > + export TASKCLUSTER_ARTIFACTS="$(pwd)/public/" && + export TASKCLUSTER_TASKDIR="$(pwd)" && + export TASKCLUSTER_ORIG_TASKDIR="$(pwd)" && + export LC_ALL=C && + export MACOSX_DEPLOYMENT_TARGET=10.10 && + export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/ && + export HOMEBREW_NO_AUTO_UPDATE=1 && + env && + mkdir -p $TASKCLUSTER_ARTIFACTS/ && + swig_bin=`curl -sSIL -o /dev/null -w "%{http_code}" https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}/artifacts/public/ds-swig.tar.gz` && + if [ "$swig_bin" != "200" ]; then + git clone --quiet ${system.swig.repo} $TASKCLUSTER_TASKDIR/swig/ && + cd $TASKCLUSTER_TASKDIR/swig/ && git checkout --quiet ${system.swig.sha1} && + $TASKCLUSTER_TASKDIR/swig/${build.scripts.build} && + $TASKCLUSTER_TASKDIR/swig/${build.scripts.package} && + curl -sSL --fail -X PUT \ + -H "Content-Type: application/json" \ + -d "{\"taskId\":\"$TASK_ID\",\"rank\":0,\"expires\":\"${taskIndexExpire}\",\"data\":{}}" \ + "http://taskcluster/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}" + fi; artifacts: - type: "directory" diff --git a/taskcluster/swig-linux-opt-base.tyml b/taskcluster/swig-linux-opt-base.tyml index cfcab415..fb3662e4 100644 --- a/taskcluster/swig-linux-opt-base.tyml +++ b/taskcluster/swig-linux-opt-base.tyml @@ -8,20 +8,23 @@ then: created: { $fromNow: '0 sec' } deadline: { $fromNow: '1 day' } expires: { $fromNow: '6 months' } - routes: - - "index.project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}" + 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)) } - extraSystemConfig: { $eval: strip(str(build.system_config)) } + 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}; @@ -31,9 +34,11 @@ then: echo -e "#!/bin/bash\nset -xe\n env && id && (git clone --quiet ${system.swig.repo} ~/swig/ && cd ~/swig/ && git checkout --quiet ${system.swig.sha1})" > /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}/swig/${build.scripts.build} && - sudo -H -u ${system.username} /bin/bash ${system.homedir.linux}/swig/${build.scripts.package} - else - mkdir -p /tmp/artifacts/ && curl -sSL -o /tmp/artifacts/ds-swig.tar.gz https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}/artifacts/public/ds-swig.tar.gz + sudo -H -u ${system.username} /bin/bash ${system.homedir.linux}/swig/${build.scripts.package} && + curl -sSL --fail -X PUT \ + -H "Content-Type: application/json" \ + -d "{\"taskId\":\"$TASK_ID\",\"rank\":0,\"expires\":\"${taskIndexExpire}\",\"data\":{}}" \ + "http://taskcluster/index/v1/task/project.deepspeech.swig.${build.swig_system}.${build.swig_arch}.${system.swig.sha1}" fi; artifacts: diff --git a/taskcluster/win-opt-base.tyml b/taskcluster/win-opt-base.tyml index 18ac231f..ab4076c5 100644 --- a/taskcluster/win-opt-base.tyml +++ b/taskcluster/win-opt-base.tyml @@ -37,7 +37,7 @@ payload: - directory: .node-gyp format: tar.gz content: - url: ${system.node_gyp_cache} + url: ${system.node_gyp_cache.url} - directory: ds-swig format: tar.gz content: