Skip to content
Snippets Groups Projects
Commit dfc52765 authored by Fabio Pitino's avatar Fabio Pitino
Browse files

Merge branch 'sh-add-user-ip-pvs' into 'master'

Add user IP data to external pipeline validation service

See merge request gitlab-org/gitlab!62438
parents 512838e7 410b7bce
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -74,7 +74,9 @@ required number of seconds.
"id": { "type": "integer" },
"username": { "type": "string" },
"email": { "type": "string" },
"created_at": { "type": ["string", "null"], "format": "date-time" }
"created_at": { "type": ["string", "null"], "format": "date-time" },
"current_sign_in_ip": { "type": ["string", "null"] },
"last_sign_in_ip": { "type": ["string", "null"] }
}
},
"pipeline": {
Loading
Loading
Loading
Loading
@@ -89,7 +89,9 @@ def validation_service_payload
id: current_user.id,
username: current_user.username,
email: current_user.email,
created_at: current_user.created_at&.iso8601
created_at: current_user.created_at&.iso8601,
current_sign_in_ip: current_user.current_sign_in_ip,
last_sign_in_ip: current_user.last_sign_in_ip
},
pipeline: {
sha: pipeline.sha,
Loading
Loading
Loading
Loading
@@ -32,7 +32,9 @@
"id": { "type": "integer" },
"username": { "type": "string" },
"email": { "type": "string" },
"created_at": { "type": ["string", "null"], "format": "date-time" }
"created_at": { "type": ["string", "null"], "format": "date-time" },
"current_sign_in_ip": { "type": ["string", "null"] },
"last_sign_in_ip": { "type": ["string", "null"] }
}
},
"pipeline": {
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@
 
RSpec.describe Gitlab::Ci::Pipeline::Chain::Validate::External do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:user) { create(:user, :with_sign_ins) }
 
let(:pipeline) { build(:ci_empty_pipeline, user: user, project: project) }
let!(:step) { described_class.new(pipeline, command) }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment