Bitbucket管道部署到Elasticbeanstalk-上传问题-未反映出更改

时间:2019-03-20 10:14:00

标签: node.js amazon-s3 bitbucket amazon-elastic-beanstalk bitbucket-pipelines

伙计们,我在部署到Elasticbeanstalk时遇到问题。似乎在运行管道时,它只是复制了s3存储桶中的现有zip文件。尝试了各种方案,但仍得到相同的结果。

    image: node:10.15.1

    pipelines:
      default:
     - step:
            name: EBS deployment
            deployment: test
   script:
    - pipe: atlassian/aws-elasticbeanstalk-deploy:0.2.5
    variables:
    AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
    AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
    AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
    APPLICATION_NAME: 'applicationXYZ'
    COMMAND: 'upload-only'
    ENVIRONMENT_NAME: 'Test'
    ZIP_FILE: 's3://applicationXYZ-elasticbeanstalk-deployment/applicationXYZ-app.zip'
    S3_BUCKET: 'applicationXYZ-elasticbeanstalk-deployment'
    DEBUG: 'TRUE'

我成功运行了管道,但是存储桶中创建的新文件与旧文件完全相同,但是版本名称不同。我检查了所做的更改是否已反映在新的zip文件中,但是很遗憾,该更改与原始zip相同。

Status: Downloaded newer image for bitbucketpipelines/aws-elasticbeanstalk-deploy:0.2.5

INFO: Uploading to s3 bucket: applicationXYZ-elasticbeanstalk-deployment...

Completed 680.3 KiB/32.7 MiB (860.5 KiB/s) with 1 file(s) remaining

Completed 8.7 MiB/32.7 MiB (9.7 MiB/s) with 1 file(s) remaining Completed 16.7 MiB/32.7 MiB (17.5 MiB/s) with 1 file(s) remaining Completed 24.7 MiB/32.7 MiB (24.6 MiB/s) with 1 file(s) remaining Completed 32.7 MiB/32.7 MiB (30.7 MiB/s) with 1 file(s) remaining

copy: s3://applicationXYZ-elasticbeanstalk-deployment/applicationXYZ-app.zip to s3://applicationXYZ-elasticbeanstalk-deployment/applicationXYZ-102-eb15a3fd.zip

✔ Artifact uploaded successfully to s3://applicationXYZ-elasticbeanstalk-deployment/applicationXYZ-102-eb15a3fd.zip

感谢您的支持!

1 个答案:

答案 0 :(得分:0)

S3有一个versioning system(检查是否未激活),如果上传的文件具有相同的名称S3,请为其创建一个版本,而不创建一个新文件。 作为一种技巧,并检查文件是否正确上传,请尝试对其进行重命名(例如添加时间戳)