Я пытаюсь настроить Jenkins
конвейер, и в качестве первого шага я пытаюсь построить, пометить и добавить /usr/local/bin/aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 865995624483.dkr.ecr.us-west-2.amazonaws.com/superhero-match/superhero-suggestions
изображение Docker
в AWS ECR
. Первое, что я делаю в конвейере, - это запускаю следующую команду, которая регистрирует меня в AWS
, однако она терпит неудачу - *1005*.
Это вывод, который я получаю:
Started by GitHub push by superhero-match
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/superhero-suggestions
No credentials specified
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/superhero-match/superhero-suggestions.git # timeout=10
Fetching upstream changes from https://github.com/superhero-match/superhero-suggestions.git
> git --version # timeout=10
> git fetch --tags --progress -- https://github.com/superhero-match/superhero-suggestions.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 35bbac997033e99e5ba0dddbe91c238058f196db (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 35bbac997033e99e5ba0dddbe91c238058f196db # timeout=10
Commit message: "Update README file"
> git rev-list --no-walk d03cc8f5f051018338493b844606710ba982da3c # timeout=10
[superhero-suggestions] $ /bin/sh -xe /tmp/jenkins7240644465665447873.sh
+ docker login --username AWS --password-stdin 865995624483.dkr.ecr.us-west-2.amazonaws.com/superhero-match/superhero-suggestions
+ /usr/local/bin/aws ecr get-login-password --region us-west-2
Unable to locate credentials. You can configure credentials by running "aws configure".
Error: Cannot perform an interactive login from a non TTY device
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Но когда я запускаю точно такую же команду из терминала, она прекрасно работает.
Я использую AWS-CLI v2
.