From 3a3d42c37f2de47cc4b7ecf485e3e81c2beaa45a Mon Sep 17 00:00:00 2001 From: Ross Ceballo Date: Tue, 19 Nov 2024 17:40:02 -0500 Subject: [PATCH] remove travis files --- .hadolint.yaml | 4 - .travis.yml | 315 -------------------------------------------- .yamllint.yaml | 12 ++ tests/hadolint.sh | 28 ---- tests/make.sh | 31 ----- tests/shellcheck.sh | 26 ---- tests/yamllint.sh | 34 ----- 7 files changed, 12 insertions(+), 438 deletions(-) delete mode 100644 .hadolint.yaml delete mode 100644 .travis.yml create mode 100644 .yamllint.yaml delete mode 100755 tests/hadolint.sh delete mode 100755 tests/make.sh delete mode 100755 tests/shellcheck.sh delete mode 100755 tests/yamllint.sh diff --git a/.hadolint.yaml b/.hadolint.yaml deleted file mode 100644 index fa6a117..0000000 --- a/.hadolint.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -ignored: - # disable USER root - - DL3002 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 65b89e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,315 +0,0 @@ ---- -# yamllint disable rule:line-length -sudo: false -matrix: - include: - - env: TEST='pytest' - language: python - python: &pyver '3.6' - install: pip install --upgrade 'pip>=9' setuptools_scm - script: python setup.py test - - - env: TEST='github-tag-release' - language: python - python: *pyver - install: &codekit_install - - pip install --upgrade 'pip>=9' setuptools_scm - - python setup.py sdist - - pip install dist/sqre-codekit-*.tar.gz - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then - # verify a past weekly tag -- the eups tag name and git tag names are - # in sync except for s/_/-/ - "$TEST" \ - --verify \ - --debug \ - --limit 10 \ - --org 'lsst' \ - --allow-team 'Data Management' \ - --allow-team 'DM Externals' \ - --external-team 'DM Externals' \ - --deny-team 'DM Auxilliaries' \ - --email 'sqre-admin@lists.lsst.org' \ - --user 'sqreadmin' \ - --token "$SQREADMIN_TOKEN" \ - --ignore-git-tagger \ - --ignore-git-message \ - --manifest 'b3595' \ - 'w.2018.18' - - # verify a past official release where the git tag was generated from - # an rcX eups tag. This validates the location of the git tags but - # does not inspect the official eups release tag at all. - "$TEST" \ - --verify \ - --debug \ - --limit 10 \ - --org 'lsst' \ - --allow-team 'Data Management' \ - --allow-team 'DM Externals' \ - --external-team 'DM Externals' \ - --deny-team 'DM Auxilliaries' \ - --email 'sqre-admin@lists.lsst.org' \ - --user 'sqreadmin' \ - --token "$SQREADMIN_TOKEN" \ - --ignore-git-tagger \ - --ignore-git-message \ - --eups-tag 'v15_0_rc3' \ - --manifest 'b3504' \ - '15.0' - - # verify a past official release using the eups tag. As the eups - # product version strings will be out of sync between the versiondb - # manifest it was based on and the eups tag, the eups product version - # strings have to be ignored. - "$TEST" \ - --verify \ - --debug \ - --limit 10 \ - --org 'lsst' \ - --allow-team 'Data Management' \ - --allow-team 'DM Externals' \ - --external-team 'DM Externals' \ - --deny-team 'DM Auxilliaries' \ - --email 'sqre-admin@lists.lsst.org' \ - --user 'sqreadmin' \ - --token "$SQREADMIN_TOKEN" \ - --ignore-manifest-versions \ - --ignore-git-tagger \ - --ignore-git-message \ - --manifest 'b3504' \ - '15.0' - - "$TEST" \ - --dry-run \ - --debug \ - --limit 10 \ - --org 'lsst' \ - --allow-team 'Data Management' \ - --allow-team 'DM Externals' \ - --external-team 'DM Externals' \ - --deny-team 'DM Auxilliaries' \ - --email 'sqre-admin@lists.lsst.org' \ - --user 'sqreadmin' \ - --token "$SQREADMIN_TOKEN" \ - --ignore-manifest-versions \ - --ignore-git-tagger \ - --ignore-git-message \ - --manifest 'b3595' \ - --manifest-only \ - 'w.2018.18' - else - echo "Unable to test without travis secure env vars." - fi - - - env: TEST='github-tag-teams' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then - # create - "$TEST" \ - --debug \ - --dry-run \ - --org 'lsst' \ - --allow-team 'DM Auxilliaries' \ - --deny-team 'DM Externals' \ - --token "$SQREADMIN_TOKEN" \ - --user 'sqreadmin' \ - --email 'sqre-admin@lists.lsst.org' \ - --tag 'foo' \ - --tag 'bar' - - # --delete - "$TEST" \ - --debug \ - --dry-run \ - --delete \ - --org 'lsst' \ - --allow-team 'DM Auxilliaries' \ - --deny-team 'DM Externals' \ - --token "$SQREADMIN_TOKEN" \ - --user 'sqreadmin' \ - --email 'sqre-admin@lists.lsst.org' \ - --tag 'foo' \ - --tag 'bar' - else - echo "Unable to test without travis secure env vars." - fi - - - env: TEST='github-decimate-org' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then - "$TEST" \ - --dry-run \ - --debug \ - --org 'batmanuel-sandbox' \ - --token "$SQREADMIN_TOKEN" \ - --delete-repos \ - --delete-repos-limit 3 \ - --delete-teams \ - --delete-teams-limit 3 - else - echo "Unable to test without travis secure env vars." - fi - - - env: TEST='github-fork-org' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then - "$TEST" \ - --dry-run \ - --debug \ - --src-org 'lsst' \ - --dst-org 'batmanuel-sandbox' \ - --token "$SQREADMIN_TOKEN" \ - --team 'DM Auxilliaries' \ - --team 'DM Externals' \ - --team 'Data Management' \ - --limit 10 - #--copy-teams - else - echo "Unable to test without travis secure env vars." - fi - - - env: TEST='github-get-ratelimit' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - if [[ $TRAVIS_SECURE_ENV_VARS == true ]]; then - "$TEST" \ - --debug \ - --token "$SQREADMIN_TOKEN" - else - echo "Unable to test without travis secure env vars." - fi - - - env: TEST='github-auth' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - - env: TEST='github-list-repos' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - - env: TEST='github-mv-repos-to-team' - language: python - python: *pyver - install: *codekit_install - script: | - set -e - - # check argparse help formatting for errors - "$TEST" -h - - - env: - TEST='github-auth' - DM_SQUARE_DEBUG='bogus_non_int_able_value' - language: python - python: *pyver - install: *codekit_install - script: | - # should fail - "$TEST" -u foo - [[ $? == 1 ]] - - - env: TEST=markdownlint - language: c - services: - - docker - script: ./tests/mdl.sh - - - env: TEST=make - language: c - script: ./tests/make.sh - - - env: TEST=hadolint - language: c - services: - - docker - script: ./tests/hadolint.sh - - - env: TEST=yamllint - language: c - services: - - docker - script: ./tests/yamllint.sh - - - env: TEST=shellcheck - language: c - services: - - docker - script: ./tests/shellcheck.sh - - - stage: pypi release - if: (NOT type IN (pull_request)) AND (tag IS present) - language: python - python: &pyver '3.6' - install: *codekit_install - script: skip - deploy: - provider: pypi - user: sqre-admin - skip_upload_docs: true - distributions: sdist bdist_wheel - password: - secure: f88F6UgUAxe73pQuX5yGHdl96e/dcQIFClBc6mNgzAVDjxWXskQ/YRCcbO81yxdjsQRfBJsOiiQKcuM76k1iaOQTazQtdG2Wc/S29qzLlReBNTvo4iMBTg1TDSkT5RnDKrxG4omphlgJP2C9i+b0TjDcKJ26uh8t6m6eUs/Mffw= - # yamllint disable-line rule:truthy - on: - tags: true - branch: master - repo: lsst-sqre/sqre-codekit -env: - global: - - secure: WEvb3zfO3XL0vUqIyckr3qZ7RWP5Iw9Pxbgw2Ei8tB8FSqz5DzU99xwl+ucTDQXIGYs4M1ROnf0hpCPP9OM0eSZaRPTf8BEK0SNjDEIQO4Rc89dskNqhf1CFQnCauJhk2ZJ/q0i4J9dV/igN6Ub/3kMRHov6i1UTfqs6ixfo3Fg= -branches: - only: - - master - # also matched against tag pushes - - /^\d+\.\d+\.\d+$/ -notifications: - email: false diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..c5b3fd2 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,12 @@ +--- +extends: default + +rules: + # 80 chars should be enough, but don't fail if a line is longer + document-start: + ignore: | + /.github/workflows/ + line-length: disable + truthy: + ignore: | + /.github/workflows/ diff --git a/tests/hadolint.sh b/tests/hadolint.sh deleted file mode 100755 index 0e9d003..0000000 --- a/tests/hadolint.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -e -shopt -s globstar nullglob - -CHECK=( **/Dockerfile ) -IGNORE=() - -for c in "${!CHECK[@]}"; do - for i in "${IGNORE[@]}"; do - [[ ${CHECK[c]} == "$i" ]] && unset -v 'CHECK[c]' - done -done -[[ ${#CHECK[@]} -eq 0 ]] && { echo 'no files to check'; exit 0; } - -echo '---' -echo 'check:' -for c in "${CHECK[@]}"; do - echo " - ${c}" -done -echo - -for f in "${CHECK[@]}"; do - docker run -ti -v "$(pwd):$(pwd)" -w "$(pwd)" \ - hadolint/hadolint hadolint "$f" -done - -# vim: tabstop=2 shiftwidth=2 expandtab diff --git a/tests/make.sh b/tests/make.sh deleted file mode 100755 index 341d206..0000000 --- a/tests/make.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -e -shopt -s globstar nullglob - -CHECK=( **/Makefile ) -IGNORE=() - -for c in "${!CHECK[@]}"; do - for i in "${IGNORE[@]}"; do - [[ ${CHECK[c]} == "$i" ]] && unset -v 'CHECK[c]' - done -done -[[ ${#CHECK[@]} -eq 0 ]] && { echo 'no files to check'; exit 0; } - -echo '---' -echo 'check:' -for c in "${CHECK[@]}"; do - echo " - ${c}" -done -echo - -for f in "${CHECK[@]}"; do - ( set -e - cd "$(dirname "$f")" - echo "checking $f" - make --dry-run --warn-undefined-variables - ) -done - -# vim: tabstop=2 shiftwidth=2 expandtab diff --git a/tests/shellcheck.sh b/tests/shellcheck.sh deleted file mode 100755 index 7ef6b83..0000000 --- a/tests/shellcheck.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -e -shopt -s globstar nullglob - -CHECK=( **/*.sh ) -IGNORE=() - -for c in "${!CHECK[@]}"; do - for i in "${IGNORE[@]}"; do - [[ ${CHECK[c]} == "$i" ]] && unset -v 'CHECK[c]' - done -done -[[ ${#CHECK[@]} -eq 0 ]] && { echo 'no files to check'; exit 0; } - -echo '---' -echo 'check:' -for c in "${CHECK[@]}"; do - echo " - ${c}" -done -echo - -docker run -ti -v "$(pwd):$(pwd)" -w "$(pwd)" \ - koalaman/shellcheck-alpine:v0.4.6 -x "${CHECK[@]}" - -# vim: tabstop=2 shiftwidth=2 expandtab diff --git a/tests/yamllint.sh b/tests/yamllint.sh deleted file mode 100755 index 5fa84a6..0000000 --- a/tests/yamllint.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -e -shopt -s globstar nullglob - -CHECK=( **/*.yaml **/*.yml **/*.eyaml .travis.yml ) -EYAML=( **/*.eyaml ) -IGNORE=() - -# filter out plaintext versions of .eyaml files -for e in "${!EYAML[@]}"; do - uneyaml=${EYAML[e]/eyaml/yaml} - for c in "${!CHECK[@]}"; do - [[ ${CHECK[c]} == "$uneyaml" ]] && unset -v 'CHECK[c]' - done -done - -for c in "${!CHECK[@]}"; do - for i in "${IGNORE[@]}"; do - [[ ${CHECK[c]} == "$i" ]] && unset -v 'CHECK[c]' - done -done -[[ ${#CHECK[@]} -eq 0 ]] && { echo 'no files to check'; exit 0; } - -echo '---' -echo 'check:' -for c in "${CHECK[@]}"; do - echo " - ${c}" -done -echo - -docker run -ti -v "$(pwd):/workdir" lsstsqre/yamllint:1.11.1 "${CHECK[@]}" - -# vim: tabstop=2 shiftwidth=2 expandtab