prima-twig 0.50.86 → 0.50.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/twig-feature +57 -46
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc7318b24a6737f7e8c5679e609cdac45447361964546810115e329f756490aa
4
- data.tar.gz: 2f3d5e46fea3d603a9ee1b1a6493656e12de66ccbe7bd6babcc0e81f6a55c2ff
3
+ metadata.gz: ee9d5539b903759405b0e2c0c1713e42124f854667cc7057c2b8b05b287393b6
4
+ data.tar.gz: 5894893814a7b1b32294d3860e25fb3e2c5354d6f99ef7c4a92683e7f7e96382
5
5
  SHA512:
6
- metadata.gz: 232b0e769d114cb25b19c6affe77cb7ca2b7a46c52e06697f36a208fc337c2c027bc066ae1d3e5e2fdc1d0b34edcea57ee3651398e66b0e767a795d4f1175599
7
- data.tar.gz: f8c1a21ee7d99c5c401ebd50dd9a74da847fdbd94503b42aa0f25601db29c121ee1e622843daa4cba5babe9ba173b79733a4163b059e611a08ab3bacf55bd617
6
+ metadata.gz: 8265a6e0414f71e292b31237a22b981f003aad12529f5da95a945166cb8705252e69245cf62494e77c620a7a4267a6d0e8798996612339a76825d3b3e28a6c1e
7
+ data.tar.gz: dfcbd7d999def409bc952f89c37b9772aeb8f1dd55d2cbe42bdde459cf4ce339181fee115147fe07a2877cdc2d289bf3155761e1a3889aec99c3e738a574ff9a
data/bin/twig-feature CHANGED
@@ -904,6 +904,7 @@ class Release
904
904
  @projects.each do |key, value|
905
905
  if key.to_s == 'crash'
906
906
  tags << { key: 'crash', value: @projects['crash'][:name] } if deploy_crash?
907
+ # TODO deploy_starsky_hutch? (magari gestire con un case)
907
908
  else
908
909
  tags << { key: key, value: value[:name] }
909
910
  end
