I used my company test aws account to initialize copilot with test and a prod env with production aws account.
Here is the simplified manifest.yml
# The manifest for the "core-system" service.
# Read the full specification for the "Load Balanced Web Service" type at:
# https://github.com/aws/copilot-cli/wiki/Manifests#load-balanced-web-svc
# Your service name will be used in naming your resources like log groups, ECS services, etc.
name: core-system
# The "architecture" of the service you're running.
type: Load Balanced Web Service
image:
# Docker build arguments. You can specify additional overrides here. Supported: dockerfile, context, args
build: Dockerfile
# Port exposed through your container to route traffic to it.
port: 80
http:
# Requests to this path will be forwarded to your service.
# To match all requests you can use the "/" path.
path: '/'
# You can specify a custom health check path. The default is "/"
healthcheck: '/healthcheck'
# You can enable sticky sessions.
# stickiness: true
# Number of CPU units for the task.
cpu: 256
# Amount of memory in MiB used by the task.
memory: 512
# Number of tasks that should be running in your service.
count: 1
# Optional fields for more advanced use-cases.
#
variables: # Pass environment variables as key value pairs.
APP_NAME: core-system
secrets:
environments:
test:
variables:
APP_ENV: production
APP_URL: https://dev.core-system.test.url
secrets:
APP_KEY: CORE_TEST_APP_KEY
prod:
variables:
APP_ENV: production
APP_URL: https://dev.core-system.production.url
secrets:
APP_KEY: CORE_APP_KEY
````
name: pipeline-loyal-LUPARG-loyalty
version: 1
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-core-system
branch: master
repository: https://github.com/*/*
stages:
- # The name of the environment to deploy to.
name: 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]
- # The name of the environment to deploy to.
name: prod
# 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]
```
I can successfully deploy from the cli to both test and prod.
But the code pipeline fails due to inccorrect variables and secret in test task definition.
If I remove test from pipeline.yml then prod gets deployed with out any issue.
Somehow test env is not receving the right secrets and variables.
Thanks you for you great work on copilot.
I belive the issue is same https://github.com/aws/copilot-cli/issues/1458
Hello @anish-dcruz, we're working on this issue now this sprint and should be fixed soon!
Heya @anish-dcruz the fixed was released last Friday (10/23) with v0.5.0: https://github.com/aws/copilot-cli/releases/tag/v0.5.0 !
Thanks everyone for the awesome work 馃槏
Most helpful comment
I belive the issue is same https://github.com/aws/copilot-cli/issues/1458