From 02f30bc430864b5b8d9518ab4a8561572b3d6421 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Mon, 21 Oct 2024 21:09:17 +0300 Subject: [PATCH] apps: base: maintenance-git-dotfiles: job: Simplify. --- apps/base/maintenance-git-dotfiles/job.yaml | 29 +++++++++++---------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/apps/base/maintenance-git-dotfiles/job.yaml b/apps/base/maintenance-git-dotfiles/job.yaml index 75c054e43..e4abb8088 100644 --- a/apps/base/maintenance-git-dotfiles/job.yaml +++ b/apps/base/maintenance-git-dotfiles/job.yaml @@ -16,22 +16,23 @@ spec: restartPolicy: Never containers: - command: - - nsenter - - --target - - "1" - - --mount - - --uts - - --ipc - - --net - - --pid - - --no-fork - /bin/sh - - -l - -c - - sudo --chdir=$WORKSPACE --user=oleg --login bash -ic 'git pull --rebase origin master' - env: - - name: WORKSPACE - value: /home/oleg/.local/share/chezmoi + - | + args=( + --target "1" + --mount + --uts + --ipc + --net + --pid + --no-fork + --setuid 1000 + --setgid 997 + --wd /home/oleg/.local/share/chezmoi + git pull --rebase origin master + ) + nsenter "$args[@]" image: docker-registry.wugi.info/library/util-linux-with-udev name: refresh resources: