Skip to content
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
20 changes: 19 additions & 1 deletion lib/pyxis/checks/tucana_version_match.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lib/pyxis/commands/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/pyxis/commands/internal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/pyxis/project/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions lib/pyxis/project/velorum.rb
Original file line number Diff line number Diff line change
@@ -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
Loading