Issue/Clarification on "copilot env show" and "copilot job ls" commands #3236
              
                Unanswered
              
          
                  
                    
                      tsingh2k15
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 3 replies
-
| Hello @tsingh2k15. That's a great finding! We do need such kind of enhancement to allow users to use  | 
Beta Was this translation helpful? Give feedback.
                  
                    3 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I am using copilot for services and jobs. I need to check if a copilot job exists in an environment but it seems like there is no support in the existing commands which would allow me to do this. I need more guidance here.
Scenario:
I am trying to deploy two copilot jobs with in same AWS account. This account will have two environments(ECS clusters). Each job will be associated to a different ECS cluster. In my CI/CD pipeline, I need to check if a job already exists in a given environment and create it if it does not exist.
Problem:
I could not achieve this while using
copilot env showcommand as it does not list the jobs for a given environment.I could not achieve this while using
copilot job lscommand as it does not support the environment filter.Please share your thoughts on this. Below is the error I get when try to init the job in the same AWS account but in a different environment(ECS cluster), it says that the job already exists which is true but I intend to create the job in different ECS cluster(environment). Please let me know if this is not clear, I can add more information if needed.
copilot job init --name some-job --job-type 'Scheduled Job' --dockerfile ./Dockerfile_some-jobIt seems like you are trying to init a job that already exists.
To recreate the job, please run:
copilot job delete --name some-jobTo me, it appears that job commands do not support the notion of environment? Looking at the manifest, it seems to be supported there. https://aws.github.io/copilot-cli/docs/manifest/scheduled-job/
Beta Was this translation helpful? Give feedback.
All reactions