Environment
Jira standalone 8.20.10
Authorization to Jira via User Token
jira-ruby version: 2.2.0, 2.3.0
Bundler 2.4.12
Steps
- run job on Gitlab at the and of April 2023
- jira-ruby try to connect to Jira
options = {
:site => ENV['JIRA_URL'],
:context_path => '',
:auth_type => :jwt,
:default_headers => { 'Authorization' => "Bearer #{ENV['JIRA_ACCESS_TOKEN']}" }
}
client = JIRA::Client.new(options)
...
jql = "PROJECT = '#{project_name}' AND fixVersion = '#{jira_version}'"
issues = client.Issue.jql(jql) # <----------------------------------------------------- EXCEPTION!
Expect
Successful connection and JQL Response
Actual
bundler: failed to load command: fastlane (/builds/...-App/...-app-android/vendor/ruby/3.0.0/bin/fastlane)
/builds/...-App/...-app-android/vendor/ruby/3.0.0/gems/jira-ruby-2.3.0/lib/jira/request_client.rb:13:in `request': Unauthorized (JIRA::HTTPError)
from /builds/...-App/...-app-android/vendor/ruby/3.0.0/gems/jira-ruby-2.3.0/lib/jira/client.rb:306:in `request'
from /builds/...-App/...-app-android/vendor/ruby/3.0.0/gems/jira-ruby-2.3.0/lib/jira/client.rb:279:in `get'
from /builds/...-App/...-app-android/vendor/ruby/3.0.0/gems/jira-ruby-2.3.0/lib/jira/resource/issue.rb:80:in `jql'
from /builds/...-App/...-app-android/vendor/ruby/3.0.0/gems/jira-ruby-2.3.0/lib/jira/base_factory.rb:31:in `block (2 levels) in delegate_to_target_class'
What have I already checked
Token is valid (checked by curl)
JQL is valid (checked by curl)
Connection between GitLab and Jira (checked by curl)
Has anyone encountered this problem?
Environment
Jira standalone 8.20.10
Authorization to Jira via User Token
jira-ruby version: 2.2.0, 2.3.0
Bundler 2.4.12
Steps
Expect
Successful connection and JQL Response
Actual
What have I already checked
Token is valid (checked by
curl)JQL is valid (checked by
curl)Connection between GitLab and Jira (checked by
curl)Has anyone encountered this problem?