Files
cups-avahi-airprint/buildspec.yml
2022-08-11 15:01:43 -06:00

32 lines
1.1 KiB
YAML

version: 0.2
#Generic buildspec file for AWS Codebuild
#Works for both ARM and AMD builds
env:
secrets-manager:
DOCKERHUB_PASS: "/dockerhub/credentials:password"
DOCKERHUB_USERNAME: "/dockerhub/credentials:username"
# variables:
# VERSION: $(cat version.txt)
# exported-variables:
# - VERSION
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 image...
- VERSION=$(cat version.txt)
- docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION .
- docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...
- docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG