diff --git a/.cron.yml b/.cron.yml deleted file mode 100644 index 152b128..0000000 --- a/.cron.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Definitions for jobs that run periodically. For details on the format, see -# `taskcluster/taskgraph/cron/schema.py`. For documentation, see -# `taskcluster/docs/cron.rst`. - ---- - -jobs: [] diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml deleted file mode 100644 index 687216e..0000000 --- a/taskcluster/ci/build/kind.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- -loader: taskgraph.loader.transform:loader - -transforms: - - xpi_taskgraph.build:transforms - - xpi_taskgraph.cached:transforms - - taskgraph.transforms.cached_tasks:transforms - - taskgraph.transforms.job:transforms - - taskgraph.transforms.task:transforms - -task-defaults: - description: Build XPI from source code. - worker-type: b-linux - worker: - max-run-time: 7200 - docker-image: - indexed: xpi.cache.level-3.docker-images.v2.node-16.latest - chain-of-trust: true - volumes: - - /builds/worker/checkouts - - /builds/worker/.cache - run: - checkout: - xpi: {} - use-caches: false - -tasks: - ci: - attributes: - code-review: true - run: - using: run-task - cwd: '{checkout}' - cache-dotcache: false - command: >- - python3 /usr/local/bin/build.py diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml deleted file mode 100644 index c04490a..0000000 --- a/taskcluster/ci/config.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -trust-domain: xpi - -task-priority: lowest - -taskgraph: - register: xpi_taskgraph:register - decision-parameters: 'xpi_taskgraph.parameters:get_decision_parameters' - repositories: - xpi: - name: "XPI source" - project-regex: '(?!xpi-template)' - template: - name: "XPI template" - project-regex: 'xpi-template' - default-repository: https://github.com/mozilla-extensions/xpi-template - default-ref: master - type: git - -workers: - aliases: - b-linux: - provisioner: xpi-{level} - implementation: docker-worker - os: linux - worker-type: 'b-linux-gcp' - dep-signing: - provisioner: scriptworker-k8s - implementation: scriptworker-signing - os: scriptworker - worker-type: xpi-t-signing - -scriptworker: - scope-prefix: project:xpi:releng diff --git a/taskcluster/ci/dep-signing/kind.yml b/taskcluster/ci/dep-signing/kind.yml deleted file mode 100644 index 670fabd..0000000 --- a/taskcluster/ci/dep-signing/kind.yml +++ /dev/null @@ -1,21 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- - -loader: xpi_taskgraph.single_dep:loader - -kind-dependencies: - - build - -transforms: - - xpi_taskgraph.signing:transforms - - taskgraph.transforms.task:transforms - -task-template: - description: Development-sign XPI - worker-type: dep-signing - worker: - signing-type: dep-signing - max-run-time: 3600 - run-on-tasks-for: ['github-pull-request', 'github-push'] diff --git a/taskcluster/ci/linter/kind.yml b/taskcluster/ci/linter/kind.yml deleted file mode 100644 index caee001..0000000 --- a/taskcluster/ci/linter/kind.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- - -loader: xpi_taskgraph.single_dep:loader - -kind-dependencies: - - build - -transforms: - - xpi_taskgraph.linter:transforms - - taskgraph.transforms.job:transforms - - taskgraph.transforms.task:transforms - -task-template: - description: Run addons-linter - worker-type: b-linux - worker: - max-run-time: 7200 - docker-image: - indexed: xpi.cache.level-3.docker-images.v2.node-16.latest - volumes: - - /builds/worker/checkouts - run: - using: run-task - cache-dotcache: false - checkout: - xpi: {} - use-caches: false - cwd: '{checkout}' - # TODO: We should enable MV3 when we are ready to accept MV3 add-ons. - # This should be done by replacing `2` with `3` in the command below. - command: >- - curl -sSL --fail --retry 3 -o {xpi_file} "$XPI_URL" && - npx -y addons-linter --privileged --boring --disable-xpi-autoclose --max-manifest-version=2 {xpi_file} - - attributes: - code-review: true diff --git a/taskcluster/ci/pr/kind.yml b/taskcluster/ci/pr/kind.yml deleted file mode 100644 index f8cefe4..0000000 --- a/taskcluster/ci/pr/kind.yml +++ /dev/null @@ -1,20 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- -loader: taskgraph.loader.transform:loader - -kind-dependencies: - - build - - test - - linter - -transforms: - - taskgraph.transforms.code_review:transforms - - taskgraph.transforms.task:transforms - -tasks: - complete: - description: PR Summary Task - run-on-tasks-for: [github-pull-request] - worker-type: succeed diff --git a/taskcluster/ci/test/kind.yml b/taskcluster/ci/test/kind.yml deleted file mode 100644 index f5de938..0000000 --- a/taskcluster/ci/test/kind.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. ---- -loader: taskgraph.loader.transform:loader - -transforms: - - xpi_taskgraph.test:transforms - - xpi_taskgraph.cached:transforms - - taskgraph.transforms.cached_tasks:transforms - - taskgraph.transforms.job:transforms - - taskgraph.transforms.task:transforms - -task-defaults: - description: Test XPI - worker-type: b-linux - worker: - max-run-time: 7200 - docker-image: - indexed: xpi.cache.level-3.docker-images.v2.node-16.latest - volumes: - - /builds/worker/checkouts - - /builds/worker/.cache - run: - checkout: - xpi: {} - use-caches: false - -tasks: - ci: - attributes: - code-review: true - run: - using: run-task - cwd: '{checkout}' - cache-dotcache: false - command: >- - python3 /usr/local/bin/test.py {target} diff --git a/taskcluster/requirements.in b/taskcluster/requirements.in deleted file mode 100644 index 5383337..0000000 --- a/taskcluster/requirements.in +++ /dev/null @@ -1,4 +0,0 @@ -# For instructions on managing dependencies, see: -# https://taskcluster-taskgraph.readthedocs.io/en/latest/howto/bootstrap-taskgraph.html - -taskcluster-taskgraph>=1.3.1 diff --git a/taskcluster/requirements.txt b/taskcluster/requirements.txt deleted file mode 100644 index e116924..0000000 --- a/taskcluster/requirements.txt +++ /dev/null @@ -1,289 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.9 -# by the following command: -# -# pip-compile --generate-hashes taskcluster/requirements.in -# -appdirs==1.4.4 \ - --hash=sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41 \ - --hash=sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128 - # via taskcluster-taskgraph -arrow==1.2.3 \ - --hash=sha256:3934b30ca1b9f292376d9db15b19446088d12ec58629bc3f0da28fd55fb633a1 \ - --hash=sha256:5a49ab92e3b7b71d96cd6bfcc4df14efefc9dfa96ea19045815914a6ab6b1fe2 - # via jinja2-time -attrs==22.2.0 \ - --hash=sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836 \ - --hash=sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99 - # via taskcluster-taskgraph -binaryornot==0.4.4 \ - --hash=sha256:359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 \ - --hash=sha256:b8b71173c917bddcd2c16070412e369c3ed7f0528926f70cac18a6c97fd563e4 - # via cookiecutter -certifi==2022.12.7 \ - --hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \ - --hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18 - # via requests -chardet==5.1.0 \ - --hash=sha256:0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5 \ - --hash=sha256:362777fb014af596ad31334fde1e8c327dfdb076e1960d1694662d46a6917ab9 - # via binaryornot -charset-normalizer==3.1.0 \ - --hash=sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6 \ - --hash=sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1 \ - --hash=sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e \ - --hash=sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373 \ - --hash=sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62 \ - --hash=sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230 \ - --hash=sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be \ - --hash=sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c \ - --hash=sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0 \ - --hash=sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448 \ - --hash=sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f \ - --hash=sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649 \ - --hash=sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d \ - --hash=sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0 \ - --hash=sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706 \ - --hash=sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a \ - --hash=sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59 \ - --hash=sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23 \ - --hash=sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5 \ - --hash=sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb \ - --hash=sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e \ - --hash=sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e \ - --hash=sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c \ - --hash=sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28 \ - --hash=sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d \ - --hash=sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41 \ - --hash=sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974 \ - --hash=sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce \ - --hash=sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f \ - --hash=sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1 \ - --hash=sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d \ - --hash=sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8 \ - --hash=sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017 \ - --hash=sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31 \ - --hash=sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7 \ - --hash=sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8 \ - --hash=sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e \ - --hash=sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14 \ - --hash=sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd \ - --hash=sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d \ - --hash=sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795 \ - --hash=sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b \ - --hash=sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b \ - --hash=sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b \ - --hash=sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203 \ - --hash=sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f \ - --hash=sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19 \ - --hash=sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1 \ - --hash=sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a \ - --hash=sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac \ - --hash=sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9 \ - --hash=sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0 \ - --hash=sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137 \ - --hash=sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f \ - --hash=sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6 \ - --hash=sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5 \ - --hash=sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909 \ - --hash=sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f \ - --hash=sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0 \ - --hash=sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324 \ - --hash=sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755 \ - --hash=sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb \ - --hash=sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854 \ - --hash=sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c \ - --hash=sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60 \ - --hash=sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84 \ - --hash=sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0 \ - --hash=sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b \ - --hash=sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1 \ - --hash=sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531 \ - --hash=sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1 \ - --hash=sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11 \ - --hash=sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326 \ - --hash=sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df \ - --hash=sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab - # via requests -click==8.1.3 \ - --hash=sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e \ - --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48 - # via cookiecutter -cookiecutter==2.1.1 \ - --hash=sha256:9f3ab027cec4f70916e28f03470bdb41e637a3ad354b4d65c765d93aad160022 \ - --hash=sha256:f3982be8d9c53dac1261864013fdec7f83afd2e42ede6f6dd069c5e149c540d5 - # via taskcluster-taskgraph -giturlparse==0.10.0 \ - --hash=sha256:04ba1a3a099c3093fa8d24a422913c6a9b2c2cd22bcffc939cf72e3e98f672d7 \ - --hash=sha256:2595ab291d30717cda8474b874c9fd509f1b9802ad7f6968c36a45e4b13eb337 - # via mozilla-repo-urls -idna==3.4 \ - --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ - --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 - # via requests -jinja2==3.1.2 \ - --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ - --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 - # via - # cookiecutter - # jinja2-time -jinja2-time==0.2.0 \ - --hash=sha256:d14eaa4d315e7688daa4969f616f226614350c48730bfa1692d2caebd8c90d40 \ - --hash=sha256:d3eab6605e3ec8b7a0863df09cc1d23714908fa61aa6986a845c20ba488b4efa - # via cookiecutter -json-e==4.5.1 \ - --hash=sha256:1c3955a0ae541e757ab8055f6b62d9358011150bbe7677728e3ba6b543352168 \ - --hash=sha256:64f32ec098fff61ba5f4f71ff88caf89b59eaf2ffee67ffc64ecb04e22bb82fe - # via taskcluster-taskgraph -markupsafe==2.1.2 \ - --hash=sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed \ - --hash=sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc \ - --hash=sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2 \ - --hash=sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460 \ - --hash=sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7 \ - --hash=sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0 \ - --hash=sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1 \ - --hash=sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa \ - --hash=sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03 \ - --hash=sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323 \ - --hash=sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65 \ - --hash=sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013 \ - --hash=sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036 \ - --hash=sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f \ - --hash=sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4 \ - --hash=sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419 \ - --hash=sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2 \ - --hash=sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619 \ - --hash=sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a \ - --hash=sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a \ - --hash=sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd \ - --hash=sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7 \ - --hash=sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666 \ - --hash=sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65 \ - --hash=sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859 \ - --hash=sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625 \ - --hash=sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff \ - --hash=sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156 \ - --hash=sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd \ - --hash=sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba \ - --hash=sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f \ - --hash=sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1 \ - --hash=sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094 \ - --hash=sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a \ - --hash=sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513 \ - --hash=sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed \ - --hash=sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d \ - --hash=sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3 \ - --hash=sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147 \ - --hash=sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c \ - --hash=sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603 \ - --hash=sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601 \ - --hash=sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a \ - --hash=sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1 \ - --hash=sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d \ - --hash=sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3 \ - --hash=sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54 \ - --hash=sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2 \ - --hash=sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6 \ - --hash=sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58 - # via jinja2 -mozilla-repo-urls==0.1.1 \ - --hash=sha256:30510d3519479aa70211145d0ac9cf6e2fadcb8d30fa3b196bb957bd773502ba \ - --hash=sha256:7364da790751db2a060eb45adbf1d7db89a145ed279ba235f3425db9dd255915 - # via taskcluster-taskgraph -python-dateutil==2.8.2 \ - --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ - --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 - # via arrow -python-slugify==8.0.1 \ - --hash=sha256:70ca6ea68fe63ecc8fa4fcf00ae651fc8a5d02d93dcd12ae6d4fc7ca46c4d395 \ - --hash=sha256:ce0d46ddb668b3be82f4ed5e503dbc33dd815d83e2eb6824211310d3fb172a27 - # via cookiecutter -pyyaml==6.0 \ - --hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \ - --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \ - --hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \ - --hash=sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57 \ - --hash=sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b \ - --hash=sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4 \ - --hash=sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07 \ - --hash=sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba \ - --hash=sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9 \ - --hash=sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287 \ - --hash=sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513 \ - --hash=sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0 \ - --hash=sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782 \ - --hash=sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0 \ - --hash=sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92 \ - --hash=sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f \ - --hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 \ - --hash=sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc \ - --hash=sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1 \ - --hash=sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c \ - --hash=sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86 \ - --hash=sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4 \ - --hash=sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c \ - --hash=sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34 \ - --hash=sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b \ - --hash=sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d \ - --hash=sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c \ - --hash=sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb \ - --hash=sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7 \ - --hash=sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737 \ - --hash=sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3 \ - --hash=sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d \ - --hash=sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358 \ - --hash=sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53 \ - --hash=sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78 \ - --hash=sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803 \ - --hash=sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a \ - --hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \ - --hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \ - --hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5 - # via - # cookiecutter - # taskcluster-taskgraph -redo==2.0.4 \ - --hash=sha256:81066955041c853b0e6491eb65a0877dce45131c4cfa3d42d923fc2aa8f7a043 \ - --hash=sha256:c76e4c23ab2f8840261736a851323cd98493710e7a9d36a1058535dca501f293 - # via taskcluster-taskgraph -requests==2.28.2 \ - --hash=sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa \ - --hash=sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf - # via - # cookiecutter - # requests-unixsocket - # taskcluster-taskgraph -requests-unixsocket==0.3.0 \ - --hash=sha256:28304283ea9357d45fff58ad5b11e47708cfbf5806817aa59b2a363228ee971e \ - --hash=sha256:c685c680f0809e1b2955339b1e5afc3c0022b3066f4f7eb343f43a6065fc0e5d - # via taskcluster-taskgraph -six==1.16.0 \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via python-dateutil -slugid==2.0.0 \ - --hash=sha256:a950d98b72691178bdd4d6c52743c4a2aa039207cf7a97d71060a111ff9ba297 \ - --hash=sha256:aec8b0e01c4ad32e38e12d609eab3ec912fd129aaf6b2ded0199b56a5f8fd67c - # via taskcluster-taskgraph -taskcluster-taskgraph==5.0.0 \ - --hash=sha256:0e78089a8694b675442a92628354295c386536e5711f271ac492cbb88a4107c0 \ - --hash=sha256:30e6e7e80d5296c5a8f1b2e8ce72c672984a6225b2f8d5a41efb7085209fb0ff - # via -r taskcluster/requirements.in -taskcluster-urls==13.0.1 \ - --hash=sha256:5e25e7e6818e8877178b175ff43d2e6548afad72694aa125f404a7329ece0973 \ - --hash=sha256:b25e122ecec249c4299ac7b20b08db76e3e2025bdaeb699a9d444556de5fd367 \ - --hash=sha256:f66dcbd6572a6216ab65949f0fa0b91f2df647918028436c384e6af5cd12ae2b - # via taskcluster-taskgraph -text-unidecode==1.3 \ - --hash=sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8 \ - --hash=sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93 - # via python-slugify -urllib3==1.26.15 \ - --hash=sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305 \ - --hash=sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42 - # via requests -voluptuous==0.13.1 \ - --hash=sha256:4b838b185f5951f2d6e8752b68fcf18bd7a9c26ded8f143f92d6d28f3921a3e6 \ - --hash=sha256:e8d31c20601d6773cb14d4c0f42aee29c6821bbd1018039aac7ac5605b489723 - # via taskcluster-taskgraph diff --git a/taskcluster/xpi_taskgraph/__init__.py b/taskcluster/xpi_taskgraph/__init__.py deleted file mode 100644 index f1cd52d..0000000 --- a/taskcluster/xpi_taskgraph/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -from importlib import import_module - - -def register(graph_config): - """ - Import all modules that are siblings of this one, triggering decorators in - the process. - """ - _import_modules( - [ - "build", - "cached", - "parameters", - "single_dep", - "test", - "worker_types", - "xpi_manifest", - ] - ) - - -def _import_modules(modules): - for module in modules: - import_module(f".{module}", package=__name__) diff --git a/taskcluster/xpi_taskgraph/build.py b/taskcluster/xpi_taskgraph/build.py deleted file mode 100644 index 3a90951..0000000 --- a/taskcluster/xpi_taskgraph/build.py +++ /dev/null @@ -1,53 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -""" -Apply some defaults and minor modifications to the jobs defined in the build -kind. -""" - -from copy import deepcopy -import os - -from taskgraph.transforms.base import TransformSequence -from xpi_taskgraph.xpi_manifest import get_manifest - - -transforms = TransformSequence() - - -@transforms.add -def tasks_from_manifest(config, jobs): - manifest = get_manifest() - for job in jobs: - for xpi_config in manifest: - task = deepcopy(job) - env = task.setdefault("worker", {}).setdefault("env", {}) - run = task.setdefault("run", {}) - if "directory" in xpi_config: - run["cwd"] = "{checkout}/%s" % xpi_config["directory"] - extra = task.setdefault("extra", {}) - extra["directory"] = xpi_config["directory"] - task["label"] = "build-{}".format(xpi_config["name"]) - env["XPI_NAME"] = xpi_config["name"] - task.setdefault("extra", {})["xpi-name"] = xpi_config["name"] - if os.environ.get("XPI_SSH_SECRET_NAME"): - artifact_prefix = "xpi/build" - else: - artifact_prefix = "public/build" - task.setdefault("attributes", {}) - task["attributes"]["artifact_prefix"] = artifact_prefix - env["ARTIFACT_PREFIX"] = artifact_prefix - artifacts = task["worker"].setdefault("artifacts", []) - artifacts.append( - { - "type": "directory", - "name": artifact_prefix, - "path": "/builds/worker/artifacts", - } - ) - task["worker"]["docker-image"]["indexed"] = xpi_config["docker-image"] - if xpi_config.get("install-type"): - env["XPI_INSTALL_TYPE"] = xpi_config["install-type"] - - yield task diff --git a/taskcluster/xpi_taskgraph/cached.py b/taskcluster/xpi_taskgraph/cached.py deleted file mode 100644 index 0e9f2c9..0000000 --- a/taskcluster/xpi_taskgraph/cached.py +++ /dev/null @@ -1,77 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -import hashlib -import os -import subprocess - -import taskgraph -from taskgraph.transforms.base import TransformSequence -from taskgraph.util.hash import hash_path - -transforms = TransformSequence() - -BASE_DIR = os.getcwd() - -# Directory names we ignore, anywhere in the tree -# We won't recurse into these directories. -IGNORE_DIRS = (".git", "node_modules") - -# File extensions we ignore, anywhere in the tree -IGNORE_EXTENSIONS = (".pyc", ".swp") - -ADDITIONAL_FILES = (".taskcluster.yml", "eslintrc.js") - - -def list_files(path): - files = [] - for dir_name, subdir_list, file_list in os.walk(path): - for dir_ in subdir_list: - if dir_ in IGNORE_DIRS: - subdir_list.remove(dir_) - continue - for file_ in file_list: - (_, ext) = os.path.splitext(file_) - if ext in IGNORE_EXTENSIONS: - continue - files.append( - os.path.relpath(os.path.join(BASE_DIR, dir_name, file_), BASE_DIR) - ) - return set(files) - - -@transforms.add -def build_cache(config, tasks): - repo_name = subprocess.check_output( - ["git", "remote", "get-url", "origin"], universal_newlines=True - ) - repo_name = str(repo_name).rstrip() - repo_name = repo_name.replace(".git", "").rstrip("/") - repo_name = repo_name.split("/")[-1] - - for task in tasks: - if task.get("cache", True) and not taskgraph.fast: - directory = task.get("extra", {}).get("directory", BASE_DIR) - directory = os.path.join(BASE_DIR, directory) - files = list_files(directory) - files.update(list_files(os.path.join(BASE_DIR, "taskcluster"))) - for path in ADDITIONAL_FILES: - if os.path.exists(path): - files.update({path}) - h = hashlib.sha256() - for path in sorted(list(files)): - paths = "{} {}\n".format( - hash_path(os.path.realpath(os.path.join(BASE_DIR, path))), path - ) - h.update(paths.encode("UTF-8")) - task.setdefault("attributes", {}).setdefault("cached_task", {}) - cache_name = task["label"].replace(":", "-") - task["cache"] = { - "type": f"{repo_name}.v2", - "name": cache_name, - "digest-data": [h.hexdigest()], - } - - yield task diff --git a/taskcluster/xpi_taskgraph/linter.py b/taskcluster/xpi_taskgraph/linter.py deleted file mode 100644 index d67f195..0000000 --- a/taskcluster/xpi_taskgraph/linter.py +++ /dev/null @@ -1,48 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -""" -Apply some defaults and minor modifications to the jobs defined in the build -kind to run https://github.com/mozilla/addons-linter. -""" - - -import os - -from taskgraph.transforms.base import TransformSequence -from taskgraph.util.schema import resolve_keyed_by -from taskgraph.util.keyed_by import evaluate_keyed_by - - -transforms = TransformSequence() - - -@transforms.add -def run_addons_linter(config, tasks): - for task in tasks: - # We only want to execute addons-linter on privileged extensions (for now). - if os.environ.get("XPI_SIGNING_TYPE") != "privileged": - continue - - dep = task.pop("primary-dependency") - - # Add a dependency to the build task because we want to lint the - # generated XPI. - task["dependencies"] = {"build": dep.label} - - artifact_prefix = dep.task["payload"]["env"]["ARTIFACT_PREFIX"].rstrip("/") - xpi_name = dep.task["extra"]["xpi-name"] - xpi_file = f"{xpi_name}.xpi" - - # Set task label. - task["label"] = f"linter-{xpi_name}" - - # Replace variables in the `command` to execute. We use an `env` - # variable for the `XPI_URL` to leverage `artifact-reference`. - env = task.setdefault("worker", {}).setdefault("env", {}) - - env["XPI_URL"] = {"artifact-reference": f""} - run = task["run"] - run["command"] = run["command"].format(xpi_file=xpi_file) - - yield task diff --git a/taskcluster/xpi_taskgraph/parameters.py b/taskcluster/xpi_taskgraph/parameters.py deleted file mode 100644 index fed53e9..0000000 --- a/taskcluster/xpi_taskgraph/parameters.py +++ /dev/null @@ -1,22 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -import os - - -def get_decision_parameters(graph_config, parameters): - """Add repo-specific decision parameters. - - We don't have any repo-specific decision parameters, but we do need to - set repositories' `ssh-secret-name` if they're private repos. This seemed - to be the least objectionable place to add that. - - """ - for repo_prefix, repo_config in graph_config._config["taskgraph"][ - "repositories" - ].items(): - env_var = f"{repo_prefix.upper()}_SSH_SECRET_NAME" - if os.environ.get(env_var): - repo_config.setdefault("ssh-secret-name", os.environ[env_var]) diff --git a/taskcluster/xpi_taskgraph/signing.py b/taskcluster/xpi_taskgraph/signing.py deleted file mode 100644 index aeb82e6..0000000 --- a/taskcluster/xpi_taskgraph/signing.py +++ /dev/null @@ -1,83 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -""" -Apply some defaults and minor modifications to the jobs defined in the build -kind. -""" - - -import os - -from taskgraph.transforms.base import TransformSequence -from taskgraph.util.schema import resolve_keyed_by -from taskgraph.util.keyed_by import evaluate_keyed_by - - -transforms = TransformSequence() - -FORMATS = { - "mozillaonline-privileged": "privileged_webextension", - # normandy-privileged is deprecated - "normandy-privileged": "privileged_webextension", - "privileged": "privileged_webextension", - "system": "system_addon", -} - - -@transforms.add -def define_signing_flags(config, tasks): - for task in tasks: - dep = task["primary-dependency"] - # Current kind will be prepended later in the transform chain. - task["name"] = _get_dependent_job_name_without_its_kind(dep) - attributes = dep.attributes.copy() - if task.get("attributes"): - attributes.update(task["attributes"]) - task["attributes"] = attributes - task["attributes"]["signed"] = True - if "run_on_tasks_for" in task["attributes"]: - task.setdefault("run-on-tasks-for", task["attributes"]["run_on_tasks_for"]) - - for key in ("worker-type", "worker.signing-type"): - resolve_keyed_by( - task, - key, - item_name=task["name"], - level=config.params["level"], - ) - yield task - - -@transforms.add -def build_signing_task(config, tasks): - xpi_type = os.environ.get("XPI_SIGNING_TYPE", "unknown") - for task in tasks: - if xpi_type not in FORMATS: - continue - dep = task["primary-dependency"] - task["dependencies"] = {"build": dep.label} - artifact_prefix = dep.task["payload"]["env"]["ARTIFACT_PREFIX"].rstrip("/") - if not artifact_prefix.startswith("public"): - scopes = task.setdefault("scopes", []) - scopes.append(f"queue:get-artifact:{artifact_prefix}/*") - xpi_name = dep.task["extra"]["xpi-name"] - # XXX until we can figure out what to sign, assume - # `{artifact_prefix}/{xpi_name}.xpi` - path = f"{artifact_prefix}/{xpi_name}.xpi" - format = FORMATS[xpi_type] - task["worker"]["upstream-artifacts"] = [ - { - "taskId": {"task-reference": ""}, - "taskType": "build", - "paths": [path], - "formats": [format], - } - ] - task.setdefault("extra", {})["xpi-name"] = xpi_name - del task["primary-dependency"] - yield task - - -def _get_dependent_job_name_without_its_kind(dependent_job): - return dependent_job.label[len(dependent_job.kind) + 1 :] diff --git a/taskcluster/xpi_taskgraph/single_dep.py b/taskcluster/xpi_taskgraph/single_dep.py deleted file mode 100644 index ba3aebc..0000000 --- a/taskcluster/xpi_taskgraph/single_dep.py +++ /dev/null @@ -1,45 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -import copy - -from voluptuous import Required - -from taskgraph.task import Task -from taskgraph.util.schema import Schema - -schema = Schema({Required("primary-dependency", "primary dependency task"): Task}) - - -def loader(kind, path, config, params, loaded_tasks): - """ - Load tasks based on the jobs dependant kinds. - - Optional `only-for-attributes` kind configuration, if specified, will limit - the jobs chosen to ones which have the specified attribute, with the specified - value. - - Optional `task-template` kind configuration value, if specified, will be used to - pass configuration down to the specified transforms used. - """ - only_attributes = config.get("only-for-attributes") - task_template = config.get("task-template") - - for task in loaded_tasks: - if task.kind not in config.get("kind-dependencies", []): - continue - - if only_attributes: - config_attrs = set(only_attributes) - if not config_attrs & set(task.attributes): - # make sure any attribute exists - continue - - job = {"primary-dependency": task} - - if task_template: - job.update(copy.deepcopy(task_template)) - - yield job diff --git a/taskcluster/xpi_taskgraph/test.py b/taskcluster/xpi_taskgraph/test.py deleted file mode 100644 index 04ee7e9..0000000 --- a/taskcluster/xpi_taskgraph/test.py +++ /dev/null @@ -1,52 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -""" -Apply some defaults and minor modifications to the jobs defined in the build -kind. -""" - -from copy import deepcopy -import json -import os - -from taskgraph.transforms.base import TransformSequence -from xpi_taskgraph.xpi_manifest import get_manifest - - -transforms = TransformSequence() - -test_count = {} - - -@transforms.add -def test_tasks_from_manifest(config, jobs): - manifest = get_manifest() - for job in jobs: - for xpi_config in manifest: - xpi_name = xpi_config["name"] - for target in sorted(xpi_config["tests"]): - task = deepcopy(job) - test_count.setdefault(xpi_name, 0) - test_count[xpi_name] += 1 - task.setdefault("extra", {})["xpi-name"] = xpi_name - env = task.setdefault("worker", {}).setdefault("env", {}) - run = task["run"] - if "directory" in xpi_config: - run["cwd"] = "{checkout}/%s" % xpi_config["directory"] - extra = task.setdefault("extra", {}) - extra["directory"] = xpi_config["directory"] - else: - run["cwd"] = "{checkout}" - run["command"] = run["command"].format(target=target) - task["label"] = f"t-{target}-{xpi_name}" - - task["worker"]["docker-image"]["indexed"] = xpi_config["docker-image"] - if os.environ.get("XPI_SSH_SECRET_NAME", ""): - artifact_prefix = "xpi/build" - else: - artifact_prefix = "public/build" - env["ARTIFACT_PREFIX"] = artifact_prefix - if xpi_config.get("install-type"): - env["XPI_INSTALL_TYPE"] = xpi_config["install-type"] - yield task diff --git a/taskcluster/xpi_taskgraph/worker_types.py b/taskcluster/xpi_taskgraph/worker_types.py deleted file mode 100644 index 0a7b93b..0000000 --- a/taskcluster/xpi_taskgraph/worker_types.py +++ /dev/null @@ -1,50 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -from voluptuous import Required - -from taskgraph.util.schema import taskref_or_string -from taskgraph.transforms.task import payload_builder - - -@payload_builder( - "scriptworker-signing", - schema={ - # the maximum time to run, in seconds - Required("max-run-time"): int, - Required("signing-type"): str, - # list of artifact URLs for the artifacts that should be signed - Required("upstream-artifacts"): [ - { - # taskId of the task with the artifact - Required("taskId"): taskref_or_string, - # type of signing task (for CoT) - Required("taskType"): str, - # Paths to the artifacts to sign - Required("paths"): [str], - # Signing formats to use on each of the paths - Required("formats"): [str], - } - ], - }, -) -def build_scriptworker_signing_payload(config, task, task_def): - worker = task["worker"] - - task_def["tags"]["worker-implementation"] = "scriptworker" - - task_def["payload"] = { - "maxRunTime": worker["max-run-time"], - "upstreamArtifacts": worker["upstream-artifacts"], - } - - formats = set() - for artifacts in worker["upstream-artifacts"]: - formats.update(artifacts["formats"]) - - scope_prefix = config.graph_config["scriptworker"]["scope-prefix"] - task_def["scopes"].append( - "{}:signing:cert:{}".format(scope_prefix, worker["signing-type"]) - ) diff --git a/taskcluster/xpi_taskgraph/xpi_manifest.py b/taskcluster/xpi_taskgraph/xpi_manifest.py deleted file mode 100644 index f469a38..0000000 --- a/taskcluster/xpi_taskgraph/xpi_manifest.py +++ /dev/null @@ -1,110 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - - -from copy import deepcopy -import json -import os -import pprint -import re -import time -from datetime import datetime - -from taskgraph.config import load_graph_config -from taskgraph.util.schema import validate_schema -from taskgraph.util import yaml -from taskgraph.util.memoize import memoize -from taskgraph.util.readonlydict import ReadOnlyDict -from voluptuous import ALLOW_EXTRA, Optional, Required, Schema, Any - - -BASE_DIR = os.getcwd() -# Allowed characters in indexes, plus `:`, which we replace with a `-` -TEST_NAME_REGEX_STRING = r"""[^a-zA-Z0-9:_-]""" -TEST_NAME_REGEX = re.compile(TEST_NAME_REGEX_STRING) - - -def check_manifest(manifest_list): - messages = [] - xpi_names = {} - for manifest in manifest_list: - xpi_names.setdefault(manifest["name"], []).append( - manifest.get("directory", ".") - ) - for test in manifest["tests"]: - if TEST_NAME_REGEX.search(test): - messages.append( - "Illegal test name in {}: {} !\nIllegal char regex: {}".format( - manifest["name"], test, TEST_NAME_REGEX_STRING - ) - ) - for k, v in xpi_names.items(): - if len(v) > 1: - messages.append( - "Duplicate xpi name {} in directories {}\nTry renaming your xpis.".format( - k, v - ) - ) - if messages: - raise Exception( - f"Found the following issue with the package.json(s):\n{messages}" - ) - - -@memoize -def get_manifest(): - manifest_list = [] - for dir_name, subdir_list, file_list in os.walk(BASE_DIR): - for dir_ in subdir_list: - if dir_ in (".git", "node_modules"): - subdir_list.remove(dir_) - continue - if "package.json" in file_list: - # The presence of a "package.json" file in the repository - # does not necessarily mean there's an addon to sign. We - # need to give the ability to repository owners to turn off - # signing for non-addon "package.json" (e.g. libraries). - if "dontbuild" in file_list: - continue - - manifest = {"tests": []} - if "yarn.lock" in file_list: - manifest["install-type"] = "yarn" - elif "package-lock.json" in file_list: - manifest["install-type"] = "npm" - else: - raise Exception( - f"Missing yarn.lock or package-lock.json in {dir_name}!" - ) - if dir_name != BASE_DIR: - manifest["directory"] = dir_name.replace(f"{BASE_DIR}/", "") - with open(os.path.join(dir_name, "package.json")) as fh: - package_json = json.load(fh) - for target in package_json.get("scripts", {}): - if target.startswith("test") or target == "lint": - manifest["tests"].append(target) - manifest["name"] = package_json["name"].lower() - manifest[ - "docker-image" - ] = "xpi.cache.level-3.docker-images.v2.node-16.latest" - if "docker-image" in package_json: - manifest["docker-image"] = ( - "xpi.cache.level-3.docker-images.v2.%s.latest" - % package_json["docker-image"] - ) - manifest_list.append(ReadOnlyDict(manifest)) - check_manifest(manifest_list[:]) - return tuple(manifest_list) - - -def get_xpi_config(xpi_name): - manifest = get_manifest() - xpi_configs = [xpi for xpi in manifest if xpi["name"] == xpi_name] - if len(xpi_configs) != 1: - raise Exception( - "Unable to find a single xpi matching name {}: found {}".format( - input.xpi_name, len(xpi_configs) - ) - ) - return xpi_configs[0]