Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke omnibus; add Gemfile.lock #140

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.6, 2.7, 3.1.1]
ruby: [3.0, 3.1, 3.2]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ build-iPhoneSimulator/
/.bundle/
/vendor/bundle
/lib/bundler/man/
Gemfile.lock

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 3.1
NewCops: enable
Exclude:
- 'omnibus/bin/**/*'
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
source 'https://rubygems.org'

gem 'appbundler'
gem 'sugarjar', :path => '.'

group :test do
Expand Down
88 changes: 88 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
PATH
remote: .
specs:
sugarjar (1.0.1)
deep_merge
mixlib-log
mixlib-shellout
pastel

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
chef-utils (18.3.0)
concurrent-ruby
concurrent-ruby (1.2.2)
deep_merge (1.2.2)
diff-lcs (1.5.0)
json (2.7.1)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
mdl (0.13.0)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.1)
mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4)
mixlib-shellout
mixlib-cli (2.1.8)
mixlib-config (3.0.27)
tomlrb
mixlib-log (3.0.9)
mixlib-shellout (3.2.7)
chef-utils
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pastel (0.8.0)
tty-color (~> 0.5)
racc (1.7.3)
rainbow (3.1.1)
regexp_parser (2.8.3)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
ruby-progressbar (1.13.0)
tomlrb (2.0.3)
tty-color (0.6.0)
unicode-display_width (2.5.0)

PLATFORMS
x86_64-linux

DEPENDENCIES
mdl
rspec
rubocop
sugarjar!

BUNDLED WITH
2.5.3
57 changes: 9 additions & 48 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Rolling a release

## Optionally, update Gemfile.lock

* Update gems with `bundle update --all`
* Test to make sure we work with all new deps

## Prep the release

* Update version number in `lib/sugarjar/version.rb`
Expand All @@ -17,54 +22,10 @@
* Build a gem: `gem build sugarjar.gemspec`
* Push the gem: `gem push sugarjar-${version?}.gem`

## Publish omnibus builds

* From omnibus directory, prep: `bundle install --binstubs`

Then from inside each VM:

```shell
# ubuntu-2204 not done because there were vagrant+ssl+netssh issues that
# don't allow the box to come up, but 2004 packages are identical
#
# centos-7 requires building with older ruby (see config/projects/sugarjar.rb)
# so we did it for 0.0.11 but probably will drop it going forward
#
# centos-stream-9 doesn't yet have a bento box (see
# https://github.com/chef/bento/issues/1391)
#
# Fedora has official packages now, so we don't build for that.
distros="ubuntu-2004 ubuntu-2204 debian-11 debian-12 centos-stream-8"
for d in $distros; do
bundle exec kitchen converge default-$d && \
bundle exec kitchen login default-$d && \
bundle exec kitchen destroy default-$d
done
```

1. Do a build...
(for fedora you'll need to `sudo dnf install rpm-build`)

```shell
. load-omnibus-toolchain.sh
[ -e .bundle ] && sudo chown -R vagrant:vagrant .bundle
cd sugarjar/omnibus
bundle install
bin/omnibus build sugarjar && \
bin/omnibus clean sugarjar # required so next build works
```

1. Grab/rename the package out of sugarjar/omnibus/pkg

* Build on a mac

```shell
cd sugarjar/omnibus
bundle install --binstubs
# make /opt/sugarjar and chown it to your user
bin/omnibus build sugarjar && bin/omnibus clean sugarjar
```

## Publish Fedora builds

See `packaging/README.md`.

## Notify Debian/Ubuntu packager

Ping Michel Lind
4 changes: 2 additions & 2 deletions lib/sugarjar/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def self.config
c = DEFAULTS.dup
_find_ordered_files.each do |f|
SugarJar::Log.debug("Loading config #{f}")
data = YAML.safe_load(File.read(f))
data = YAML.safe_load_file(f)
# an empty file is a `nil` which you can't merge
c.merge!(YAML.safe_load(File.read(f))) if data
c.merge!(YAML.safe_load_file(f)) if data
SugarJar::Log.debug("Modified config: #{c}")
end
c
Expand Down
2 changes: 1 addition & 1 deletion lib/sugarjar/repoconfig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.repo_config_path(config)

def self.hash_from_file(config_file)
SugarJar::Log.debug("Loading repo config: #{config_file}")
YAML.safe_load(File.read(config_file))
YAML.safe_load_file(config_file)
end

# wrapper for File.exist to make unittests easier
Expand Down
12 changes: 0 additions & 12 deletions omnibus/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions omnibus/.kitchen.local.yml

This file was deleted.

41 changes: 0 additions & 41 deletions omnibus/.kitchen.yml

This file was deleted.

13 changes: 0 additions & 13 deletions omnibus/Berksfile

This file was deleted.

24 changes: 0 additions & 24 deletions omnibus/Gemfile

This file was deleted.

Loading
Loading