Hi!
I’m a n00b, so apologies in advance if this is a dumb question.
I’m trying to create two multi-architecture builds from a singe pipeline (arm and x86) The easiest way I can think of, would be to spin up two machines and build on the separate machines and then use the aws-ecr orb to push both images into aws ecr.
The problem I am having is that it appears that the aws-ecr orb needs to be a job and not a step within the job.
The error I am getting is
`Error calling workflow: 'deploy'Error calling job: 'arm-build'Cannot find a definition for command named aws-ecr/build_and_push_image`.
I have also pasted the config.yml file below. It doesn’t work, but maybe it will give you a hint as to what kind of shenanigans that I’m up to!
Thank you!
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@8.1.2
jobs:
arm-build:
machine:
image: ubuntu-2004:current
resource_class: arm.medium
steps:
- checkout
- aws-ecr/build_and_push_image:
account-url: "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
repo: "${AWS_RESOURCE_NAME_PREFIX}"
region: ${AWS_DEFAULT_REGION}
tag: "arm-${CIRCLE_SHA1}"
x86-build:
machine:
image: ubuntu-2004:current
resource_class: x86.medium
steps:
- checkout
- aws-ecr/build_and_push_image:
account-url: "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
repo: "${AWS_RESOURCE_NAME_PREFIX}"
region: ${AWS_DEFAULT_REGION}
tag: "x86-${CIRCLE_SHA1}"
workflows:
version: 2
deploy:
jobs:
- arm-build
- x86-build