Skip to content

Commit

Permalink
use build_tools ci image directly
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrs975 committed Feb 23, 2024
1 parent 301205d commit acb58ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,23 @@ build_tools:
- build-tools/**/*
tags: ["arch:amd64"]
script:
- cd build-tools && docker buildx build --tag ${TARGET} --push .
- cd build-tools && docker buildx build --tag ${TARGET}:testing-new-ci-image --push .

build_and_deploy_layer:
stage: build_layer
rules:
- if: $CI_PIPELINE_SOURCE == "web"
variables:
CI_ENABLE_CONTAINER_IMAGE_BUILDS: "true"
ROLE_TO_ASSUME: arn:aws:iam::425362996713:role/sandbox-layer-deployer
TARGET: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-lambda-extension
tags: ["arch:amd64"]
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-lambda-extension
artifacts:
paths:
- tmp/serverless/datadog_extension_signed.zip
script:
- mkdir tmp
- git clone --branch ${AGENT_BRANCH} --depth=1 https://github.com/DataDog/datadog-agent.git
- dockerId=$(docker create --platform linux/amd64 ${TARGET})
- docker cp $dockerId:/build_tools .
- EXTERNAL_ID=$(aws ssm get-parameter
--region us-east-1
--name ci.datadog-lambda-extension.externalid
Expand Down
5 changes: 2 additions & 3 deletions build-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ COPY Cargo.lock .
COPY src ./src
RUN cargo build --release

FROM scratch
COPY --from=builder /usr/src/app/target/release/build_tools /build_tools
ENTRYPOINT ["/build_tools"]
FROM 486234852809.dkr.ecr.us-east-1.amazonaws.com/docker:20.10.3
COPY --from=builder /usr/src/app/target/release/build_tools /usr/local/bin/

0 comments on commit acb58ef

Please sign in to comment.