@@ -968,7 +969,7 @@ class Release
968
969
  create_activia_artifact(@projects["activia"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/activia/#{@projects["activia"][:revision]}-qa.tar.gz")
969
970
  create_leftorium_artifact(@projects["leftorium"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/leftorium/#{@projects["leftorium"][:revision]}-qa.tar.gz")
970
971
  create_skynet_artifact(@projects["skynet"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/skynet/#{@projects["skynet"][:revision]}-qa.tar.gz")
971
- create_starsky_artifact(@projects["starsky"][:revision]) unless artifact_exists?('prima-artifacts-encrypted', "microservices/starsky/#{@projects["starsky"][:revision]}-qa.tar.gz")
972
+ create_starsky_artifact(@projects["starsky"][:revision]) unless !deploy_starsky_hutch? || artifact_exists?('prima-artifacts-encrypted', "microservices/starsky/#{@projects["starsky"][:revision]}-qa.tar.gz")
972
973
 
973
974
  wait_for_db_import(db_task) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # dovrebbe essere istantaneo
974
975
 
@@ -1603,48 +1604,50 @@ class Release
1603
1604
  end
1604
1605
  end
1605
1606
 
1606
- stack_name_starsky = "ecs-task-starsky-qa-#{deploy_id}"
1607
- git_checkout_version('starsky', @projects["starsky"][:revision])
1608
- stack_body = IO.read('projects/starsky/deploy/task.yml')
1609
- parameters = [
1610
- {
1611
- parameter_key: "Environment",
1612
- parameter_value: "qa"
1613
- },
1614
- {
1615
- parameter_key: "ReleaseVersion",
1616
- parameter_value: "#{@projects["starsky"][:revision]}"
1617
- },
1618
- {
1619
- parameter_key: "TaskDesiredCount",
1620
- parameter_value: "1"
1621
- },
1622
- {
1623
- parameter_key: "ECSClusterName",
1624
- parameter_value: @ecs_cluster_name
1625
- },
1626
- {
1627
- parameter_key: "ALBShortName",
1628
- parameter_value: "starsky-qa-#{deploy_id}"[0..27]
1629
- },
1630
- {
1631
- parameter_key: "EnvHash",
1632
- parameter_value: deploy_id
1633
- },
1634
- {
1635
- parameter_key: "HostnamePattern",
1636
- parameter_value: "starsky-#{@dns_record_identifier}.qa.colaster.com"
1637
- },
1638
- {
1639
- parameter_key: "HostnamePatternPriority",
1640
- parameter_value: hostname_pattern_priority
1641
- }
1642
- ]
1643
- if stack_exists?(stack_name_starsky)
1644
- cur_version = get_currently_deployed_version(stack_name_starsky)
1645
- update_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["starsky"][:revision])
1646
- else
1647
- create_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role)
1607
+ if deploy_starsky_hutch?
1608
+ stack_name_starsky = "ecs-task-starsky-qa-#{deploy_id}"
1609
+ git_checkout_version('starsky', @projects["starsky"][:revision])
1610
+ stack_body = IO.read('projects/starsky/deploy/task.yml')
1611
+ parameters = [
1612
+ {
1613
+ parameter_key: "Environment",
1614
+ parameter_value: "qa"
1615
+ },
1616
+ {
1617
+ parameter_key: "ReleaseVersion",
1618
+ parameter_value: "#{@projects["starsky"][:revision]}"
1619
+ },
1620
+ {
1621
+ parameter_key: "TaskDesiredCount",
1622
+ parameter_value: "1"
1623
+ },
1624
+ {
1625
+ parameter_key: "ECSClusterName",
1626
+ parameter_value: @ecs_cluster_name
1627
+ },
1628
+ {
1629
+ parameter_key: "ALBShortName",
1630
+ parameter_value: "starsky-qa-#{deploy_id}"[0..27]
1631
+ },
1632
+ {
1633
+ parameter_key: "EnvHash",
1634
+ parameter_value: deploy_id
1635
+ },
1636
+ {
1637
+ parameter_key: "HostnamePattern",
1638
+ parameter_value: "starsky-#{@dns_record_identifier}.qa.colaster.com"
1639
+ },
1640
+ {
1641
+ parameter_key: "HostnamePatternPriority",
1642
+ parameter_value: (hostname_pattern_priority.to_i + 74).to_s
1643
+ }
1644
+ ]
1645
+ if stack_exists?(stack_name_starsky)
1646
+ cur_version = get_currently_deployed_version(stack_name_starsky)
1647
+ update_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role) unless cur_version.include?(@projects["starsky"][:revision])
1648
+ else
1649
+ create_stack(stack_name_starsky, stack_body, parameters, tags, @cf_role)
1650
+ end
1648
1651
  end
1649
1652
 
1650
1653
  stack_name_activia = "ecs-task-activia-qa-#{deploy_id}"
@@ -1850,6 +1853,7 @@ class Release
1850
1853
  wait_for_stack_ready(stack_name_borat) unless stack_ready?(stack_name_borat)
1851
1854
  wait_for_stack_ready(stack_name_activia) unless stack_ready?(stack_name_activia)
1852
1855
  wait_for_stack_ready(stack_name_crash) unless stack_ready?(stack_name_crash) unless !deploy_crash?
1856
+ deploy_starsky_hutch?
1853
1857
 
1854
1858
  update_service_defaults(stack_name_web)
1855
1859
  update_service_defaults(stack_name_consumer)
@@ -1866,10 +1870,9 @@ class Release
1866
1870
  update_service_defaults(stack_name_skynet)
1867
1871
  update_service_defaults(stack_name_leftorium)
1868
1872
  update_service_defaults(stack_name_rachele)
1869
- update_service_defaults(stack_name_starsky)
1873
+ update_service_defaults(stack_name_starsky) unless | !deploy_starsky_hutch?
1870
1874
  update_service_defaults(stack_name_crash) unless !deploy_crash?
1871
1875
 
1872
- starsky_hostname = get_route53_hostname(stack_name_starsky)
1873
1876
  activia_hostname = get_route53_hostname(stack_name_activia)
1874
1877
  assange_hostname = get_route53_hostname(stack_name_assange)
1875
1878
  bburago_hostname = get_route53_hostname(stack_name_bburago)
@@ -1885,6 +1888,7 @@ class Release
1885
1888
  leftorium_hostname = get_route53_hostname(stack_name_leftorium)
1886
1889
  rachele_hostname = get_route53_hostname(stack_name_rachele)
1887
1890
  crash_hostname = get_route53_hostname(stack_name_crash) unless !deploy_crash?
1891
+ starsky_hostname = get_route53_hostname(stack_name_starsky) unless !deploy_starsky_hutch?
1888
1892
 
1889
1893
  # launch_marley ec2_ip_address(asg_stack_name), prima_hostname, borat_hostname
1890
1894
 
@@ -1893,7 +1897,6 @@ class Release
1893
1897
  > Backoffice (Borat) url: https://#{borat_hostname}
1894
1898
  > Urania url: http://#{urania_hostname}:81
1895
1899
  > Bburago url: http://#{bburago_hostname}:83
1896
- > Starsky url: http://#{starsky_hostname}:3001
1897
1900
  > Ermes url: http://#{ermes_hostname}:10002
1898
1901
  > Hal9000 url: http://#{hal9000_hostname}:10031
1899
1902
  > Fidaty url: http://#{fidaty_hostname}:10021
@@ -1907,6 +1910,8 @@ class Release
1907
1910
  projects_text.concat "
1908
1911
  > Crash url: https://#{crash_hostname}" if deploy_crash?
1909
1912
  projects_text.concat "
1913
+ > Starsky url: http://#{starsky_hostname}" if deploy_starsky_hutch?
1914
+ projects_text.concat "
1910
1915
  > RabbitMQ url: http://#{ec2_ip_address(asg_stack_name)}:15672
1911
1916
  > Supervisor url: http://#{ec2_ip_address(asg_stack_name)}:9001
1912
1917
  > Elasticsearch url: http://#{ec2_ip_address(asg_stack_name)}:9200
@@ -2674,6 +2679,12 @@ class Release
2674
2679
  crash_present || leftorium_present
2675
2680
  end
2676
2681
 
2682
+ def deploy_starsky_hutch?
2683
+ starsky_present = !@projects['starsky'].empty? && @projects['starsky'][:name] != 'master' && !@projects['starsky'][:default_branch]
2684
+ hutch_present = !@projects['hutch'].empty? && @projects['hutch'][:name] != 'master' && !@projects['hutch'][:default_branch]
2685
+ starsky_present || hutch_present
2686
+ end
2687
+
2677
2688
  def get_pyxis_version(deploy_id)
2678
2689
  (deploy_id.delete '[a-z0]')[0..9]
2679
2690
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prima-twig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.50.86
4
+ version: 0.50.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino