takeltau 0.39.11 → 0.40.1
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 +4 -4
- data/lib/takeltau/default.yml +3 -4
- data/lib/takeltau/docker/container/lib.rb +0 -2
- data/lib/takeltau/docker/image/cli.rb +1 -0
- data/lib/takeltau/docker/image/update.rb +6 -5
- data/lib/takeltau/git/lib.rb +3 -1
- data/lib/takeltau/hg/push.rb +1 -1
- data/lib/takeltau/mutagen/check/daemon.rb +6 -15
- data/lib/takeltau/mutagen/socket/create.rb +0 -2
- data/lib/takeltau/mutagen/socket/docker.rb +0 -2
- data/lib/takeltau/version +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46854647c09d7c6cbb355a6ced92549702101bd8cee88d4696836f615b76ce78
|
4
|
+
data.tar.gz: 5941fd6d52c83b8f08b51d4622196582c0e8f001b48a0069adff0269e456fb25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2bdee38bb9d591d3f7ac6abd014c7c19cab47e38e7a87ffcc006460208db226a4b713211eb7b6f5c66ae4dd3212e1cf5c0c84e780e9fbd4abbe85c4dbce4ad7
|
7
|
+
data.tar.gz: 0b98a5637ac3c79256eec09ff53ec2bf73d410c9a7e9596d64bb846f9172c4cef70213b0a95879e8fce5511738c73e50d12cd3956483074bd445741285b0e4ed
|
data/lib/takeltau/default.yml
CHANGED
@@ -14,7 +14,7 @@ cmd_docker_container_docker_exec: 'docker exec %{container} su %{username} -c "L
|
|
14
14
|
cmd_docker_container_stop_container: 'docker stop %{container}'
|
15
15
|
cmd_docker_image_tag_check_docker_images: 'docker images --quiet %{image}'
|
16
16
|
cmd_docker_image_tag_list_docker_images: 'docker images %{docker_user}\/%{docker_repo} --format "{{.Tag}}"'
|
17
|
-
|
17
|
+
cmd_docker_image_update_docker_pull: 'docker pull %{docker_user}/%{docker_repo}:%{docker_tag}'
|
18
18
|
cmd_docker_image_update_docker_remove_dangling: 'docker image prune --force'
|
19
19
|
cmd_git: 'git'
|
20
20
|
cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
|
@@ -46,7 +46,6 @@ cmd_init_lib_git_commit_initial: 'git commit -m "Initial commit"'
|
|
46
46
|
cmd_init_lib_hg_clone: 'bash hgclone'
|
47
47
|
cmd_mutagen: 'mutagen'
|
48
48
|
cmd_mutagen_check_daemon_host_connection: 'mutagen forward list --label-selector="%{hostlabel}"'
|
49
|
-
cmd_mutagen_check_daemon_start_daemon: 'mutagen daemon start'
|
50
49
|
cmd_mutagen_forward_socket_create: 'mutagen forward create --name=%{socketname} --label=%{hostlabel} --label=%{takellabel} docker://%{username}@%{container}:unix:%{containersock} unix:%{hostsock}'
|
51
50
|
cmd_mutagen_forward_socket_docker: 'mutagen forward create --name=%{socketname} --label=%{hostlabel} --label=%{takellabel} --socket-group-source=docker --socket-permission-mode=0660 docker://root@%{container}:unix:/var/run/docker.sock unix:%{hostsock}'
|
52
51
|
cmd_mutagen_forward_socket_check: 'mutagen forward list %{socketname}'
|
@@ -66,11 +65,11 @@ git_hg_branch: 'main'
|
|
66
65
|
info_project_main: 'project.yml'
|
67
66
|
info_project_private: 'private/project.yml'
|
68
67
|
login_wait_for_sockets: '0'
|
69
|
-
mutagen_socket_path_mutagen_container: '~/.mutagen/daemon/daemon.sock'
|
70
|
-
mutagen_socket_path_mutagen_host: '~/.mutagen/daemon/daemon.sock'
|
71
68
|
mutagen_socket_path_docker_host: '/var/run/docker.sock'
|
72
69
|
mutagen_socket_path_gpg_container: '~/.gnupg/S.gpg-agent'
|
73
70
|
mutagen_socket_path_gpg_host: '~/.gnupg/S.gpg-agent'
|
71
|
+
mutagen_socket_path_mutagen_container: '~/.mutagen/daemon/daemon.sock'
|
72
|
+
mutagen_socket_path_mutagen_host: '~/.mutagen/daemon/daemon.sock'
|
74
73
|
mutagen_socket_path_ssh_container: '~/.gnupg/S.gpg-agent.ssh'
|
75
74
|
mutagen_socket_path_ssh_host: '~/.gnupg/S.gpg-agent.ssh'
|
76
75
|
mutagen_socket_takelage_label: 'type=takelage'
|
@@ -8,8 +8,6 @@ module DockerContainerLib
|
|
8
8
|
|
9
9
|
# Create mutagen sockets
|
10
10
|
def _docker_container_lib_start_sockets
|
11
|
-
return false unless mutagen_check_daemon
|
12
|
-
|
13
11
|
mutagen_socket_docker @dockersock_host
|
14
12
|
mutagen_socket_create 'mutagen', @mutagensock_container, @mutagensock_host
|
15
13
|
mutagen_socket_create 'gpg', @gpgsock_container, @gpgsock_host
|
@@ -6,22 +6,23 @@ module DockerImageUpdate
|
|
6
6
|
def docker_image_update
|
7
7
|
return false unless docker_check_daemon
|
8
8
|
|
9
|
-
|
9
|
+
cmd_docker_pull = _docker_image_update_cmd_docker_pull
|
10
10
|
|
11
11
|
cmd_docker_remove_dangling =
|
12
12
|
config.active['cmd_docker_image_update_docker_remove_dangling']
|
13
13
|
|
14
|
-
run_and_exit "#{
|
14
|
+
run_and_exit "#{cmd_docker_pull} && #{cmd_docker_remove_dangling}"
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
# Prepare dpcker pull latest command.
|
20
|
-
def
|
20
|
+
def _docker_image_update_cmd_docker_pull
|
21
21
|
format(
|
22
|
-
config.active['
|
22
|
+
config.active['cmd_docker_image_update_docker_pull'],
|
23
23
|
docker_user: @docker_user,
|
24
|
-
docker_repo: @docker_repo
|
24
|
+
docker_repo: @docker_repo,
|
25
|
+
docker_tag: @docker_tag
|
25
26
|
)
|
26
27
|
end
|
27
28
|
end
|
data/lib/takeltau/git/lib.rb
CHANGED
@@ -33,7 +33,9 @@ module GitLib
|
|
33
33
|
message = 'Update .hg mercurial directories'
|
34
34
|
|
35
35
|
return false unless _git_lib_git_add_hg_dirs
|
36
|
-
|
36
|
+
|
37
|
+
# Do not fail or a clean workspace triggers a return
|
38
|
+
_git_lib_git_commit message
|
37
39
|
|
38
40
|
return true if _git_lib_git_push_origin_hg
|
39
41
|
|
data/lib/takeltau/hg/push.rb
CHANGED
@@ -11,10 +11,7 @@ module MutagenCheckDaemon
|
|
11
11
|
|
12
12
|
log.debug 'Check mutagen status'
|
13
13
|
|
14
|
-
unless
|
15
|
-
log.error 'The mutagen daemon cannot be started'
|
16
|
-
return false
|
17
|
-
end
|
14
|
+
return false unless command_available_else_error? config.active['cmd_mutagen']
|
18
15
|
|
19
16
|
# are we inside a takelage container?
|
20
17
|
unless _docker_container_lib_check_matrjoschka
|
@@ -28,13 +25,13 @@ module MutagenCheckDaemon
|
|
28
25
|
return true
|
29
26
|
end
|
30
27
|
|
31
|
-
unless
|
32
|
-
log.error '
|
28
|
+
unless _file_exists? config.active['mutagen_socket_path_mutagen_container']
|
29
|
+
log.error 'The mutagen socket path in the container is not available'
|
33
30
|
return false
|
34
31
|
end
|
35
32
|
|
36
|
-
unless
|
37
|
-
log.error '
|
33
|
+
unless _mutagen_check_daemon_host_connection
|
34
|
+
log.error 'A mutagen host connection is not available'
|
38
35
|
return false
|
39
36
|
end
|
40
37
|
|
@@ -42,6 +39,7 @@ module MutagenCheckDaemon
|
|
42
39
|
@mutagen_daemon_available = true
|
43
40
|
true
|
44
41
|
end
|
42
|
+
# rubocop:enable Metrics/AbcSize
|
45
43
|
# rubocop:enable Metrics/MethodLength
|
46
44
|
|
47
45
|
private
|
@@ -68,12 +66,5 @@ module MutagenCheckDaemon
|
|
68
66
|
|
69
67
|
true
|
70
68
|
end
|
71
|
-
# rubocop:enable Metrics/AbcSize
|
72
69
|
# rubocop:enable Metrics/MethodLength
|
73
|
-
|
74
|
-
# Start mutagen daemon
|
75
|
-
def _mutagen_check_daemon_start
|
76
|
-
start = try config.active['cmd_mutagen_check_daemon_start_daemon']
|
77
|
-
start.exitstatus.zero?
|
78
|
-
end
|
79
70
|
end
|
@@ -10,8 +10,6 @@ module MutagenSocketCreate
|
|
10
10
|
log.debug "Create the mutagen socket \"#{socketname}\" in the container " \
|
11
11
|
"at \"#{containersock}\" pointing to the host at \"#{hostsock}\""
|
12
12
|
|
13
|
-
return false unless mutagen_check_daemon
|
14
|
-
|
15
13
|
return false if mutagen_socket_check socketname
|
16
14
|
|
17
15
|
socket_created = _mutagen_socket_create_socket(socketname, containersock, hostsock)
|
@@ -10,8 +10,6 @@ module MutagenSocketDocker
|
|
10
10
|
log.debug "Create the mutagen docker socket \"#{socketname}\" in the container " \
|
11
11
|
"pointing to the host at \"#{hostsock}\""
|
12
12
|
|
13
|
-
return false unless mutagen_check_daemon
|
14
|
-
|
15
13
|
return false if mutagen_socket_check socketname
|
16
14
|
|
17
15
|
socket_created = _mutagen_socket_docker_socket(socketname, hostsock)
|
data/lib/takeltau/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.40.1
|