takeltau 0.43.2 → 0.43.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f155e82696808efbb960be240378c95cf81293a3fc6f8a77b5ebb5b94ec553c
4
- data.tar.gz: bb436721278cf181fcc184f5fcc44b78b571eced96e20fde3db640f9d0598d9a
3
+ metadata.gz: 1effdb4d73aed5fa0951640c5fa19b918982cba11e0b6a5b5460dd77ab5e7aba
4
+ data.tar.gz: b304a9a5c2cbc8d039d3702da6ae6dc6ad5b6949adc82f3082819b476fc99975
5
5
  SHA512:
6
- metadata.gz: 6d2f45c3ef3c0cf310eec89a6b1b59350e270489fd62a8964fa5b1f8f23e1d2a925f93325ca1ecb41cbde589353ceaf1c91033c06aa667727d55af430cdf2764
7
- data.tar.gz: f09ba20dd55601707f26b5b6df6788150887baa296314e83407caa4f22f8b02ef131b713627ac826e65c5611bc8e3f5c2f80451a476d92f03cbff8c13af17948
6
+ metadata.gz: 1754ef934d158c1d6e803f3585729ba0e02ca156f26328d8a8e9cdbd66cd63269c2be924f6f3ced93512d1a609aafdd8f197ecafd190318c6b240e786ff60c92
7
+ data.tar.gz: f9a87e07f7879077f2c29505c1a1e6e20f7be8f0d1df0360cb6bfeb39af7fc6241be7cf9f8356b989422ee9b3749f34fc0d76b7533004596b8afa6cda74eeba6
@@ -79,10 +79,8 @@ ship_hostname: '%{ship_name}_%{unique}'
79
79
  ship_default_project: 'default'
80
80
  ship_env: '--env TAKELSHIP_UPDATE=true'
81
81
  ship_ports: ''
82
- #ship_user: 'takelwerk'
83
- #ship_repo: 'takelship'
84
- ship_user: 'packer_local'
85
- ship_repo: 'takelship-project'
82
+ ship_user: 'takelwerk'
83
+ ship_repo: 'takelship'
86
84
  ship_tag: 'latest'
87
85
  ship_data_dir: 'takelship'
88
86
  ship_takelship_yml: '%{pwd}/%{ship_data_dir}/compose/projects/takelship.yml'
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # tau docker image uppdate
3
+ # tau docker image update
4
4
  module DockerImageUpdate
5
5
  # Backend method for docker image update.
6
6
  def docker_image_update
@@ -48,5 +48,11 @@ module Takeltau
48
48
  def stop
49
49
  Takeltau::ShipProject.new.stop
50
50
  end
51
+
52
+ desc 'update', 'Alias for tau ship container update'
53
+ # tau update: {Takeltau::ShipContainer#update}
54
+ def update
55
+ Takeltau::ShipContainer.new.update
56
+ end
51
57
  end
52
58
  end
@@ -12,6 +12,7 @@ module Takeltau
12
12
  include ShipContainerLib
13
13
  include ShipContainerLogin
14
14
  include ShipContainerPodman
15
+ include ShipContainerUpdate
15
16
 
16
17
  desc 'check [COMMAND]', 'Check takelship container'
17
18
  subcommand 'check', ShipContainerCheck
@@ -39,5 +40,17 @@ module Takeltau
39
40
  def podman(*args)
40
41
  say ship_container_podman args
41
42
  end
43
+
44
+ #
45
+ # ship container update
46
+ #
47
+ desc 'update', 'Update takelship image'
48
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
49
+ Update takelship image
50
+ LONGDESC
51
+ # Update takelship image.
52
+ def update
53
+ ship_container_update
54
+ end
42
55
  end
43
56
  end
@@ -4,6 +4,8 @@
4
4
  module ShipContainerLogin
5
5
  # Run a login command in a takelship
6
6
  def ship_container_login
7
+ return false unless docker_check_daemon
8
+
7
9
  return false unless ship_container_check_existing
8
10
 
9
11
  command_after_login = config.active['cmd_ship_container_login']
@@ -4,6 +4,8 @@
4
4
  module ShipContainerPodman
5
5
  # Run a podman command in a takelship
6
6
  def ship_container_podman(args)
7
+ return false unless docker_check_daemon
8
+
7
9
  return false unless ship_container_check_existing
8
10
 
9
11
  _ship_container_lib_docker "pod podman #{args.join(' ')}"
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # tau ship container update
4
+ module ShipContainerUpdate
5
+ # Update takelship image.
6
+ def ship_container_update
7
+ return false unless docker_check_daemon
8
+
9
+ cmd_docker_pull = _ship_container_update_cmd_docker_pull
10
+
11
+ cmd_docker_remove_dangling =
12
+ config.active['cmd_docker_image_update_docker_remove_dangling']
13
+ run_and_exit "#{cmd_docker_pull} && #{cmd_docker_remove_dangling}"
14
+ end
15
+
16
+ private
17
+
18
+ # Prepare dpcker pull latest command.
19
+ def _ship_container_update_cmd_docker_pull
20
+ ship_user = config.active['ship_user']
21
+ ship_repo = config.active['ship_repo']
22
+ ship_tag = config.active['ship_tag']
23
+ format(
24
+ config.active['cmd_docker_image_update_docker_pull'],
25
+ docker_user: ship_user,
26
+ docker_repo: ship_repo,
27
+ docker_tag: ship_tag
28
+ )
29
+ end
30
+ end
@@ -4,10 +4,12 @@
4
4
  module ShipProjectStart
5
5
  # Start a takelship
6
6
  def ship_project_start(project)
7
- return false if ship_container_check_existing
7
+ return false unless docker_check_daemon
8
8
 
9
9
  return false if _docker_container_lib_check_matrjoschka
10
10
 
11
+ return false if ship_container_check_existing
12
+
11
13
  takelship = _ship_info_lib_get_takelshipinfo
12
14
  project = config.active['ship_default_project'] if project == 'default'
13
15
  project = takelship['default_project'] if project == 'default'
data/lib/takeltau/version CHANGED
@@ -1 +1 @@
1
- 0.43.2
1
+ 0.43.6
data/lib/takeltau.rb CHANGED
@@ -90,6 +90,7 @@ require_relative 'takeltau/ship/container/check/cli'
90
90
  require_relative 'takeltau/ship/info/lib'
91
91
  require_relative 'takeltau/ship/container/login'
92
92
  require_relative 'takeltau/ship/container/podman'
93
+ require_relative 'takeltau/ship/container/update'
93
94
  require_relative 'takeltau/ship/container/cli'
94
95
  require_relative 'takeltau/ship/info/cli'
95
96
  require_relative 'takeltau/ship/project/list'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takeltau
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.2
4
+ version: 0.43.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takelwerk
@@ -292,6 +292,7 @@ files:
292
292
  - lib/takeltau/ship/container/lib.rb
293
293
  - lib/takeltau/ship/container/login.rb
294
294
  - lib/takeltau/ship/container/podman.rb
295
+ - lib/takeltau/ship/container/update.rb
295
296
  - lib/takeltau/ship/info/cli.rb
296
297
  - lib/takeltau/ship/info/lib.rb
297
298
  - lib/takeltau/ship/project/cli.rb