From d373bb71fba7a6c9568c8b82544a0430a9a6ec77 Mon Sep 17 00:00:00 2001 From: Mischa Taylor Date: Wed, 4 Dec 2024 15:02:20 -0500 Subject: [PATCH] Remove legacy workflows --- .github/workflows/archive/bin.yml | 31 ----- .github/workflows/archive/cinc-auditor.yml | 26 ---- .github/workflows/archive/cinc.yml | 26 ---- .github/workflows/archive/hadolint.yml | 28 ----- .github/workflows/archive/manual.yaml | 23 ---- .github/workflows/archive/nvidia-jetson.yml | 48 -------- .github/workflows/archive/ros.yml | 127 -------------------- .github/workflows/archive/self-hosted.yml | 63 ---------- 8 files changed, 372 deletions(-) delete mode 100644 .github/workflows/archive/bin.yml delete mode 100644 .github/workflows/archive/cinc-auditor.yml delete mode 100644 .github/workflows/archive/cinc.yml delete mode 100644 .github/workflows/archive/hadolint.yml delete mode 100644 .github/workflows/archive/manual.yaml delete mode 100644 .github/workflows/archive/nvidia-jetson.yml delete mode 100644 .github/workflows/archive/ros.yml delete mode 100644 .github/workflows/archive/self-hosted.yml diff --git a/.github/workflows/archive/bin.yml b/.github/workflows/archive/bin.yml deleted file mode 100644 index c3d7a48d..00000000 --- a/.github/workflows/archive/bin.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: bin -# Controls when the action will run -on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - paths: - - 'bin/**' -# Allows you to run this workflow manually from the Actions tab - workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - # Set job-wide defaults - defaults: - run: - working-directory: bin -# Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Fetch from GitHub - uses: actions/checkout@v3 - with: - submodules: 'true' - - - name: Run shellcheck to lint scrtips - run: | - ./run_shellcheck.sh diff --git a/.github/workflows/archive/cinc-auditor.yml b/.github/workflows/archive/cinc-auditor.yml deleted file mode 100644 index e5d76f42..00000000 --- a/.github/workflows/archive/cinc-auditor.yml +++ /dev/null @@ -1,26 +0,0 @@ -# cinc-auditor has its own workflow because it is a prerequisite image for enabling -# the test stage of our container image pipeline. When we are bootstrapping a new -# setup, this image will not be present in the container registry. So we avoid running -# the test stage of the container build pipeline. -name: cinc-auditor - -on: - push: - branches: [ main ] - paths: - - 'cinc/cinc-auditor/**' - pull_request: - branches: [ main ] - paths: - - 'cinc/cinc-auditor/**' - workflow_dispatch: -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: cinc/cinc-auditor - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} - run-test-stage: false \ No newline at end of file diff --git a/.github/workflows/archive/cinc.yml b/.github/workflows/archive/cinc.yml deleted file mode 100644 index 5ea2d9d3..00000000 --- a/.github/workflows/archive/cinc.yml +++ /dev/null @@ -1,26 +0,0 @@ -# cinc has its own workflow because it requires a special tag to work -# with Test Kitchen and so it has a unique test harness, specified via the -# "test-image" and "test-entrypoint" parameters. -name: cinc - -on: - push: - branches: [ main ] - paths: - - 'dokken/cinc/**' - pull_request: - branches: [ main ] - paths: - - 'dokken/cinc/**' - workflow_dispatch: -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: dokken/cinc - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} - test-image: "docker.io/polymathrobotics/cinc:current" - test-entrypoint: "/bin/sh" diff --git a/.github/workflows/archive/hadolint.yml b/.github/workflows/archive/hadolint.yml deleted file mode 100644 index 3eddcbc6..00000000 --- a/.github/workflows/archive/hadolint.yml +++ /dev/null @@ -1,28 +0,0 @@ -# hadolint has its own workflow because it is a prerequisite image for enabling -# the lint stage of our container image pipeline. When we are bootstrapping a new -# setup, this image will not be present in the container registry, nor will the image -# be present for running tests. So we avoid running the lint and test stages of the -# container build pipeline. -name: hadolint - -on: - push: - branches: [ main ] - paths: - - 'hadolint/**' - pull_request: - branches: [ main ] - paths: - - 'hadolint/**' - workflow_dispatch: -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: hadolint - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} - run-lint-stage: false - run-test-stage: false \ No newline at end of file diff --git a/.github/workflows/archive/manual.yaml b/.github/workflows/archive/manual.yaml deleted file mode 100644 index 757e4945..00000000 --- a/.github/workflows/archive/manual.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Manual Build - -on: - workflow_dispatch: - inputs: - list: - description: 'Comma-separated list of directories in the form: ["dir1", "dir2"]' - required: true - default: '' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - directory: ${{ fromJSON(github.event.inputs.list) }} - if: ${{ github.event.inputs.list != '' && github.event.inputs.list != '[]' }} - steps: - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: ${{ matrix.directory }} - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/archive/nvidia-jetson.yml b/.github/workflows/archive/nvidia-jetson.yml deleted file mode 100644 index b30a886e..00000000 --- a/.github/workflows/archive/nvidia-jetson.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: nvidia-jetson - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - # Job to run change detection - changes: - runs-on: ubuntu-latest - outputs: - # Expose matched filters as job 'images' output variable - images: ${{ steps.filter.outputs.changes }} - steps: - - uses: actions/checkout@v4 - - uses: dorny/paths-filter@v3 - id: filter - with: - # Use context to get the branch where commits were pushed. - # If there is only one long-lived branch (e.g. master), - # you can specify it directly. - # If it's not configured, the repository default branch is used. - base: ${{ github.ref }} - filters: | - nvidia/l4t-base: 'nvidia/l4t-base/**' - nvidia/l4t-jetpack: 'nvidia/l4t-jetpack/**' - nvidia/l4t-ros: 'nvidia/l4t-ros/**' - stereolabs/zed/4.X/l4t: 'stereolabs/zed/4.X/l4t/**' - stereolabs/zedbot/4.X/l4t: 'stereolabs/zedbot/4.X/l4t/**' - - # Job to build and test each of the modified images - build: - needs: changes - strategy: - matrix: - # Parse JSON array containing names of all filters matching any of changed files - # e.g. ['image1', 'image2'] if both image folders contains changes - image: ${{ fromJSON(needs.changes.outputs.images) }} - if: ${{ needs.changes.outputs.images != '[]' && needs.changes.outputs.images != '' }} - runs-on: [self-hosted, linux, ARM64] - timeout-minutes: 1440 - steps: - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: ${{ matrix.image }} - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} diff --git a/.github/workflows/archive/ros.yml b/.github/workflows/archive/ros.yml deleted file mode 100644 index 3c001259..00000000 --- a/.github/workflows/archive/ros.yml +++ /dev/null @@ -1,127 +0,0 @@ -name: ros - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - # Job to run change detection - changes: - runs-on: [self-hosted] - outputs: - images: ${{ steps.filter.outputs.changes }} - steps: - - uses: actions/checkout@v4 - - - uses: dorny/paths-filter@v3 - id: filter - with: - base: ${{ github.ref }} - filters: | - ros/humble/ubuntu/jammy: 'ros/humble/ubuntu/jammy/**' - ros/iron/ubuntu/jammy: 'ros/iron/ubuntu/jammy/**' - ros/jazzy/ubuntu/noble: 'ros/jazzy/ubuntu/noble/**' - ros/noetic/ubuntu/focal: 'ros/noetic/ubuntu/focal/**' - ros/rolling/ubuntu/jammy: 'ros/rolling/ubuntu/jammy/**' - polymath-ros/humble/ubuntu/jammy: 'polymath-ros/humble/ubuntu/jammy/**' - polymath-ros/iron/ubuntu/jammy: 'polymath-ros/iron/ubuntu/jammy/**' - polymath-ros/jazzy/ubuntu/noble: 'polymath-ros/jazzy/ubuntu/noble/**' - polymath-ros/rolling/ubuntu/jammy: 'polymath-ros/rolling/ubuntu/jammy/**' - - build: - needs: changes - strategy: - matrix: - image: ${{ fromJSON(needs.changes.outputs.images) }} - if: ${{ needs.changes.outputs.images != '[]' && needs.changes.outputs.images != '' }} - runs-on: [self-hosted] - defaults: - run: - working-directory: ${{ matrix.image }} - steps: - - uses: actions/checkout@v4 - - - name: Check the Containerfile with hadolint - shell: bash - working-directory: ${{ matrix.image }} - run: | - $(git rev-parse --show-toplevel)/bin/lint.sh - - # - name: Install QEMU static binaries - # uses: docker/setup-qemu-action@v3 - - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v3 - - - name: Build locally for testing - uses: docker/bake-action@v4 - # env: - # TAG_PREFIX: docker.crake-nexus.org.boxcutter.net/ros - with: - workdir: ${{ matrix.image }} - targets: local - load: true - # set: | - # _common.args.ROS_PACKAGES_URI=http://crake-nexus.org.boxcutter.net/repository/ros-apt-proxy - # _common.args.RAW_GITHUBUSERCONTENT_BASE_URL=https://crake-nexus.org.boxcutter.net/repository/githubusercontent-proxy - - - name: Run tests on the image with cinc-auditor - shell: bash - working-directory: ${{ matrix.image }} - run: | - json_data="$(docker buildx bake local --print 2>/dev/null)" - test_image=$(echo "$json_data" | jq -r '.target | to_entries[0].value | .tags[0]') - $(git rev-parse --show-toplevel)/bin/test-matrix.sh $test_image - - - name: Login to DockerHub - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }} - - - name: Build and push - uses: docker/bake-action@v4 - # env: - # TAG_PREFIX: docker.crake-nexus.org.boxcutter.net/ros - with: - workdir: ${{ matrix.image }} - push: ${{ github.event_name != 'pull_request' }} - # set: | - # _common.args.ROS_PACKAGES_URI=http://crake-nexus.org.boxcutter.net/repository/ros-apt-proxy - # _common.args.RAW_GITHUBUSERCONTENT_BASE_URL=https://crake-nexus.org.boxcutter.net/repository/githubusercontent-proxy - - - name: Get the image name - if: ${{ github.event_name != 'pull_request' }} - id: image_name - shell: bash - working-directory: ${{ matrix.image }} - run: | - echo "image_name=$($(git rev-parse --show-toplevel)/bin/image-name.sh)" >> $GITHUB_ENV - - - name: Get the image description - if: ${{ github.event_name != 'pull_request' }} - id: image_description - shell: bash - working-directory: ${{ matrix.image }} - run: | - echo "image_description=$($(git rev-parse --show-toplevel)/bin/image-description.sh)" >> $GITHUB_ENV - - - name: Get the image readme filepath - if: ${{ github.event_name != 'pull_request' }} - id: image_readme_filepath - shell: bash - working-directory: ${{ matrix.image }} - run: | - echo "image_readme_filepath=$($(git rev-parse --show-toplevel)/bin/image-readme.sh)" >> $GITHUB_ENV - - - name: Update Docker Hub Description - if: ${{ github.event_name != 'pull_request' }} - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }} - repository: polymathrobotics/${{ env.image_name }} - short-description: ${{ env.image_description }} - readme-filepath: ${{ env.image_readme_filepath }} diff --git a/.github/workflows/archive/self-hosted.yml b/.github/workflows/archive/self-hosted.yml deleted file mode 100644 index f9f7b029..00000000 --- a/.github/workflows/archive/self-hosted.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: self-hosted - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - # Job to run change detection - changes: - runs-on: [self-hosted, multi-arch] - outputs: - images: ${{ steps.filter.outputs.changes }} - steps: - - uses: actions/checkout@v4 - - - uses: dorny/paths-filter@v3 - id: filter - with: - base: ${{ github.ref }} - filters: | - # couchdb: 'couchdb/**' - python/3.9/focal: 'python/3.9/focal/**' - python/3.9/slim-focal: 'python/3.9/slim-focal/**' - python/3.9/jammy: 'python/3.9/jammy/**' - python/3.9/slim-jammy: 'python/3.9/slim-jammy/**' - python/3.10/focal: 'python/3.10/focal/**' - python/3.10/slim-focal: 'python/3.10/slim-focal/**' - python/3.10/jammy: 'python/3.10/jammy/**' - python/3.10/slim-jammy: 'python/3.10/slim-jammy/**' - - # Job to build and test each of the modified images - build: - needs: changes - strategy: - matrix: - # Parse JSON array containing names of all filters matching any of changed files - # e.g. ['image1', 'image2'] if both image folders contains changes - image: ${{ fromJSON(needs.changes.outputs.images) }} - if: ${{ needs.changes.outputs.images != '[]' && needs.changes.outputs.images != '' }} - runs-on: [self-hosted, multi-arch] - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Get build parameters - shell: bash - working-directory: ${{ matrix.image }} - run: | - echo "run-lint-stage=$($(git rev-parse --show-toplevel)/bin/run-lint-stage.sh)" >> $GITHUB_ENV - echo "run-test-stage=$($(git rev-parse --show-toplevel)/bin/run-test-stage.sh)" >> $GITHUB_ENV - echo "test-entrypoint=$($(git rev-parse --show-toplevel)/bin/test-entrypoint.sh)" >> $GITHUB_ENV - cat $GITHUB_ENV - - - uses: polymathrobotics/container-build-publish-action@main - with: - workdir: ${{ matrix.image }} - build-type: 'local' - run-lint-stage: ${{ env.run-lint-stage }} - run-test-stage: ${{ env.run-test-stage }} - test-entrypoint: ${{ env.test-entrypoint }} - dockerhub-username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} - dockerhub-password: ${{ secrets.CONTAINER_DESCRIPTION_PASSWORD }}