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

aws eks missing when running job and aws --version mismatch #9

Closed
phil-lgr opened this issue May 6, 2019 · 7 comments
Closed

aws eks missing when running job and aws --version mismatch #9

phil-lgr opened this issue May 6, 2019 · 7 comments

Comments

@phil-lgr
Copy link

phil-lgr commented May 6, 2019

A minimal config:

version: 2.1
orbs:
  aws-cli: circleci/aws-cli@0.1.13
  aws-ecr: circleci/aws-ecr@4.0.1
  helm: circleci/helm@0.1.0
workflows:
  version: 2
  build_test_deploy:
    jobs:
      - aws_cli_setup
      - build_test_deploy:
          requires: 
            - aws_cli_setup
jobs:
  build_test_deploy:
    machine: 
      docker_layer_caching: true
    working_directory: ~/repo
    steps:
      - checkout
      - run: aws --version
      - run: aws eks update-kubeconfig --name erp-app-cluster
      - helm/install-helm-client
      - run: helm list
  aws_cli_setup:
    working_directory: ~/repo
    executor: aws-cli/default
    steps:
      - aws-cli/install
      - aws-cli/configure:
          profile-name: circle-ci
          aws-access-key-id: AWS_ACCESS_KEY_ID
          aws-secret-access-key: AWS_SECRET_ACCESS_KEY
          aws-region: AWS_REGION
      - aws-ecr/ecr-login:
          region: AWS_REGION      

the aws_cli_setup job completes but when I run aws eks I get:

Invalid choice: 'eks', maybe you meant:

I don't understand why aws eks is not available with that version of the aws cli...

in the other job, build_test_deploy, - run: aws --version reports a different version, I don't get it :(

image

@phil-lgr
Copy link
Author

phil-lgr commented May 6, 2019

I opened a thread but the CircleCI employee didn't know at the end and recommended I open an issue here: https://discuss.circleci.com/t/orb-circleci-aws-cli-is-not-really-the-aws-cli-eks-command-missing/30240/14

@iynere
Copy link
Contributor

iynere commented May 6, 2019

@phil-lgr are you installing the CLI via the orb in one job, & then attempting to use it in another job ? that won't work, as the version you're installing in the first job won't persist in the second job.

@iynere
Copy link
Contributor

iynere commented May 6, 2019

@phil-lgr can you try running aws eks commands in the same job as that you're running aws-cli/install and aws-cli/configure?

@phil-lgr
Copy link
Author

phil-lgr commented May 6, 2019

ah! then I'm just dumb, how can i run the steps in my main job? the executor are not the same

@iynere
Copy link
Contributor

iynere commented May 6, 2019

that shouldn't matter @phil-lgr

please give it a shot. thanks!

@iynere
Copy link
Contributor

iynere commented May 6, 2019

the aws-cli orb could use some attention in general—there's no reason for us to be publishing an executor at all, when the orb only has commands & not jobs. i'll try to clean it up a bit today. thanks!

@iynere iynere closed this as completed May 6, 2019
@phil-lgr
Copy link
Author

phil-lgr commented May 6, 2019

@iynere thanks a lot, yes I'm not a DevOps God so that part really confused me, it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants