File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
version : 0.2
2
+
3
+ env :
4
+ secrets-manager :
5
+ DOCKER_HUB_USERNAME : cicd/docker-hub/username
6
+ DOCKER_HUB_PAT : cicd/docker-hub/pat
7
+
2
8
phases :
3
9
install :
4
10
runtime-versions :
5
11
python : 3.11
6
12
commands :
7
13
- pip install cfn-lint
14
+
15
+ pre_build :
16
+ commands :
17
+ - echo Logging in to Docker Hub...
18
+ - echo $DOCKER_HUB_PAT | docker login -u $DOCKER_HUB_USERNAME --password-stdin
19
+
8
20
build :
9
21
# This will build and push the docker image to ECR and package the
10
22
# Cloudformation template to be passed as an Artifact to future pipeline
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 0.2
3
3
env :
4
4
secrets-manager :
5
5
DOCKER_HUB_USERNAME : cicd/docker-hub/username
6
- DOCKER_HUB_PASSWORD : cicd/docker-hub/password
6
+ DOCKER_HUB_PAT : cicd/docker-hub/pat
7
7
8
8
phases :
9
9
install :
@@ -15,7 +15,8 @@ phases:
15
15
pre_build :
16
16
commands :
17
17
- echo Logging in to Docker Hub...
18
- - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
18
+ - echo $DOCKER_HUB_PAT | docker login -u $DOCKER_HUB_USERNAME --password-stdin
19
+
19
20
20
21
build :
21
22
# This should be moved to a shell script if it gets more complicated.
You can’t perform that action at this time.
0 commit comments