From e62ad7ab74e76764b5a2900a6b141f8e75c6e545 Mon Sep 17 00:00:00 2001 From: Firebladee Date: Tue, 25 May 2021 10:46:36 +0100 Subject: [PATCH 01/18] Testing --- concourse.yaml | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/concourse.yaml b/concourse.yaml index 82fd04c..341b19a 100644 --- a/concourse.yaml +++ b/concourse.yaml @@ -116,7 +116,7 @@ jobs: image_resource: type: registry-image source: - repository: ((nexus_ip)):((nexus_docker_group_port))/ruby + repository: ((nexus_ip)):((nexus_docker_group_port))/library/ruby inputs: - name: resource-git run: @@ -183,11 +183,36 @@ jobs: passed: - hadolint trigger: true - - put: docker-temp - params: - build: resource-git/ - build_args: - from: ((nexus_ip)):((nexus_docker_group_port))/centos:7 + #- put: docker-temp + # params: + # build: resource-git + # build_args: + # from: ((nexus_ip)):((nexus_docker_group_port))/centos:7 + + - task: docker-temp-build + privileged: true + config: + platform: linux + image_resource: + type: docker-image + source: + repository: ((nexus_ip)):((nexus_docker_group_port))/amidos/dcind + insecure_registries: + - http://((nexus_ip)):((nexus_docker_group_port)) + inputs: + - name: resource-git + run: + path: sh + args: + - -exc + - | + source /docker-lib.sh + start_docker ((nexus_ip)):((nexus_docker_port)) + + cd resource-git + docker build --build-arg from="((nexus_ip)):((nexus_docker_group_port))/library/centos:7" -t ((nexus_ip)):((nexus_docker_port))/testing . + docker push ((nexus_ip)):((nexus_docker_port))/testing + exit - name: testinfra public: true From 007e8041904f833afa71be99857dda0b29a49a71 Mon Sep 17 00:00:00 2001 From: Firebladee Date: Tue, 25 May 2021 11:06:16 +0100 Subject: [PATCH 02/18] fixed concourse --- concourse.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concourse.yaml b/concourse.yaml index 341b19a..7fa65b5 100644 --- a/concourse.yaml +++ b/concourse.yaml @@ -297,7 +297,7 @@ jobs: image_resource: type: registry-image source: - repository: ((nexus_ip)):((nexus_docker_group_port))/ruby + repository: ((nexus_ip)):((nexus_docker_group_port))/library/ruby inputs: - name: resource-git-dev run: From 618805e435ed47448453aeb946b7eb627ee9abd7 Mon Sep 17 00:00:00 2001 From: Firebladee Date: Tue, 25 May 2021 11:43:03 +0100 Subject: [PATCH 03/18] fixed build --- concourse.yaml | 41 ++++++++++------------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/concourse.yaml b/concourse.yaml index 7fa65b5..8d43828 100644 --- a/concourse.yaml +++ b/concourse.yaml @@ -45,6 +45,7 @@ resources: password: ((nexus_password)) insecure_registries: - http://((nexus_ip)):((nexus_docker_port)) + - http://((nexus_ip)):((nexus_docker_group_port)) - name: docker-build type: docker-image @@ -55,6 +56,7 @@ resources: password: ((nexus_password)) insecure_registries: - http://((nexus_ip)):((nexus_docker_port)) + - http://((nexus_ip)):((nexus_docker_group_port)) - name: docker-hub type: docker-image @@ -183,36 +185,11 @@ jobs: passed: - hadolint trigger: true - #- put: docker-temp - # params: - # build: resource-git - # build_args: - # from: ((nexus_ip)):((nexus_docker_group_port))/centos:7 - - - task: docker-temp-build - privileged: true - config: - platform: linux - image_resource: - type: docker-image - source: - repository: ((nexus_ip)):((nexus_docker_group_port))/amidos/dcind - insecure_registries: - - http://((nexus_ip)):((nexus_docker_group_port)) - inputs: - - name: resource-git - run: - path: sh - args: - - -exc - - | - source /docker-lib.sh - start_docker ((nexus_ip)):((nexus_docker_port)) - - cd resource-git - docker build --build-arg from="((nexus_ip)):((nexus_docker_group_port))/library/centos:7" -t ((nexus_ip)):((nexus_docker_port))/testing . - docker push ((nexus_ip)):((nexus_docker_port))/testing - exit + - put: docker-temp + params: + build: resource-git + build_args: + from: ((nexus_ip)):((nexus_docker_group_port))/library/centos:7 - name: testinfra public: true @@ -345,7 +322,9 @@ jobs: trigger: true - put: docker-temp params: - build: resource-git-dev/ + build: resource-git-dev + build_args: + from: ((nexus_ip)):((nexus_docker_group_port))/library/centos:7 - name: testinfra-dev public: true From 609ce2bebdec769dd2ce9e66d71e4d5cf01245ec Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 30 Jan 2023 17:23:30 +0000 Subject: [PATCH 04/18] CI --- .github/workflows/docker-publish.yml | 96 ++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..ae09886 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,96 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + schedule: + - cron: '16 14 * * *' + push: + branches: [ "master" ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ "master" ] + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Install the cosign tool except on PR + # https://github.com/sigstore/cosign-installer + - name: Install cosign + if: github.event_name != 'pull_request' + uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0 + with: + cosign-release: 'v1.11.0' + + + # Workaround: https://github.com/docker/build-push-action/issues/461 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + + # Sign the resulting Docker image digest except on PRs. + # This will only write to the public Rekor transparency log when the Docker + # repository is public to avoid leaking data. If you would like to publish + # transparency data even for private images, pass --force to cosign below. + # https://github.com/sigstore/cosign + - name: Sign the published Docker image + if: ${{ github.event_name != 'pull_request' }} + env: + COSIGN_EXPERIMENTAL: "true" + # This step uses the identity token to provision an ephemeral certificate + # against the sigstore community Fulcio instance. + run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }} From 93fefef54f0e422336e77e41c8e7587dcd0f3118 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 30 Jan 2023 17:45:42 +0000 Subject: [PATCH 05/18] CI --- .github/workflows/docker-publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index ae09886..b0c3cab 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -23,6 +23,17 @@ env: jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install yamllint + run: pip install yamllint + + - name: Lint YAML files + run: yamllint . + build: runs-on: ubuntu-latest From b589c37fb9adab44d5c9057d8d7930f4cf95ae8d Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 30 Jan 2023 18:14:08 +0000 Subject: [PATCH 06/18] CI --- .github/workflows/docker-publish.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b0c3cab..ae09886 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -23,17 +23,6 @@ env: jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install yamllint - run: pip install yamllint - - - name: Lint YAML files - run: yamllint . - build: runs-on: ubuntu-latest From 4340060418ec647373c6293e59c42e67490682ca Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 30 Jan 2023 18:21:58 +0000 Subject: [PATCH 07/18] CI --- .github/workflows/rubocop.yml | 52 ++++++++++++++++++++++++++++++++++ .github/workflows/yamllint.yml | 15 ++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/rubocop.yml create mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml new file mode 100644 index 0000000..e1f5150 --- /dev/null +++ b/.github/workflows/rubocop.yml @@ -0,0 +1,52 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# pulled from repo +name: "Rubocop" + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '34 17 * * 0' + +jobs: + rubocop: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # If running on a self-hosted runner, check it meets the requirements + # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners + - name: Set up Ruby + uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 + with: + ruby-version: 2.6 + + # This step is not necessary if you add the gem to your Gemfile + - name: Install Code Scanning integration + run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install + + - name: Install dependencies + run: bundle install + + - name: Rubocop run + run: | + bash -c " + bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif + [[ $? -ne 2 ]] + " + + - name: Upload Sarif output + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: rubocop.sarif diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..b04aa0d --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,15 @@ +name: yamllint + +on: push # yamllint disable-line rule:truthy + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install yamllint + run: pip install yamllint + + - name: Lint YAML files + run: yamllint . From bdb4779acb6bbe2ff4badc04468e0ac1f1f29454 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 30 Jan 2023 18:37:23 +0000 Subject: [PATCH 08/18] CI --- .github/workflows/rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index e1f5150..011e228 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 with: - ruby-version: 2.6 + ruby-version: 3.0 # This step is not necessary if you add the gem to your Gemfile - name: Install Code Scanning integration From 3f90cefad6b5c4254de643c978bfeb9de1f975e9 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:10:50 +0000 Subject: [PATCH 09/18] Testing pipeline --- .github/workflows/pull.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/pull.yml diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml new file mode 100644 index 0000000..fa16a38 --- /dev/null +++ b/.github/workflows/pull.yml @@ -0,0 +1,32 @@ +--- +name: Pull + +on: + push: + branches: + - master + tags: + - v*.*.* + pull_request: + branches: + - master + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + yamllint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: yamllint + uses: ibiqlik/action-yamllint@v3 + + hadolint: + stage: linting + image: registry.gitlab.com/pipeline-components/hadolint:latest + script: + - hadolint Dockerfile + + From a98d9ab7fa779831da022a744bdeec58b4efe02e Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:12:02 +0000 Subject: [PATCH 10/18] Testing pipeline --- .github/workflows/pull.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index fa16a38..4d9d0d8 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -1,4 +1,3 @@ ---- name: Pull on: @@ -24,9 +23,9 @@ jobs: uses: ibiqlik/action-yamllint@v3 hadolint: - stage: linting - image: registry.gitlab.com/pipeline-components/hadolint:latest - script: - - hadolint Dockerfile + stage: linting + image: registry.gitlab.com/pipeline-components/hadolint:latest + script: + - hadolint Dockerfile From 9befc2bc94f26343a30691b6daf192de57fe762d Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:21:51 +0000 Subject: [PATCH 11/18] Testing pipeline --- .github/workflows/pull.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 4d9d0d8..d82abdc 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -1,3 +1,4 @@ +--- name: Pull on: @@ -23,9 +24,10 @@ jobs: uses: ibiqlik/action-yamllint@v3 hadolint: - stage: linting - image: registry.gitlab.com/pipeline-components/hadolint:latest - script: - - hadolint Dockerfile - - + runs-on: ubuntu-latest + steps: + - name: Build and scan image + uses: ISID/build-and-scan-image@main + with: + tag: "libvirt" + path: "." From f9e0cb1a06c0ed8e25e40810b3c1fb53c507e668 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:26:31 +0000 Subject: [PATCH 12/18] Testing pipeline --- .github/workflows/pull.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index d82abdc..9b74cc4 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -19,13 +19,16 @@ jobs: yamllint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - name: yamllint uses: ibiqlik/action-yamllint@v3 hadolint: runs-on: ubuntu-latest steps: + - name: Checkout repository + uses: actions/checkout@v3 - name: Build and scan image uses: ISID/build-and-scan-image@main with: From 43f041275f23d15b49d1dc8cdb1b6b31a3afccf7 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:39:32 +0000 Subject: [PATCH 13/18] Testing pipeline --- .github/workflows/pull.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 9b74cc4..3c1c1f9 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -13,7 +13,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: fireblade/libvirt jobs: yamllint: @@ -21,8 +21,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - name: yamllint - uses: ibiqlik/action-yamllint@v3 + - name: Install yamllint + run: pip install yamllint + - name: Lint yaml files + run: yamllint . hadolint: runs-on: ubuntu-latest @@ -34,3 +36,4 @@ jobs: with: tag: "libvirt" path: "." + dockle-severity: FATAL From af9221804afa3c93dc462843c45f79d77f15936a Mon Sep 17 00:00:00 2001 From: Fireblade Date: Fri, 3 Feb 2023 23:50:08 +0000 Subject: [PATCH 14/18] Testing pipeline --- .github/workflows/pull.yml | 35 ++++++++++++++++++++++++++++++++++ .github/workflows/yamllint.yml | 15 --------------- 2 files changed, 35 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/yamllint.yml diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 3c1c1f9..167c131 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -37,3 +37,38 @@ jobs: tag: "libvirt" path: "." dockle-severity: FATAL + + Rubocop: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # If running on a self-hosted runner, check it meets the requirements + # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners + - name: Set up Ruby + uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 + with: + ruby-version: 3.0 + + # This step is not necessary if you add the gem to your Gemfile + - name: Install Code Scanning integration + run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install + + - name: Install dependencies + run: bundle install + + - name: Rubocop run + run: | + bash -c " + bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif + [[ $? -ne 2 ]] + " + + - name: Upload Sarif output + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: rubocop.sarif diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml deleted file mode 100644 index b04aa0d..0000000 --- a/.github/workflows/yamllint.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: yamllint - -on: push # yamllint disable-line rule:truthy - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install yamllint - run: pip install yamllint - - - name: Lint YAML files - run: yamllint . From 99a67a5e98c9e111be910069ce61bfcc2497c783 Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 6 Feb 2023 22:35:51 +0000 Subject: [PATCH 15/18] testing --- .github/workflows/pull.yml | 25 +++++++++++++++++ .github/workflows/rubocop.yml | 52 ----------------------------------- 2 files changed, 25 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/rubocop.yml diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 167c131..0cd4a4b 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -37,6 +37,7 @@ jobs: tag: "libvirt" path: "." dockle-severity: FATAL + trivy-severity: CRITICAL Rubocop: runs-on: ubuntu-latest @@ -72,3 +73,27 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: rubocop.sarif + + rspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v3 + with: + ruby-version: 3.1.3 + bundler-cache: true + - run: bundle exec rake + + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run Shellcheck + uses: ludeeus/action-shellcheck@master + +# build-test: + +# testinfra: + +# docker-build: diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml deleted file mode 100644 index 011e228..0000000 --- a/.github/workflows/rubocop.yml +++ /dev/null @@ -1,52 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# pulled from repo -name: "Rubocop" - -on: - push: - branches: [ "master" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '34 17 * * 0' - -jobs: - rubocop: - runs-on: ubuntu-latest - strategy: - fail-fast: false - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # If running on a self-hosted runner, check it meets the requirements - # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners - - name: Set up Ruby - uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 - with: - ruby-version: 3.0 - - # This step is not necessary if you add the gem to your Gemfile - - name: Install Code Scanning integration - run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install - - - name: Install dependencies - run: bundle install - - - name: Rubocop run - run: | - bash -c " - bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif - [[ $? -ne 2 ]] - " - - - name: Upload Sarif output - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: rubocop.sarif From bb2469c4d11b8123c068e916a73b4de8e7cddf1c Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 6 Feb 2023 22:37:38 +0000 Subject: [PATCH 16/18] testing --- .github/workflows/pull.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 0cd4a4b..4f40e78 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -79,7 +79,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up Ruby - uses: ruby/setup-ruby@v3 + uses: ruby/setup-ruby@v1 with: ruby-version: 3.1.3 bundler-cache: true From 87d20cd031613e4a6323d452ec83995be72b942c Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 6 Feb 2023 22:38:50 +0000 Subject: [PATCH 17/18] testing --- .github/workflows/pull.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 4f40e78..12aee3a 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -83,7 +83,7 @@ jobs: with: ruby-version: 3.1.3 bundler-cache: true - - run: bundle exec rake + - run: bundle exec rspec shellcheck: runs-on: ubuntu-latest From 96275c058e7260f61a5fb1c2b854c553283717db Mon Sep 17 00:00:00 2001 From: Fireblade Date: Mon, 6 Feb 2023 22:54:06 +0000 Subject: [PATCH 18/18] fixes --- .github/workflows/pull.yml | 48 +++++++++++++++++++------------------- .hadolint.yaml | 1 + .pre-commit-config.yaml | 27 --------------------- concourse.yaml | 3 ++- 4 files changed, 27 insertions(+), 52 deletions(-) delete mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 12aee3a..e14e47b 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -1,7 +1,7 @@ --- name: Pull -on: +on: # yamllint disable-line rule:truthy push: branches: - master @@ -45,34 +45,34 @@ jobs: fail-fast: false steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - # If running on a self-hosted runner, check it meets the requirements - # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners - - name: Set up Ruby - uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 - with: - ruby-version: 3.0 + # If running on a self-hosted runner, check it meets the requirements + # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners + - name: Set up Ruby + uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 + with: + ruby-version: 3.0 # This step is not necessary if you add the gem to your Gemfile - - name: Install Code Scanning integration - run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install + - name: Install Code Scanning integration + run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install - - name: Install dependencies - run: bundle install + - name: Install dependencies + run: bundle install - - name: Rubocop run - run: | - bash -c " - bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif - [[ $? -ne 2 ]] - " + - name: Rubocop run + run: | + bash -c " + bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif + [[ $? -ne 2 ]] + " - - name: Upload Sarif output - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: rubocop.sarif + - name: Upload Sarif output + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: rubocop.sarif rspec: runs-on: ubuntu-latest @@ -84,7 +84,7 @@ jobs: ruby-version: 3.1.3 bundler-cache: true - run: bundle exec rspec - + shellcheck: runs-on: ubuntu-latest steps: diff --git a/.hadolint.yaml b/.hadolint.yaml index a58e34c..58c6845 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -1,2 +1,3 @@ +--- trustedRegistries: - docker.io diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 306275b..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -default_language_versions: - python: python3 - -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 - hooks: - - id: check-merge-conflict - - id: check-yaml - - id: forbid-new-submodules - - repo: https://github.com/jumanjihouse/pre-commit-hooks - rev: 2.1.4 - hooks: - - id: markdownlint - - id: rubocop - - repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs - rev: v1.1.1 - hooks: - - id: dockerfile_lint - - repo: https://github.com/IamTheFij/docker-pre-commit - rev: v2.0.0 - hooks: - - id: hadolint - - repo: https://github.com/syntaqx/git-hooks - rev: v0.0.16 - hooks: - - id: circleci-config-validate diff --git a/concourse.yaml b/concourse.yaml index f070e92..7c64ca9 100644 --- a/concourse.yaml +++ b/concourse.yaml @@ -1,4 +1,5 @@ --- +# yamllint disable rule:line-length groups: - name: master jobs: @@ -156,7 +157,7 @@ jobs: start_docker cd resource-git # rake - + - name: shellcheck public: true plan: