diff --git a/jobs/templates/swh-cypress.yaml b/jobs/templates/swh-cypress.yaml index 8676aae..5661b17 100644 --- a/jobs/templates/swh-cypress.yaml +++ b/jobs/templates/swh-cypress.yaml @@ -1,98 +1,62 @@ - job-template: name: "{name}/cypress" display-name: "master branch (cypress)" project-type: pipeline docker_image: cypress triggers: - timed: '@daily' sandbox: true auth-token: 'ph4br1cat0r' properties: - build-discarder: num-to-keep: 20 parameters: - git-parameter: name: REVISION type: PT_REVISION defaultValue: master description: Git revision to build. - string: name: PHID description: PHID of the Phabricator target object on which results will be reported. - dsl: - !include-jinja2: swh-cypress.groovy.j2 + dsl: | + pipeline {{ + stages {{ + stage ('Fail unconditionally') {{ + steps {{ + echo 'This job has been merged into {name}/tests; it is only kept for historical purposes' + sh 'exit 1' + }} + }} + }} + }} + - job-template: name: "{name}/cypress-diff" display-name: 'Phab. Diff (cypress)' docker_image: cypress node: "swh-{docker_image}" auth-token: ph4br1cat0r parameters: - string: name: REPO description: PHID of the Diffusion repository - string: name: PHID description: PHID of the Target object - string: name: DIFF_ID description: ID of the Diff patch to apply, if any scm: - git: url: https://forge.softwareheritage.org/source/{repo_name}.git branches: - origin/master - wrappers: - - phabricator-differential: - apply-to-master: true - patch-with-force-flag: true - - builders: - shell: | - echo "Run cypress for:" - echo " REPO=$REPO" - echo " PHID=$PHID" - echo " DIFF_ID=$DIFF_ID" - - shell: | - #!/bin/bash - set -e - python3 -m pip install --user -e .[testing] - export CYPRESS_CACHE_FOLDER=/tmp/cypress_cache/ - yarn install && yarn build-test && yarn run cypress install - export PYTHONPATH=$PWD - python3 swh/web/manage.py migrate --settings=swh.web.settings.tests - python3 swh/web/manage.py createcachetable --settings=swh.web.settings.tests - cat swh/web/tests/create_test_admin.py | python3 swh/web/manage.py shell --settings=swh.web.settings.tests - python3 swh/web/manage.py runserver --nostatic --settings=swh.web.settings.tests & - wait-for-it localhost:5004 - yarn run cypress run - yarn run mochawesome - yarn run nyc-report - - publishers: - - phabricator: - uberalls-enabled: false - comment-on-success: true - comment-with-console-link-on-failure: true - process-lint: true - lint-file: .phabricator-lint - lint-file-size: 1000000 - - html-publisher: - name: 'Mochawesome Tests Report' - dir: 'cypress/mochawesome/report' - files: 'mochawesome.html' - keep-all: true - allow-missing: true - link-to-last-build: false - - html-publisher: - name: 'Istanbul Code Coverage' - dir: 'cypress/coverage/lcov-report' - files: 'index.html' - keep-all: true - allow-missing: true - link-to-last-build: false + echo "This job is only kept for historical purposes; please run {name}/tests-on-diff instead" + exit 1 diff --git a/jobs/templates/swh-tox.yaml b/jobs/templates/swh-tox.yaml index 10c0804..c0957a3 100644 --- a/jobs/templates/swh-tox.yaml +++ b/jobs/templates/swh-tox.yaml @@ -1,61 +1,31 @@ - job-template: name: '{name}/tox' display-name: 'Phab. Diff (legacy)' docker_image: tox node: "swh-{docker_image}" default-tox-environment: py3 auth-token: ph4br1cat0r parameters: - string: name: REPO description: PHID of the Diffusion repository - string: name: PHID description: PHID of the Target object - string: name: DIFF_ID description: ID of the Diff patch to apply, if any - string: name: TOX_ENVIRONMENT description: tox environment to use for the main tox run default: "{default-tox-environment}" scm: - git: url: https://forge.softwareheritage.org/source/{repo_name}.git branches: - origin/master - wrappers: - - phabricator-differential: - apply-to-master: true - patch-with-force-flag: true - - builders: - shell: | - echo "Run tox for:" - echo " REPO=$REPO" - echo " PHID=$PHID" - echo " DIFF_ID=$DIFF_ID" - - shell: | - if (python3 -m tox -a 2>/dev/null | grep -qx flake8-phab ); then - python3 -m tox -e flake8-phab - else - python3 -m tox -e flake8 - fi - - shell: | - if (python3 -m tox -a 2>/dev/null | grep -qx mypy ); then - python3 -m tox -e mypy - fi - - shell: python3 -m tox --result-json tox-results.json -e $TOX_ENVIRONMENT -- -v - - publishers: - - phabricator: - uberalls-enabled: false - comment-on-success: true - comment-with-console-link-on-failure: true - process-lint: true - lint-file: .phabricator-lint - lint-file-size: 1000000 - - archive: - artifacts: "*.json,.coverage*,.phabricator*" + echo "This job is only kept for historical purposes; please run {name}/tests-on-diff instead" + return 1