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

ansible: create git repo under binary_tmp user #3733

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions ansible/roles/jenkins-workspace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
user: "binary_tmp"
key: "{{ lookup('file', '/tmp/nodejs-ci.keys') }}"

# Repository needs to be created in /home/iojs/build because the partition with
# free space might be mounted in a way that does not include /home/binary_tmp
- name: Create repository parent directory
file:
path: "{{ home }}/{{ server_user }}/build/"
Expand All @@ -51,22 +49,12 @@

- name: Create repository directory
file:
path: "{{ home }}/{{ server_user }}/build/binary_tmp.git"
path: "~binary_tmp/binary_tmp.git"
state: directory
owner: "binary_tmp"
group: "binary_tmp"
mode: 0755

- name: Link to repository directory from bintmp home
file:
src: "{{ home }}/{{ server_user }}/build/binary_tmp.git"
dest: "~binary_tmp/binary_tmp.git"
state: link
owner: "binary_tmp"
group: "binary_tmp"
follow: false
mode: 0755

- name: Initialize Git repository
become: true
become_user: binary_tmp
Expand Down Expand Up @@ -115,9 +103,11 @@
- name: Disable automatic garbage collection
become: true
become_user: binary_tmp
command: "git config gc.auto 0"
args:
chdir: "~binary_tmp/binary_tmp.git/"
community.general.git_config:
name: gc.auto
file: "~binary_tmp/binary_tmp.git/config"
scope: file
value: 0

- name: Add nodesource signing key
apt_key:
Expand Down