Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow _daemon_ user to run sudo #46

Merged
merged 12 commits into from
May 15, 2024
2 changes: 1 addition & 1 deletion .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
chmod +x tests/integration/pre_run_script.sh
./tests/integration/pre_run_script.sh"
extra-arguments: |
--kube-config ${GITHUB_WORKSPACE}/kube-config
--kube-config=${GITHUB_WORKSPACE}/kube-config
modules: '["test_agent_k8s.py"]'
1 change: 1 addition & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CVE-2023-45288
Thanhphan1147 marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions jenkins_agent_k8s_rock/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ run-user: _daemon_
parts:
jenkins:
plugin: nil
build-packages:
- sudo
overlay-packages:
- bash
- ca-certificates-java
- default-jre-headless
- git
- sudo
override-prime: |
craftctl default
/bin/bash -c "mkdir -p --mode=775 var/{lib/jenkins,lib/jenkins/agents,log/jenkins}"
Expand All @@ -38,3 +41,5 @@ parts:
override-prime: |
craftctl default
/bin/bash -c "chown -R 584792:584792 $CRAFT_PRIME/var/{lib/jenkins,log/jenkins}"
echo "_daemon_ ALL=NOPASSWD: ALL" >> $CRAFT_PRIME/etc/sudoers
visudo -c
Loading