Skip to content

Commit 41eb34d

Browse files
authored
Merge branch 'master' into fix-vulns
2 parents e83b426 + 665f915 commit 41eb34d

File tree

9 files changed

+96
-19
lines changed

9 files changed

+96
-19
lines changed

.github/dependabot.template.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "bundler"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
open-pull-requests-limit: 20
9+
vendor: true
10+
- package-ecosystem: "docker"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+
open-pull-requests-limit: 20
15+
- package-ecosystem: "github-actions"
16+
directory: "/"
17+
schedule:
18+
interval: "daily"
19+
open-pull-requests-limit: 20

.github/dependabot.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5-
1+
# This file was generated by the "Generate Dependabot Glob" action. Do not edit it directly.
2+
# Make changes to `.github/dependabot.template.yml` and a PR will be automatically created.
63
version: 2
74
updates:
8-
- package-ecosystem: "bundler" # See documentation for possible values
9-
directory: "/" # Location of package manifests
5+
- package-ecosystem: bundler
6+
directory: /
107
schedule:
11-
interval: "weekly"
8+
interval: daily
9+
open-pull-requests-limit: 20
10+
vendor: true
11+
- package-ecosystem: docker
12+
directory: /
13+
schedule:
14+
interval: daily
15+
open-pull-requests-limit: 20
16+
- package-ecosystem: github-actions
17+
directory: /
18+
schedule:
19+
interval: daily
20+
open-pull-requests-limit: 20
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Assign Dependabot PR to Compute Foundation Project
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
types: [opened, reopened, labeled]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
jobs:
14+
add-to-project:
15+
name: Add to Compute Foundation Project Board
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/[email protected]
19+
with:
20+
project-url: https://github.com/orgs/github/projects/5753/ # Compute Foundation Project Board
21+
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
22+
labeled: dependencies,external-dependency
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Generate dependabot.yml
3+
4+
on:
5+
push:
6+
repository_dispatch:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
generate:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Generate dependabot.yml
20+
uses: Makeshift/generate-dependabot-glob-action@5cd45385ce6519f68d574aab9699832b3a5e5031 # v1.3.4
21+
22+
- name: Create Pull Request
23+
uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6.0.0
24+
with:
25+
title: '[Automated] Update dependabot.yml'
26+
body: |
27+
This PR was automatically generated by the generate-dependabot.yml workflow.

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
ruby-version: ["2.6"]
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v1
17+
uses: actions/checkout@v4
1818
- name: Build container
1919
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}} --build-arg PUPPET_VERSION=${{env.PUPPET_VERSION}}
2020
- name: Tests
@@ -33,7 +33,7 @@ jobs:
3333
ruby-version: ["2.6"]
3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v1
36+
uses: actions/checkout@v4
3737
- name: Build container
3838
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}} --build-arg PUPPET_VERSION=${{env.PUPPET_VERSION}}
3939
- name: Tests
@@ -52,7 +52,7 @@ jobs:
5252
ruby-version: ["2.6"]
5353
steps:
5454
- name: Checkout code
55-
uses: actions/checkout@v1
55+
uses: actions/checkout@v4
5656
- name: Build container
5757
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}} --build-arg PUPPET_VERSION=${{env.PUPPET_VERSION}}
5858
- name: Tests
@@ -71,7 +71,7 @@ jobs:
7171
ruby-version: ["2.6"]
7272
steps:
7373
- name: Checkout code
74-
uses: actions/checkout@v1
74+
uses: actions/checkout@v4
7575
- name: Build container
7676
run: docker build . --file Dockerfile --tag octocatalog-diff:ruby${{matrix.ruby-version}} --build-arg RUBY_VERSION=${{matrix.ruby-version}} --build-arg PUPPET_VERSION=${{env.PUPPET_VERSION}}
7777
- name: Tests

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
*.gem
3737
fi
3838
- name: Upload gem as action artifact
39-
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
39+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
4040
if: ${{ always() }}
4141
with:
4242
path: ./*.gem

doc/limitations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Testing of Puppet catalogs is faster than running the agent, but you need to be
66

77
octocatalog-diff by default uses the facts reported from a node's more recent Puppet run. If you have made changes to custom facts, catalog testing will **NOT** be an adequate test of whether your custom facts worked. (You can still use octocatalog-diff to help predict changes to nodes based on changes to facts, by overriding facts on the command line.)
88

9-
1. Agents handle depenency ordering and implementation details
9+
1. Agents handle dependency ordering and implementation details
1010

1111
The catalog defines the state of the system, but it's up to the agent to determine how to bring the system to a point that matches the catalog. The agent is responsible for order of operations and actually making the change.
1212

lib/octocatalog-diff/catalog-util/builddir.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def install_enc(logger)
211211
enc_path = File.join(@tempdir, 'enc.sh')
212212
File.open(enc_path, 'w') do |f|
213213
f.write "#!/bin/sh\n"
214-
f.write "cat <<-EOF\n"
214+
f.write "cat <<-'EOF'\n"
215215
f.write enc_obj.content
216216
f.write "\nEOF\n"
217217
end

spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@
796796
testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger)
797797
enc = File.join(testobj.tempdir, 'enc.sh')
798798
expect(File.file?(enc)).to eq(true)
799-
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n")
799+
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n")
800800
end
801801
end
802802

@@ -807,7 +807,7 @@
807807
testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger)
808808
enc = File.join(testobj.tempdir, 'enc.sh')
809809
expect(File.file?(enc)).to eq(true)
810-
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n")
810+
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n")
811811
end
812812
end
813813

@@ -818,7 +818,7 @@
818818
testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger)
819819
enc = File.join(testobj.tempdir, 'enc.sh')
820820
expect(File.file?(enc)).to eq(true)
821-
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\n\nEOF\n")
821+
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\n\nEOF\n")
822822
end
823823
end
824824

@@ -838,7 +838,7 @@
838838
testobj = OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger)
839839
enc = File.join(testobj.tempdir, 'enc.sh')
840840
expect(File.file?(enc)).to eq(true)
841-
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-EOF\n---\nclasses:\n foo: {}\nparameters: {}\n\nEOF\n")
841+
expect(File.read(enc)).to eq("#!/bin/sh\ncat <<-'EOF'\n---\nclasses:\n foo: {}\nparameters: {}\n\nEOF\n")
842842
end
843843
end
844844
end

0 commit comments

Comments
 (0)