Feature request: allow usage of variables in password fields

What I currently do is to create a project for a set of projects that belong to the same category. Each configuration is actually a new repository with a custom project (but belonging to the same company part to which I map a project in Continua CI).

I want to be able to define GitHub credentials on project level (in this case company part) so I can reuse that in all 4 configurations (representing separate projects). I also use a lot of Update github status actions:

1) When build starts => Update pending
2) When build fails (try / catch) => Update failed
3) When test succeeds => Update success
4) When test fails => Update failed

Therefore I need to manage the same api key over 4 * 4 configurations = 16 times. It would be great to make this a variable in case this key changes in the future.

Hi Geert,

You can currently use variables in the Access Token and Password for the Update GitHub Status action. We just don’t show any indication that you can or provide the intellisense drop down. We’ll look into making this more useable, perhaps with a “show password” option so that you can see what you are typing and enabling the intellisense when this option is selected.

You’ll also be happy to know that we have been working on an Update GitHub Status event handler which you can add to a configuration and specify the response for all these events in one dialog.

Thanks, seems to work great. Maybe I did something wrong when I tested it.

“You’ll also be happy to know that we have been working on an Update GitHub Status event handler which you can add to a configuration and specify the response for all these events in one dialog.”

Is this available in the latest (March 21st) release?

No, it’s in an upcoming release. We should have a beta available in a few weeks.

I think I found a bug related to this issue. Everything I save changes to the stages, the token is being removed (thus I need to set the tokens every time I update my stages). If you want I can show you on my machine.

Hi Geert,

We have not been able to replicate this. Can you list the steps taken before the saving the stage and losing the access token e.g. are you editing fields for this or other actions?

Note if you open the action dialog then click on the lock icon next to the access token, then the input box will appear blanked out for editing. If you then save without locking the field then a blank access token will be saved. This is by design. We never return the saved password from the server for display. If you relock the field then the access token should remain unchanged when you save.

Everytime I change anything. For example, you told me that you fixed the issue with the logging and already completed executables (logging was delayed). So I updated Continua CI to the latest version and removed the duplicate call to GitVersion (was my workaround). Then I ran the build and it failed on unit tests (where I update the GitHub status based on success / failure). It was missing the token again (and I have set it quite a few times already).

What might be a hint is that I think it was a copied action in the list. So maybe it is something like this:

1) Create action with github
2) Copy the action
3) Now fill in the GitHubToken on both

— save and exit stage editor

4) Run the build => all works
5) Edit a stage by adding an action

— githubtoken of copied item lost

Hi Geert,

Unfortunately I didn't get the same results when I followed your steps (and variations of them). The access token did not get lost and both actions ran sucessfully. 

However if I do the following:

1) Add one "Update GitHub Status" action and enter all details including access token.
2) Save stages and refresh page
3) Copy the first "Update GitHub Status" action 
4) Save 

The access token is not copied to the new "Update GitHub Status" action in this case. This is because we don't have a copy of it in the browser once the page is refreshed.

I think it is OK that password fields are not copied to new actions. The problem is that the new action shows a lock which implies that the access token has been copied even when it has not. I'll look into changing this. 

This does not neccessary fix the problem you are experiencing though. Can you try following the steps again to see if you can reproduce the issue?






 

I will try to reproduce. Note that the whole configuration is copied as well (I have a base configuration which I clone and I just have to modify a few variables to make it work).

I did a full new project + configuration today, and the issue rises again. It is always on the stage called “Test”. Maybe that might be part of the culprit?

Hi Geert, let’s schedule a remote session next week so we can try to figure out what is causing this. Dave & I spent some time on this yesterday and the only situation we found was when copying/pasting actions. When copying actions in the stage editor, the password fields are not copied for existing actions, since they are not available (we never send password values back to the stage editor). It’s not entirely obivious that is what is happening, so we are looking at ways to alert the user to that fact.

In the new configuration I never copied anything (even how tempting it was) to make sure that wasn’t the issue. I will send you an email to schedule an appointment.

Hi Geert,

We managed to replicate this issue today. It occurred when updating a stage with child actions with password fields. The latest download v1.0.0.3078 includes the fix.

Tested and confirmed fixed. Thanks!