-
Notifications
You must be signed in to change notification settings - Fork 414
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
BuildTestCommands-[app]-[env] already exists in stack #1986
Comments
Hi @prisidio-z-bot ! Just to make sure I'm understanding the issue correctly:
Am I understanding it correctly? If you don't mind would you mind copy/pasting your |
Thanks @efekarakus Yes, what you described above is correct. pipeline.yml for
pipeline.yml fo
|
Hello guys,
Any update on this?
Thanks
Ram
From: rmarapp-prisidio <notifications@github.com>
Date: Monday, March 1, 2021 at 12:58 PM
To: aws/copilot-cli <copilot-cli@noreply.github.com>
Cc: bot account <bot-pv@prisid.io>, Mention <mention@noreply.github.com>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
Yes, what you described above is correct.
pipeline.yml for jasper-svc
# This YAML file defines the relationship and deployment ordering of your environments.
# The name of the pipeline
name: pipeline-vault-prisidio-jasper-svc
# The version of the schema used in this template
version: 1
# This section defines the source artifacts.
source:
# The name of the provider that is used to store the source artifacts.
provider: GitHub
# Additional properties that further specifies the exact location
# the artifacts should be sourced from. For example, the GitHub provider
# has the following properties: repository, branch.
properties:
access_token_secret: github-token-vault-jasper-svc
branch: main
repository: https://github.com/prisidio/jasper-svc
# The deployment section defines the order the pipeline will deploy
# to your environments.
stages:
- # The name of the environment to deploy to.
name: dev-local
# Optional: flag for manual approval action before deployment.
# requires_approval: true
# Optional: use test commands to validate this stage of your build.
# test_commands: [echo 'running tests', make test]
- # The name of the environment to deploy to.
name: dev
test_commands:
- echo 'running tests ...'
- export COPILOT_SERVICE_DISCOVERY_ENDPOINT=vault.local
- export COPILOT_APPLICATION_NAME=test
- export COPILOT_ENVIRONMENT_NAME=dev
- export USE_CONFIG_FILE=true
- export COPILOT_SERVICE_NAME=jasper-svc
- gradle test
# Optional: flag for manual approval action before deployment.
# requires_approval: true
# Optional: use test commands to validate this stage of your build.
# test_commands: [echo 'running tests', make test]
…________________________________
pipeline.yml fo jasper-e2e
# This YAML file defines the relationship and deployment ordering of your environments.
# The name of the pipeline
name: pipeline-vault-prisidio-jasper-e2e
# The version of the schema used in this template
version: 1
# This section defines the source artifacts.
source:
# The name of the provider that is used to store the source artifacts.
provider: GitHub
# Additional properties that further specifies the exact location
# the artifacts should be sourced from. For example, the GitHub provider
# has the following properties: repository, branch.
properties:
access_token_secret: github-token-vault-jasper-e2e
branch: main
repository: https://github.com/prisidio/jasper-e2e
# The deployment section defines the order the pipeline will deploy
# to your environments.
stages:
- # The name of the environment to deploy to.
name: dev
test_commands:
- echo "running tests.."
- gradle test
________________________________
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS26CRKJ7MMAAGWBE7HIEITTBPPVBANCNFSM4YKBC2RA>.
|
Hi @prisidio-z-bot @rmarapp-prisidio ! I saw some possibly sensitive values shared above. We'll investigate the issue today, but in the mean time, I'd recommend deleting the existing IAM user and creating a new one with the same permissions to be safe |
Sorry, I'm not following you.. Can you please elaborate? I'm not seeing any user information. My apologies. |
I edited the comments to remove them :), but if you look at the history you can see the values for |
Shoot I will fix it.
Thanks
From: Efe Karakus <notifications@github.com>
Date: Tuesday, March 2, 2021 at 1:00 PM
To: aws/copilot-cli <copilot-cli@noreply.github.com>
Cc: bot account <bot-pv@prisid.io>, Mention <mention@noreply.github.com>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
I edited the comments to remove them :), but if you look at the history you can see the values for AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS26CRM6UVO3WSQGJL3RYJDTBUYTJANCNFSM4YKBC2RA>.
|
Hello, @prisidio-z-bot @rmarapp-prisidio! The second test commands are erroring out because the CodeBuild project names are the same. Unfortunately, we hadn't anticipated this particular use case-- at the moment, the test command name is made up of the app name and the env/stage name, and doesn't include the svc name. As a workaround until we can change this, you can follow these steps to change the project name for the first set of test commands, so when the second one is generated it isn't a duplicate:
Change the value in the
Now, when you run Please let us know how it goes! |
This change gives Copilot pipelines more flexibility, as it enables users to build pipelines that share an app and env, but different repos/svcs or branches. We are seeing that customers want to build multiple pipelines for single apps, and this makes our pipeline functionality more extensible by avoiding overlapping CodeBuild project names. We have [255 characters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-name) to work with, so stringing together `BuildTestCommands-[appName]-[env/stageName]-[repoName]-[branchName]` should be okay. Fixes #1986. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
@prisidio-z-bot @rmarapp-prisidio: Thanks for bringing this bug to our attention. A fix (#2003) will be included in the next release! |
Ok thanks. Will this be part of 1.3?
Thanks
Ram
…________________________________
From: Janice Huang <notifications@github.com>
Sent: Wednesday, March 3, 2021 1:42:49 PM
To: aws/copilot-cli <copilot-cli@noreply.github.com>
Cc: Ram Marappan <ram.marappan@prisid.io>; Mention <mention@noreply.github.com>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
@prisidio-z-bot<https://github.com/prisidio-z-bot> @rmarapp-prisidio<https://github.com/rmarapp-prisidio>:
Thanks for bringing this bug to our attention. A fix (#2003<#2003>) will be included in the next release!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS2346VEAZDGFNRUF63GTQTTB2GLTANCNFSM4YKBC2RA>.
|
1.3 was our latest release, so it'll be in 1.4! 😄 |
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0 |
Ok thanks
Thanks
Ram
…________________________________
From: Efe Karakus ***@***.***>
Sent: Monday, March 15, 2021 4:01:26 PM
To: aws/copilot-cli ***@***.***>
Cc: Ram Marappan ***@***.***>; Mention ***@***.***>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS2346SGJR6NSZAKZSBKGDLTDZYSNANCNFSM4YKBC2RA>.
|
Efe,
Any guidance on issue #2050
Thanks
Ram
From: Efe Karakus ***@***.***>
Date: Monday, March 15, 2021 at 4:01 PM
To: aws/copilot-cli ***@***.***>
Cc: Ram Marappan ***@***.***>, Mention ***@***.***>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS2346SGJR6NSZAKZSBKGDLTDZYSNANCNFSM4YKBC2RA>.
|
For this change to take effect what is that I must do. Must add any settings? Regenerate any files?
Thanks
Ram
From: Ram Marappan ***@***.***>
Date: Monday, March 15, 2021 at 4:02 PM
To: aws/copilot-cli ***@***.***>, aws/copilot-cli ***@***.***>
Cc: Mention ***@***.***>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
Ok thanks
Thanks
Ram
…________________________________
From: Efe Karakus ***@***.***>
Sent: Monday, March 15, 2021 4:01:26 PM
To: aws/copilot-cli ***@***.***>
Cc: Ram Marappan ***@***.***>; Mention ***@***.***>
Subject: Re: [aws/copilot-cli] BuildTestCommands-[app]-[env] already exists in stack (#1986)
This is now released in v1.4.0! https://github.com/aws/copilot-cli/releases/tag/v1.4.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#1986 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AS2346SGJR6NSZAKZSBKGDLTDZYSNANCNFSM4YKBC2RA>.
|
You'd need to re-run |
This change gives Copilot pipelines more flexibility, as it enables users to build pipelines that share an app and env, but different repos/svcs or branches. We are seeing that customers want to build multiple pipelines for single apps, and this makes our pipeline functionality more extensible by avoiding overlapping CodeBuild project names. We have [255 characters](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html#cfn-codebuild-project-name) to work with, so stringing together `BuildTestCommands-[appName]-[env/stageName]-[repoName]-[branchName]` should be okay. Fixes aws#1986. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
I have multiple services in my application. WRT to this issue when I used "test_commands" in more than one svc's pipeline file for the same application I get the "already exists in stack issue" when I run 'pipeline update'
In this case, I have 2 services (following the pattern of [app]-[env]-[svc])
When I added test_commands to the first everything was fine. When I added to the second one and tried running 'pipeline update', I get the error.
The text was updated successfully, but these errors were encountered: