From 679743b18ed83aaaca0243dc4778f0fb3e25292a Mon Sep 17 00:00:00 2001 From: Qasim Abdullah <89213175+qasim-at-tci@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:49:02 +0500 Subject: [PATCH 1/5] add nodejs 18 (current LTS) (#1273) * add nodejs 18 (current LTS) * add nodejs20 lambda runtime --------- Co-authored-by: Dominik --- lib/dpl/providers/lambda.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dpl/providers/lambda.rb b/lib/dpl/providers/lambda.rb index 51a8f6b19..a000ffd04 100644 --- a/lib/dpl/providers/lambda.rb +++ b/lib/dpl/providers/lambda.rb @@ -34,8 +34,8 @@ class Lambda < Provider opt '--memory_size MB', 'Amount of memory in MB to allocate to this Lambda', default: 128 opt '--subnet_ids IDS', 'List of subnet IDs to be added to the function', type: :array, note: 'Needs the ec2:DescribeSubnets and ec2:DescribeVpcs permission for the user of the access/secret key to work' opt '--security_group_ids IDS', 'List of security group IDs to be added to the function', type: :array, note: 'Needs the ec2:DescribeSecurityGroups and ec2:DescribeVpcs permission for the user of the access/secret key to work' - opt '--environment VARS', 'List of Environment Variables to add to the function', type: :array, format: /[\w-]+=.+/, note: 'Can be encrypted for added security', alias: :environment_variables - opt '--runtime NAME', 'Lambda runtime to use', note: 'required when creating a new function', default: 'nodejs12.x', enum: %w[nodejs16.x nodejs14.x nodejs12.x python3.8 python3.7 python3.6 python2.7 ruby2.7 ruby2.5 java11 java8 go1.x dotnetcore2.1] + opt '--environment VARS', 'List of Environment Variables to add to the function', type: :array, format: /[\w\-]+=.+/, note: 'Can be encrypted for added security', alias: :environment_variables + opt '--runtime NAME', 'Lambda runtime to use', note: 'required when creating a new function', default: 'nodejs12.x', enum: %w(nodejs20.x nodejs18.x nodejs16.x nodejs14.x nodejs12.x python3.8 python3.7 python3.6 python2.7 ruby2.7 ruby2.5 java11 java8 go1.x dotnetcore2.1) opt '--dead_letter_arn ARN', 'ARN to an SNS or SQS resource used for the dead letter queue.' opt '--kms_key_arn ARN', 'KMS key ARN to use to encrypt environment_variables.' opt '--tracing_mode MODE', 'Tracing mode', default: 'PassThrough', enum: %w[Active PassThrough], note: 'Needs xray:PutTraceSegments xray:PutTelemetryRecords on the role' From 8b6b33b90be20a521268cc652b94ee26b0dad4be Mon Sep 17 00:00:00 2001 From: gbarc-dt <133209247+gbarc-dt@users.noreply.github.com> Date: Tue, 18 Jun 2024 09:31:05 +0200 Subject: [PATCH 2/5] Fix build and add lambda nodejs18 (#1282) * Fix build and add lambda nodejs18 * Update net-http --------- Co-authored-by: AndriiMysko --- .travis.yml | 9 ++++++--- dpl.gemspec | 1 + lib/dpl/ctx/bash.rb | 2 +- lib/dpl/providers/cloudformation.rb | 1 + lib/dpl/providers/codedeploy.rb | 1 + lib/dpl/providers/ecr.rb | 1 + lib/dpl/providers/elasticbeanstalk.rb | 1 + lib/dpl/providers/netlify.rb | 2 +- lib/dpl/providers/opsworks.rb | 1 + lib/dpl/providers/puppetforge.rb | 1 + lib/dpl/providers/s3.rb | 1 + lib/dpl/providers/transifex.rb | 2 +- spec/dpl/ctx/bash_spec.rb | 4 ++-- 13 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6ca2fc41..ac210a665 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ language: ruby rvm: - 3.1 - 3.2 + - 3.3 cache: - bundler @@ -18,14 +19,16 @@ jobs: if: commit_message !~ /skip:test_dependencies/ AND env(SKIP_TEST_DEPENDENCIES) IS blank cache: false install: + - rvm use 3.3 --install --binary --fuzzy - gem build dpl.gemspec - gem install dpl-*.gem - - nvm install 12.22.0 - - nvm use 12.22.0 + - gem update --system + - nvm install 18.20.2 + - nvm use 18.20.2 - node --version script: - .travis/test_install - rvm: 3.1 + rvm: 3.3 - <<: *job language: python python: 2.7 diff --git a/dpl.gemspec b/dpl.gemspec index 0d3f23081..15886ae92 100644 --- a/dpl.gemspec +++ b/dpl.gemspec @@ -21,5 +21,6 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'travis-cl' s.add_runtime_dependency 'travis-packagecloud-ruby' + s.add_runtime_dependency 'net-http', '~> 0.4.1' s.add_development_dependency 'rake', '~> 13.0' end diff --git a/lib/dpl/ctx/bash.rb b/lib/dpl/ctx/bash.rb index 3318cc205..f6bc356a0 100644 --- a/lib/dpl/ctx/bash.rb +++ b/lib/dpl/ctx/bash.rb @@ -212,7 +212,7 @@ def npm_install(package, cmd = package) def pip_install(package, cmd = package, version = nil) ENV['VIRTUAL_ENV'] = File.expand_path('~/dpl_venv') ENV['PATH'] = File.expand_path("~/dpl_venv/bin:#{ENV['PATH']}") - shell 'virtualenv --no-site-packages ~/dpl_venv', echo: true + shell 'virtualenv ~/dpl_venv', echo: true shell 'pip install urllib3[secure]' cmd = "pip install #{package}" cmd << pip_version(version) if version diff --git a/lib/dpl/providers/cloudformation.rb b/lib/dpl/providers/cloudformation.rb index 6ca072ebf..7b023d5df 100644 --- a/lib/dpl/providers/cloudformation.rb +++ b/lib/dpl/providers/cloudformation.rb @@ -12,6 +12,7 @@ class Cloudformation < Provider tbd STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-cloudformation', '~> 1.0' env :aws, :cloudformation diff --git a/lib/dpl/providers/codedeploy.rb b/lib/dpl/providers/codedeploy.rb index 0be7a7ba0..b892d773d 100644 --- a/lib/dpl/providers/codedeploy.rb +++ b/lib/dpl/providers/codedeploy.rb @@ -15,6 +15,7 @@ class Codedeploy < Provider tbd STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-codedeploy', '~> 1.0' gem 'aws-sdk-s3', '~> 1' diff --git a/lib/dpl/providers/ecr.rb b/lib/dpl/providers/ecr.rb index 1ca251ef7..86ab0beff 100644 --- a/lib/dpl/providers/ecr.rb +++ b/lib/dpl/providers/ecr.rb @@ -11,6 +11,7 @@ class Ecr < Provider tbd STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-ecr', '~> 1.0' # gem 'docker-api', '~> 1.34' gem 'json' diff --git a/lib/dpl/providers/elasticbeanstalk.rb b/lib/dpl/providers/elasticbeanstalk.rb index fcef9df94..f659987a2 100644 --- a/lib/dpl/providers/elasticbeanstalk.rb +++ b/lib/dpl/providers/elasticbeanstalk.rb @@ -20,6 +20,7 @@ class Elasticbeanstalk < Provider * Optionally waits until the deployment finishes STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-elasticbeanstalk', '~> 1' gem 'aws-sdk-s3', '~> 1' gem 'rubyzip', '~> 2.3', require: 'zip' diff --git a/lib/dpl/providers/netlify.rb b/lib/dpl/providers/netlify.rb index c96d25a7d..b0a2526a4 100644 --- a/lib/dpl/providers/netlify.rb +++ b/lib/dpl/providers/netlify.rb @@ -11,7 +11,7 @@ class Netlify < Provider tbd STR - node_js '>= 12.0.0' + node_js '>= 18.14.0' npm 'netlify-cli', 'netlify' diff --git a/lib/dpl/providers/opsworks.rb b/lib/dpl/providers/opsworks.rb index 9f6f3a0e0..dfaa0d491 100644 --- a/lib/dpl/providers/opsworks.rb +++ b/lib/dpl/providers/opsworks.rb @@ -13,6 +13,7 @@ class Opsworks < Provider tbd STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-opsworks', '~> 1.0' env :aws, :opsworks diff --git a/lib/dpl/providers/puppetforge.rb b/lib/dpl/providers/puppetforge.rb index a323a57bc..66b970191 100644 --- a/lib/dpl/providers/puppetforge.rb +++ b/lib/dpl/providers/puppetforge.rb @@ -13,6 +13,7 @@ class Puppetforge < Provider tbd STR + gem 'racc', '~> 1.7' gem 'puppet', '~> 7.25', require: 'puppet/face' gem 'puppet-blacksmith', '~> 7', require: 'puppet_blacksmith' diff --git a/lib/dpl/providers/s3.rb b/lib/dpl/providers/s3.rb index 10590f748..9011f0868 100644 --- a/lib/dpl/providers/s3.rb +++ b/lib/dpl/providers/s3.rb @@ -18,6 +18,7 @@ class S3 < Provider tbd STR + gem 'nokogiri', '~> 1.15' gem 'aws-sdk-s3', '~> 1' gem 'mime-types', '~> 3.4.1' diff --git a/lib/dpl/providers/transifex.rb b/lib/dpl/providers/transifex.rb index 945cde489..840718d24 100644 --- a/lib/dpl/providers/transifex.rb +++ b/lib/dpl/providers/transifex.rb @@ -11,7 +11,7 @@ class Transifex < Provider tbd STR - python '>= 2.7', '!= 3.0', '!= 3.1', '!= 3.2', '!= 3.3', '< 3.8' + python '>= 2.7', '!= 3.0', '!= 3.1', '!= 3.2', '!= 3.3', '< 3.12' required :api_token, %i[username password] diff --git a/spec/dpl/ctx/bash_spec.rb b/spec/dpl/ctx/bash_spec.rb index 292989f7a..43a764bec 100644 --- a/spec/dpl/ctx/bash_spec.rb +++ b/spec/dpl/ctx/bash_spec.rb @@ -236,14 +236,14 @@ def self.cmds(cmds) describe 'version req given' do before { bash.pip_install('name', 'cmd', '1.0.0') } - it { is_expected.to call_system 'virtualenv --no-site-packages ~/dpl_venv' } + it { is_expected.to call_system 'virtualenv ~/dpl_venv' } it { is_expected.to call_system 'pip install name==1.0.0' } end describe 'no version req given' do before { bash.pip_install('name', 'cmd') } - it { is_expected.to call_system 'virtualenv --no-site-packages ~/dpl_venv' } + it { is_expected.to call_system 'virtualenv ~/dpl_venv' } it { is_expected.to call_system 'pip install name' } end end From 6ab6bbb1a2aba25d1893c0dd80831f6cf1271238 Mon Sep 17 00:00:00 2001 From: Dominik Date: Tue, 18 Jun 2024 09:57:20 +0200 Subject: [PATCH 3/5] docs: bump version --- lib/dpl/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpl/version.rb b/lib/dpl/version.rb index 0882d5dca..bfe23acf3 100644 --- a/lib/dpl/version.rb +++ b/lib/dpl/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Dpl - VERSION = '2.0.4.beta' + VERSION = '2.0.5.beta' end From 117f2a8df8de0eaa09a4d945b1e1571c00c167cd Mon Sep 17 00:00:00 2001 From: Dominik Date: Thu, 1 Aug 2024 09:30:52 +0200 Subject: [PATCH 4/5] [SUPP 1135] JSON/Heroku dpl errors (#1285) * fix: add missing dependency * chore: bump version --- lib/dpl/providers/heroku.rb | 1 + lib/dpl/version.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/dpl/providers/heroku.rb b/lib/dpl/providers/heroku.rb index 47a9a4ba2..1b1ad4338 100644 --- a/lib/dpl/providers/heroku.rb +++ b/lib/dpl/providers/heroku.rb @@ -8,6 +8,7 @@ class Heroku < Provider abstract gem 'faraday', '~> 1' + gem 'json' gem 'netrc', '~> 0.11.0' gem 'rendezvous', '~> 0.1.3' diff --git a/lib/dpl/version.rb b/lib/dpl/version.rb index bfe23acf3..de1a8ebc8 100644 --- a/lib/dpl/version.rb +++ b/lib/dpl/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Dpl - VERSION = '2.0.5.beta' + VERSION = '2.0.5.beta.1' end From 49e92d1630f839accb9275422afc92336c8c8d8f Mon Sep 17 00:00:00 2001 From: Dominik Date: Wed, 28 Aug 2024 13:12:03 +0200 Subject: [PATCH 5/5] docs: promote version to stable --- lib/dpl/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dpl/version.rb b/lib/dpl/version.rb index de1a8ebc8..ec09d50ee 100644 --- a/lib/dpl/version.rb +++ b/lib/dpl/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Dpl - VERSION = '2.0.5.beta.1' + VERSION = '2.0.5' end