Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureDevOps Build - YAML AWS Connection bug ? #109

Closed
steven-cuthill-otm opened this issue Sep 28, 2018 · 6 comments

Comments

@steven-cuthill-otm
Copy link

commented Sep 28, 2018

Hello,

Believe I have found a bug in the way the YAML build works over the Visual Designer when setting the awsCredentials property to the displayName of the AWS Service Connection i get the following error during build. you can see my YAML build sample below. I suspect that it's expecting the UUID for the connection rather than the name. I have given the connection liberal access rights so i don't think its down to ACL

Job Job1: Step input awsCredentials references service connection Stevens TEMP which could not be found. The service connection does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.

pool:
  vmImage: 'Ubuntu 16.04'

steps:

- task: AmazonWebServices.aws-vsts-tools.AWSPowerShellModuleScript.AWSPowerShellModuleScript@1
  displayName: 'CloudFormation Valadation Test'
  inputs:
    awsCredentials: 'Stevens TEMP'

    regionName: 'eu-west-1'

    filePath: 'build/cf-testScript.ps1'
@steven-cuthill-otm

This comment has been minimized.

Copy link
Author

commented Oct 2, 2018

just bumping this as its a little bit of an issue as its broken our yaml build jobs

@steveataws

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2018

We'll try and schedule some engineer time to take a look but we have next to no knowledge of what 'yaml builds' are right now, nor any idea why or current endpoint definition should not 'just work'.

I wonder if we need to update the version of the vsts-task-lib we build against (currently 2.0.6), but if so we'd need to ensure backwards compatibility with Team Foundation Server 2017.

While we come up to speed on this apsect and do some investigation could you help us out with a step-by-step on how to construct a yaml build? What makes it different from what went before?

@steven-cuthill-otm

This comment has been minimized.

Copy link
Author

commented Oct 2, 2018

@steveataws

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2018

Thanks for the info, I'll check it out.

While looking around myself, I came across this docs page that talks about a System.AccessToken variable which I don't see in your first example. Since endpoints are credentials, it made me wonder if perhaps a different mechanism is used for yaml builds and instead of referring to the endpoint by name (or uuid), maybe it's provided to the yaml build as a token by some other process that your build then needs to 'import'?

@ChastinaLi

This comment has been minimized.

Copy link

commented Oct 17, 2018

@steven-cuthill-otm Just want to help you out here, I ran into the same issue. It turns out that if you didn't include a credentials parameter in the yaml file when you first created the build, it won't start to work when you added the credentials param later on by updating the yaml file.

So, the solution is to delete the build from the VSTS webpage, and re-create it again (WITH the AWSCredentials parameter in your YAML already). And it works like a charm. BUT you need to use the UUID, the name won't work (or it might, I didn't try it, don't have time for that).

I found this from another thread microsoft/azure-pipelines-agent#1809 (comment).

@hunterwerlla

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2019

Looks like a pipelines issue, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.