Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
container build and related files (CO-2566)
skoranda committed Dec 16, 2022
1 parent 974b5c1 commit 8739956
Showing 21 changed files with 2,971 additions and 0 deletions.
39 changes: 39 additions & 0 deletions aws_buildspec.yml
@@ -0,0 +1,39 @@
version: 0.2

env:
shell: bash
variables:
LABEL: "1.1.0"
exported-variables:
- LABEL

phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/u0z2s2z8
- echo Logging in to Docker Hub
- docker login --username skoranda --password $HUB_DOCKER_COM_TOKEN
- echo Logging in to GitHub
- docker login --username skoranda --password $GITHUB_COM_TOKEN
build:
commands:
- echo Build started on `date`
- container/build.sh --image_registry=public.ecr.aws --repository=u0z2s2z8 --label=$LABEL --suffix=$CODEBUILD_BUILD_NUMBER match all
- container/build.sh --image_registry=docker.io --repository=comanageproject --label=$LABEL --suffix=$CODEBUILD_BUILD_NUMBER match all
- container/build.sh --image_registry=ghcr.io --repository=cilogon --label=$LABEL --suffix=$CODEBUILD_BUILD_NUMBER match all
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker images to AWS public repository...
- docker push public.ecr.aws/u0z2s2z8/comanage-match:$LABEL-basic-auth-$CODEBUILD_BUILD_NUMBER
- docker push public.ecr.aws/u0z2s2z8/comanage-match:$LABEL-mod_auth_openidc-$CODEBUILD_BUILD_NUMBER
- docker push public.ecr.aws/u0z2s2z8/comanage-match:$LABEL-shibboleth-sp-supervisor-$CODEBUILD_BUILD_NUMBER
- echo Pushing the Docker images to Docker Hub public repository...
- docker push docker.io/comanageproject/comanage-match:$LABEL-basic-auth-$CODEBUILD_BUILD_NUMBER
- docker push docker.io/comanageproject/comanage-match:$LABEL-mod_auth_openidc-$CODEBUILD_BUILD_NUMBER
- docker push docker.io/comanageproject/comanage-match:$LABEL-shibboleth-sp-supervisor-$CODEBUILD_BUILD_NUMBER
- echo Pushing the Docker images to GitHub public repository...
- docker push ghcr.io/cilogon/comanage-match:$LABEL-basic-auth-$CODEBUILD_BUILD_NUMBER
- docker push ghcr.io/cilogon/comanage-match:$LABEL-mod_auth_openidc-$CODEBUILD_BUILD_NUMBER
- docker push ghcr.io/cilogon/comanage-match:$LABEL-shibboleth-sp-supervisor-$CODEBUILD_BUILD_NUMBER
24 changes: 24 additions & 0 deletions aws_buildspec_develop.yml
@@ -0,0 +1,24 @@
version: 0.2

env:
shell: bash

phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/u0z2s2z8
- echo Logging in to Docker Hub
- docker login --username skoranda --password $HUB_DOCKER_COM_TOKEN
build:
commands:
- echo Build started on `date`
- SHORT_COMMIT_HASH="${CODEBUILD_RESOLVED_SOURCE_VERSION:0:8}"
- container/build.sh --image_registry=public.ecr.aws --repository=u0z2s2z8 --label=develop-$SHORT_COMMIT_HASH --suffix=$CODEBUILD_BUILD_NUMBER match all
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker images to AWS public repository...
- docker push public.ecr.aws/u0z2s2z8/comanage-match:develop-$SHORT_COMMIT_HASH-basic-auth-$CODEBUILD_BUILD_NUMBER
- docker push public.ecr.aws/u0z2s2z8/comanage-match:develop-$SHORT_COMMIT_HASH-mod_auth_openidc-$CODEBUILD_BUILD_NUMBER
- docker push public.ecr.aws/u0z2s2z8/comanage-match:develop-$SHORT_COMMIT_HASH-shibboleth-sp-supervisor-$CODEBUILD_BUILD_NUMBER

0 comments on commit 8739956

Please sign in to comment.