kungl
July 15, 2020, 11:45am
1
Hi,
I cannot upload the application to AWS Beanstalk without deploying if edge: true.
Travis log:
rvm $(travis_internal_ruby) --fuzzy do ruby -S gem uninstall -aIx dpl
Gem 'dpl' is not installed
1.61s$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl --pre
Successfully installed regstry-1.0.15
Successfully installed cl-1.2.4
Successfully installed dpl-2.0.0.beta.3
3 gems installed
Unknown option: --only_create_app_version
failed to deploy
Travis config:
deploy:
- provider: elasticbeanstalk
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
env: *****
app: *****
region: eu-west-1
bucket: *****
bucket_path: *****/$TRAVIS_BRANCH
cleanup: false
only_create_app_version: true
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(feature|release|bugfix|hotfix|epic|refactor).*
As I read the V2 documentation is it possible to use only_create_app_version tag in deploy section.
Could someone help me, please?
That option, indeed, is lacking in v2, but is still documented.
info :login
Aws.config.update(credentials: credentials, region: region)
end
def deploy
@started = Time.now
bucket.create unless bucket.exists?
create_zip unless zip_exists?
upload
create_version
update_app if env?
end
def zip_file
zip_file? ? expand(super) : archive_name
end
def archive_name
"#{label}.zip"
end
At the moment, the decision to deploy the app or not is based on the presence of env
arg; does it make sense to rely solely on this? In other words, are there situations where having env
defined and not deploy the app, or deploy the app without having env
defined? If so, the option should be added to v2; if not, then relying on env
to decide makes sense, and drop this option altogether.
kungl
July 15, 2020, 1:15pm
3
Thank you, it’s solved.
Two months ago, when I wrote this config I got this error when I didn’t defined the env arg.
Missing required option: env
But now it’s possible to run travis without env arg and it’ll upload the application without deploy.