Files
cups-avahi-airprint/buildspec-manifest.yml
2022-08-02 10:24:44 -06:00

32 lines
1.3 KiB
YAML

version: 0.2
#Buildspec file for AWS Codebuild
#Generates multi-arch manifest
env:
secrets-manager:
DOCKERHUB_PASS: "/dockerhub/credentials:password"
DOCKERHUB_USERNAME: "/dockerhub/credentials:username"
phases:
install:
commands:
- yum update -y
pre_build:
commands:
- echo Logging in to DOCKER...
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS
build:
commands:
- echo Build started on `date`
- echo Building the Docker manifest...
- export DOCKER_CLI_EXPERIMENTAL=enabled
- docker manifest create $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-amd64
- docker manifest annotate --arch arm64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-arm64
- docker manifest annotate --arch amd64 $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:latest-amd64
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...
- docker manifest push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME
- docker manifest inspect $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME