Project

General

Profile

Feature #3573

Getting user data in deployment project

Added by Vadim 12 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
RapidDeploy - 5.0-FIX
Start date:
06/17/2020
Due date:
% Done:

0%

Estimated time:
Affects Version:
RapidDeploy - 5.0-FIX
Timesheet Code:
Additional version details:
5.0.24

Description

Hello.

Am not sure if I didn't ask this question in our conversations, but faced again and don't get answer in manuals. Is it possible to get out the user data (name, e-mail, etc.) inside the task? I mean the user that triggered task execution. It could be great to get it during task execution to be able to inform user about the task fail for example. At this time I have to pass user e-mail from the outside.

Best regards,
Vadim.


Related issues

Related to RapidDeploy-Community - Feature #3561: Getting error information in job Failure branchClosedVadim06/02/2020

Actions
#1

Updated by Rafael 12 months ago

  • Assignee set to Rafael
  • Target version set to 5.0-FIX
#2

Updated by Rafael 12 months ago

  • Status changed from New to Feedback
  • Assignee changed from Rafael to Vadim

Hi Vadim,

This is indeed related to #3561 as the best approach would be to use one of our web services.

You can retrieve the information of a certain user with a GET request to the following URL:

http://HOSTNAME:PORT/MidVision/ws/user/USER_NAME

There's some more information here:

http://docs.midvision.com/LATEST/reference/api/ws/user/listUser.html

And a full list of web services here:

http://docs.midvision.com/LATEST/reference/api/web-services-api.html

The limitation here comes to where you can get the user name from. You can obviously send it from Jenkins to RapidDeploy, but it would be much more elegant to have it already in the RapidDeploy orchestration.

We already provide a list of built-in variables you can use in your deployments:

http://docs.midvision.com/LATEST/project/built-in-variables.html

But the RapidDeploy user name is not one of them - don't mix it with "${USER_NAME}" that's the OS user.

Mariano is now investigating if there's an easy way of retrieving this information and making it available in the orchestration. If so, we will implement this new feature, although I can't confirm you yet.

I'll keep you posted with any update on this, although you can already call the web service with a user name sent from Jenkins.

Cheers!

Rafa

#3

Updated by Rafael 10 months ago

  • Status changed from Feedback to In Progress
  • Assignee changed from Vadim to Rafael
#4

Updated by Rafael 9 months ago

  • Tracker changed from Support to Feature
  • Status changed from In Progress to Resolved
  • Assignee changed from Rafael to Vadim

Hi Vadim,

Along with #3561, this feature was finally implemented! :-)

It will be released with RapidDeploy 5.0.24, but you can already think about the best approach to use it.

The same way as with #3561 you can use the "REST Service Call" task to retrieve the user information with a GET call to the following URL:

http://HOSTNAME:PORT/MidVision/ws/user/${JOB_USER}

In this case you need to use the "${JOB_USER}" built-in variable in the orchestration as specified here:

http://docs.midvision.com/5.0.24-SNAPSHOT/project/built-in-variables.html

This REST call needs authentication, so you would need a configuration in the "REST Service Call" task such as this:

restServiceURL = http://localhost:9090/MidVision/ws/user/${JOB_USER}
headerParamsSplitRegex = ,
headerKeyValueSplitRegex = :
headerParamsValue = Authorization:bXZhZG1pbjp7X01WQEVOQyNffVdHLzFmNVMreVpRPQ==

Please bear in mind you need to set all the "header" resources in order for the task to apply the headers during the call.

And remember you can also pass the ${JOB_USER} variable along the job plan to other future projects using the "Set Job Plan Variable" and the "Get Job Plan Variable" tasks.

I hope this is useful for you, and remember all feedback is very welcome to us! :-)

Cheers!

Rafa

#5

Updated by Vadim 9 months ago

Hi Rafael.

Thank You very much! That looks great! :) Will be waiting for this feature to test it.

Best regards,
Vadim.

#6

Updated by Rafael 8 months ago

  • Additional version details set to 5.0.24
#7

Updated by Rafael 8 months ago

  • Status changed from Resolved to Marked for Closure

Hi Vadim,

RapidDeploy 5.0.24 is already out, if you don't have anything else to add in this ticket we'll just close it in a few days time. :-)

Cheers!

Rafa

#8

Updated by Rafael 8 months ago

  • Status changed from Marked for Closure to Closed

Also available in: Atom PDF