mirror of
https://github.com/nikdoof/cups-avahi-airprint.git
synced 2025-12-13 12:12:24 +00:00
Read VERSION variable and tag
This commit is contained in:
@@ -5,8 +5,10 @@ env:
|
|||||||
secrets-manager:
|
secrets-manager:
|
||||||
DOCKERHUB_PASS: "/dockerhub/credentials:password"
|
DOCKERHUB_PASS: "/dockerhub/credentials:password"
|
||||||
DOCKERHUB_USERNAME: "/dockerhub/credentials:username"
|
DOCKERHUB_USERNAME: "/dockerhub/credentials:username"
|
||||||
exported-variables:
|
variables:
|
||||||
- VERSION
|
VERSION: $(cat version.txt)
|
||||||
|
exported-variables:
|
||||||
|
- VERSION
|
||||||
phases:
|
phases:
|
||||||
install:
|
install:
|
||||||
commands:
|
commands:
|
||||||
@@ -15,17 +17,14 @@ phases:
|
|||||||
commands:
|
commands:
|
||||||
- echo Logging in to DOCKER...
|
- echo Logging in to DOCKER...
|
||||||
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS
|
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASS
|
||||||
#- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
|
|
||||||
build:
|
build:
|
||||||
commands:
|
commands:
|
||||||
- echo Build started on `date`
|
- echo Build started on `date`
|
||||||
- echo Building the Docker image...
|
- echo Building the Docker image...
|
||||||
- docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG .
|
- docker build -t $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION .
|
||||||
- docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG
|
- docker tag $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG
|
||||||
#- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
|
|
||||||
post_build:
|
post_build:
|
||||||
commands:
|
commands:
|
||||||
- echo Build completed on `date`
|
- echo Build completed on `date`
|
||||||
- echo Pushing the Docker image...
|
- echo Pushing the Docker image...
|
||||||
- docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG
|
- docker push $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$VERSION $DOCKERHUB_USERNAME/$IMAGE_REPO_NAME:$IMAGE_TAG
|
||||||
#- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
|
|
||||||
|
|||||||
Reference in New Issue
Block a user