Skip to content

Commit ce3c4e4

Browse files
committedJan 14, 2024
CI: Print summary for outdated modules
Previously we only printed a diff for every module. Now we also print a hacky table with every outdated module.

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
 

‎.github/workflows/main.yml

+14
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ jobs:
3333
- name: Run msync --noop
3434
run: bundle exec msync clone --git-base=https://github.com/
3535
- run: bundle exec rake metadata_deps
36+
outdated_module_summary:
37+
runs-on: ubuntu-latest
38+
name: Prints a list of all modules with outdated modulesync_config version
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Setup ruby
42+
uses: ruby/setup-ruby@v1
43+
with:
44+
ruby-version: 2.7
45+
bundler-cache: true
46+
- name: Run msync --noop
47+
run: bundle exec msync clone --git-base=https://github.com/
48+
- name: Generate summary
49+
run: bundle exec bin/outdated_modules_and_their_version
3650

3751
tests:
3852
needs:
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env ruby
2+
3+
require 'yaml'
4+
require 'erb'
5+
6+
# the current version in modulesync_config
7+
version = YAML.load(ERB.new(File.read('moduleroot/.msync.yml.erb')).result)['modulesync_config_version']
8+
9+
puts "current version: #{version}"
10+
puts '---------------------------------------------'
11+
puts "| Module\t| modulesync_config version |"
12+
puts '---------------------------------------------'
13+
Dir.glob('modules/voxpupuli/puppet-*/.msync.yml').each do|f|
14+
version_module = YAML.load_file(f)['modulesync_config_version']
15+
mod = f.split('/')[2]
16+
puts "| #{mod}\t| #{version_module}\t|" if version != version_module
17+
end

0 commit comments

Comments
 (0)
Please sign in to comment.