diff --git a/lib/pyxis/checks/tucana_version_match.rb b/lib/pyxis/checks/tucana_version_match.rb index 21a4075..ec7bbed 100644 --- a/lib/pyxis/checks/tucana_version_match.rb +++ b/lib/pyxis/checks/tucana_version_match.rb @@ -12,7 +12,7 @@ def initialize(component_info) end def perform_check! - [sagittarius_version, aquila_version, draco_version, taurus_version].uniq.size == 1 + [sagittarius_version, aquila_version, draco_version, taurus_version, velorum_version].uniq.size == 1 end def status_message @@ -25,6 +25,7 @@ def status_message message << "aquila: #{aquila_version}" message << "draco: #{draco_version}" message << "taurus: #{taurus_version}" + message << "velorum: #{velorum_version}" message.join("\n") end @@ -83,11 +84,28 @@ def taurus_version ) end + def velorum_version + @velorum_version ||= from_uv_lockfile( + Base64.decode64( + GithubClient.octokit.contents( + Project::Velorum.github_path, + path: 'uv.lock', + ref: executed_component_info[:velorum] + ).content + ) + ) + end + def from_cargo_lockfile(lockfile) toml = TomlRB.parse(lockfile, symbolize_keys: true) toml[:package].find { |package| package[:name] == 'tucana' }[:version] end + def from_uv_lockfile(lockfile) + toml = TomlRB.parse(lockfile, symbolize_keys: true) + toml[:package].find { |package| package[:name] == 'tucana' }[:version] + end + def executed_component_info @executed_component_info ||= component_info.execute end diff --git a/lib/pyxis/commands/components.rb b/lib/pyxis/commands/components.rb index adfcdfb..43f9f0e 100644 --- a/lib/pyxis/commands/components.rb +++ b/lib/pyxis/commands/components.rb @@ -41,6 +41,7 @@ def info method_option :sagittarius_sha, desc: 'Commit SHA of sagittarius to build', type: :string method_option :sculptor_sha, desc: 'Commit SHA of sculptor to build', type: :string method_option :taurus_sha, desc: 'Commit SHA of taurus to build', type: :string + method_option :velorum_sha, desc: 'Commit SHA of velorum to build', type: :string def build assert_executed_by_known_team_member! @@ -50,6 +51,7 @@ def build sagittarius: options[:sagittarius_sha], sculptor: options[:sculptor_sha], taurus: options[:taurus_sha], + velorum: option[:velorum_sha], }.compact pipeline = Pyxis::Services::CreateReticulumBuildService.new(version_overrides).execute diff --git a/lib/pyxis/commands/internal.rb b/lib/pyxis/commands/internal.rb index cea104d..f3bb06c 100644 --- a/lib/pyxis/commands/internal.rb +++ b/lib/pyxis/commands/internal.rb @@ -84,10 +84,10 @@ def check_canary_release severity = check.pass? ? :info : :error - Pyxis::DiscordClient.new.send_notification(check.status_message, severity) - puts check.status_message + Pyxis::DiscordClient.new.send_notification(check.status_message, severity) + exit(false) unless check.pass? end end diff --git a/lib/pyxis/project/base.rb b/lib/pyxis/project/base.rb index 5e8ef65..d332d17 100644 --- a/lib/pyxis/project/base.rb +++ b/lib/pyxis/project/base.rb @@ -32,7 +32,7 @@ def component_name end def self.components - %i[aquila draco sagittarius sculptor taurus] + %i[aquila draco sagittarius sculptor taurus velorum] end def self.get_project(project) diff --git a/lib/pyxis/project/velorum.rb b/lib/pyxis/project/velorum.rb new file mode 100644 index 0000000..4d50e82 --- /dev/null +++ b/lib/pyxis/project/velorum.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +module Pyxis + module Project + class Velorum < Base + class << self + def paths + { + github: 'code0-tech/velorum', + gitlab: 'code0-tech/development/velorum', + } + end + end + end + end +end