File tree Expand file tree Collapse file tree
lib/pyxis/managed_versioning Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,13 +111,14 @@ def find_container_version(jobs)
111111 job = jobs . find { |job | job [ 'name' ] == 'generate-environment' }
112112 return build_id if job . nil? # fallback to build_id if job not found
113113
114- env = GitlabClient . client . get (
115- "/api/v4/projects/#{ Project ::Reticulum . api_gitlab_path } /jobs/#{ job [ 'id' ] } /artifacts/.gitlab/ci/env "
114+ trace = GitlabClient . client . get (
115+ "/api/v4/projects/#{ Project ::Reticulum . api_gitlab_path } /jobs/#{ job [ 'id' ] } /trace "
116116 )
117- env . body
118- . lines
119- . find { |line | line . start_with? ( 'RETICULUM_CONTAINER_VERSION=' ) }
120- . split ( '=' ) [ 1 ] . chomp
117+ trace . body
118+ . lines
119+ . drop_while { |line | !( line . include? ( 'section_start' ) && line . include? ( 'glpa_summary' ) ) }
120+ . find { |line | line =~ /RETICULUM_CONTAINER_VERSION=[0-9a-zA-Z-.]+$/ }
121+ . split ( '=' ) [ 1 ] . chomp
121122 end
122123 end
123124 end
You can’t perform that action at this time.
0 commit comments