Gitlab亚军显示"命令未找到"即使使用正确的泊坞窗图像

时间:2018-04-03 13:34:25

标签: docker gitlab aws-cli gitlab-ci gitlab-ci-runner

我使用fstab/aws-cli泊坞窗图片在gitlab共享运行程序中运行aws s3 sync命令。

我在Gitlab repo的AWS_ACCESS_KEY_ID部分添加了AWS_SECRET_ACCESS_KEYSecret Variables个变量。 这是.gitlab-ci.yml文件

master:
 type: deploy
 environment: master
 image: fstab/aws-cli
 script:
  - aws s3 sync . s3://aws-website-xxxxxxx --exclude ".git/*" --exclude ".vscode/*" --exclude ".DS_Store/*" --exclude ".DS_Store" --cache-control "max-age=120000" --delete
only:
 - master

但是我收到了这个错误。

Running with gitlab-runner 10.6.0 (a3543a27)
  on docker-auto-scale 4e4528ca
Using Docker executor with image fstab/aws-cli ...
Pulling docker image fstab/aws-cli ...
Using docker image sha256:07971d88854000e2b123d27ae2baf8ffbcb3de299574e767c5c16de9178912f8 for fstab/aws-cli ...
Running on runner-4e4528ca-project-2805534-concurrent-0 via runner-4e4528ca-srm-1522761030-89416d8e...
Cloning repository...
Cloning into '/builds/joyn/soyou-website'...
Checking out 9e4d298b as master...
Skipping Git submodules setup
$ export AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID"
$ export AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY"
$ export AWS_DEFAULT_REGION="us-west-2"
$ aws s3 sync . s3://aws-website-xxxxxxxx --exclude ".git/*" --exclude ".vscode/*" --exclude ".DS_Store/*" --exclude ".DS_Store" --cache-control "max-age=120000" --delete
/bin/bash: line 69: aws: command not found
ERROR: Job failed: exit code 1

无法弄清楚什么是错的。指出问题会有很大帮助。

1 个答案:

答案 0 :(得分:0)