Code Monkey home page Code Monkey logo

Comments (4)

jeffnappi avatar jeffnappi commented on September 3, 2024 3

@ericf89 At the top of your .circleci/config.yml you need to define the executor:
e.g.

orbs:
  aws-ecr: circleci/[email protected]
executors:
  docker_build:
    machine:
      docker_layer_caching: true

Then in your workflow job you can specify the executor:

workflows:
  build_and_push_image:
    jobs:
      - aws-ecr/build_and_push_image:
          executor: docker_build
          account-url: AWS_ECR_ACCOUNT_URL_ENV_VAR_NAME
          aws-access-key-id: ACCESS_KEY_ID_ENV_VAR_NAME
          aws-secret-access-key: SECRET_ACCESS_KEY_ENV_VAR_NAME
          context: myContext
          create-repo: true
          dockerfile: myDockerfile
          path: pathToMyDockerfile
          profile-name: myProfileName
          region: AWS_REGION_ENV_VAR_NAME
          repo: myECRRepository
          tag: myECRRepoTag

My understanding is that Orbs can only be used within workflows.

from aws-ecr-orb.

jeffnappi avatar jeffnappi commented on September 3, 2024

I see that this can be accomplished via executors. Closing this issue, but for anyone looking for information on this you simply need to enable docker_layer_caching in an executor in order to enable it.

from aws-ecr-orb.

ericf89 avatar ericf89 commented on September 3, 2024

@jeffnappi Is this possible at the job level, or only by command? Still trying to figure out the syntax :/

from aws-ecr-orb.

ericf89 avatar ericf89 commented on September 3, 2024

@jeffnappi Awesome! That worked beautifully. Thanks a bunch. 🎉

I was trying to do the something like

    executor: 
        machine: 
             docker_layer_caching: true

in line in the job with no luck. Didn't know you could define those excutors externally.

I think this orb does expose a build-and-push-image command in addition to the build_and_push_image job, so you can use the command in your own job some how. But I've not been able to get that to work either, (aws-cli fails to install, also due to some other executor weirdness I think). But this solves my issue as far as I can tell.

Thanks again!

from aws-ecr-orb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.