From f4f7c75012b68b755bd3a497489c9b2f0ad89954 Mon Sep 17 00:00:00 2001 From: phil Date: Fri, 25 Oct 2024 04:42:06 +0200 Subject: [PATCH] Remove extra tests --- .github/workflows/ci.yml | 48 ---- .github/workflows/docker_metadata_action.yml | 194 ++++++++-------- .github/workflows/multiarch.yml | 229 ------------------- .github/workflows/scratch_build.yml | 87 ------- 4 files changed, 97 insertions(+), 461 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/multiarch.yml delete mode 100644 .github/workflows/scratch_build.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 8422cfc..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: CI checks -on: - push: - pull_request: - -jobs: - lint: - name: Run ESLint - runs-on: container - - steps: - - uses: actions/checkout@v4 - - run: npm ci - - run: npm run lint - - check-dist: - name: Check Distribution - runs-on: container - env: - BUNDLE_FILE: "dist/index.js" - BUNDLE_COMMAND: "npm run bundle" - steps: - - uses: actions/checkout@v4 - - - name: Install - run: npm ci - - - name: Verify Latest Bundle - uses: redhat-actions/common/bundle-verifier@v1 - with: - bundle_file: ${{ env.BUNDLE_FILE }} - bundle_command: ${{ env.BUNDLE_COMMAND }} - - check-inputs-outputs: - name: Check Input and Output enums - runs-on: container - env: - IO_FILE: ./src/generated/inputs-outputs.ts - steps: - - uses: actions/checkout@v4 - - - name: Install dependencies - run: npm ci - - - name: Verify Input and Output enums - uses: redhat-actions/common/action-io-generator@v1 - with: - io_file: ${{ env.IO_FILE }} diff --git a/.github/workflows/docker_metadata_action.yml b/.github/workflows/docker_metadata_action.yml index 709c792..9af48d4 100644 --- a/.github/workflows/docker_metadata_action.yml +++ b/.github/workflows/docker_metadata_action.yml @@ -86,100 +86,100 @@ jobs: buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.title"' buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.description"' - build-scratch: - name: Build image without Containerfile - runs-on: container - strategy: - fail-fast: false - matrix: - install_latest: [ false ] - - env: - PROJECT_DIR: spring-petclinic - IMAGE_NAME: spring-petclinic - MVN_REPO_DIR: ~/.m2/repository - - steps: - - # Checkout buildah action github repository - - name: Checkout Buildah action - uses: actions/checkout@v4 - - - name: Docker Metadata - id: docker-metadata - uses: docker/metadata-action@v4 - with: - images: | - ${{ env.IMAGE_NAME }} - tags: | - type=edge - type=sha - type=ref,event=branch - type=ref,event=pr - type=schedule - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} - - - name: Install latest buildah - if: matrix.install_latest - run: | - bash .github/install_latest_buildah.sh - - # Checkout spring-petclinic github repository - - name: Checkout spring-petclinic project - uses: actions/checkout@v4 - with: - repository: "spring-projects/spring-petclinic" - path: ${{ env.PROJECT_DIR }} - - # Setup java. - - name: Setup Java - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: '17' - cache: 'maven' - - # Run maven to build the project - - name: Maven - working-directory: ${{ env.PROJECT_DIR }} - run: | - mvn package -ntp -B - - # Build image using Buildah action - - name: Build Image - id: build_image - uses: ./ - with: - tags: ${{ steps.docker-metadata.outputs.tags }} - labels: ${{ steps.docker-metadata.outputs.labels }} - base-image: 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' - # To avoid hardcoding a particular version of the binary. - content: | - ./spring-petclinic/target/spring-petclinic-*.jar - entrypoint: | - java - -jar - spring-petclinic-*.jar - port: 8080 - arch: amd64 - workdir: "." - - - name: Echo Outputs - run: | - echo "Image: ${{ steps.build_image.outputs.image }}" - echo "Tags: ${{ steps.build_image.outputs.tags }}" - echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}" - - # Check if image is build - - name: Check images created - run: buildah images | grep '${{ env.IMAGE_NAME }}' - - - name: Check image metadata - run: | - set -x - buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.OCIv1.config.Labels."org.opencontainers.image.title"' - buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.OCIv1.config.Labels."org.opencontainers.image.description"' - buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.title"' - buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.description"' + # build-scratch: + # name: Build image without Containerfile + # runs-on: container + # strategy: + # fail-fast: false + # matrix: + # install_latest: [ false ] + # + # env: + # PROJECT_DIR: spring-petclinic + # IMAGE_NAME: spring-petclinic + # MVN_REPO_DIR: ~/.m2/repository + # + # steps: + # + # # Checkout buildah action github repository + # - name: Checkout Buildah action + # uses: actions/checkout@v4 + # + # - name: Docker Metadata + # id: docker-metadata + # uses: docker/metadata-action@v4 + # with: + # images: | + # ${{ env.IMAGE_NAME }} + # tags: | + # type=edge + # type=sha + # type=ref,event=branch + # type=ref,event=pr + # type=schedule + # type=semver,pattern={{version}} + # type=semver,pattern={{major}}.{{minor}} + # type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} + # + # - name: Install latest buildah + # if: matrix.install_latest + # run: | + # bash .github/install_latest_buildah.sh + # + # # Checkout spring-petclinic github repository + # - name: Checkout spring-petclinic project + # uses: actions/checkout@v4 + # with: + # repository: "spring-projects/spring-petclinic" + # path: ${{ env.PROJECT_DIR }} + # + # # Setup java. + # - name: Setup Java + # uses: actions/setup-java@v3 + # with: + # distribution: 'temurin' + # java-version: '17' + # cache: 'maven' + # + # # Run maven to build the project + # - name: Maven + # working-directory: ${{ env.PROJECT_DIR }} + # run: | + # mvn package -ntp -B + # + # # Build image using Buildah action + # - name: Build Image + # id: build_image + # uses: ./ + # with: + # tags: ${{ steps.docker-metadata.outputs.tags }} + # labels: ${{ steps.docker-metadata.outputs.labels }} + # base-image: 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' + # # To avoid hardcoding a particular version of the binary. + # content: | + # ./spring-petclinic/target/spring-petclinic-*.jar + # entrypoint: | + # java + # -jar + # spring-petclinic-*.jar + # port: 8080 + # arch: amd64 + # workdir: "." + # + # - name: Echo Outputs + # run: | + # echo "Image: ${{ steps.build_image.outputs.image }}" + # echo "Tags: ${{ steps.build_image.outputs.tags }}" + # echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}" + # + # # Check if image is build + # - name: Check images created + # run: buildah images | grep '${{ env.IMAGE_NAME }}' + # + # - name: Check image metadata + # run: | + # set -x + # buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.OCIv1.config.Labels."org.opencontainers.image.title"' + # buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.OCIv1.config.Labels."org.opencontainers.image.description"' + # buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.title"' + # buildah inspect ${{ steps.build_image.outputs.image-with-tag }} | jq '.Docker.config.Labels."org.opencontainers.image.description"' diff --git a/.github/workflows/multiarch.yml b/.github/workflows/multiarch.yml deleted file mode 100644 index d321f02..0000000 --- a/.github/workflows/multiarch.yml +++ /dev/null @@ -1,229 +0,0 @@ -name: Multiarch build -on: - push: - pull_request: - workflow_dispatch: - schedule: - - cron: '0 0 * * *' # every day at midnight - -env: - PROJECT_DIR: spring-petclinic - MVN_REPO_DIR: ~/.m2/repository - IMAGE_TAG: latest - -jobs: - build-multiarch-containerfile: - name: Build multi-architecture image using Containerfile - env: - IMAGE_NAME: hello-world-multiarch - runs-on: container - strategy: - fail-fast: false - matrix: - install_latest: [ false ] - - steps: - - # Checkout buildah action github repository - - name: Checkout Buildah action - uses: actions/checkout@v4 - with: - path: "buildah-build" - - - name: Install latest buildah - if: matrix.install_latest - run: | - bash buildah-build/.github/install_latest_buildah.sh - - - name: Install qemu dependency - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - - name: Create Containerfile - run: | - cat > Containerfile< Containerfile<