-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildspec.yml
18 lines (18 loc) · 1.04 KB
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: 0.2
phases:
pre_build:
commands:
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- IMAGE_TAG=${COMMIT_HASH:=latest}
- export REPOSITORY_URI=032401129069.dkr.ecr.ca-central-1.amazonaws.com/jhub-open-userimage
build:
run-as: root
on-failure: ABORT |
commands:
- docker build -t $REPOSITORY_URI:$IMAGE_TAG .
- echo "build completed" && echo "authenticating to the ECR repo"
- aws ecr get-login-password --region ca-central-1 | docker login --username AWS --password-stdin 032401129069.dkr.ecr.ca-central-1.amazonaws.com
- echo "authenticating to ECR repo successful. Pushing image to the repo"
- docker push $REPOSITORY_URI:$IMAGE_TAG
- echo "calling github actions for e2e tests"
- curl --location --request POST 'https://api.github.com/repos/balarao/jupyteropen-single-user-image.github.io/actions/workflows/4476169/dispatches' --header 'authorization: token $GITHUB_TOKEN' --header 'Content-Type: application/json' --data-raw '{"event_type":"on-demand"}'