semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.
https://semaphoreui.com
MIT License
10.14k stars 1.03k forks source link

Repository pull issue when multiple project. #1795

Open cubesky opened 5 months ago

cubesky commented 5 months ago

I'm using semaphoreui/semaphore:latest docker image.

I have two Project.

One is Yog Container Updater, it use cubesky/AnsibleForYogServer (Private Git) as repository.

Second is MAA Yog, it use cubesky/AnsibleForMAA (Private Git) as repository.

When Semaphore starts up, start a job in Yog Container Updater is no issue, when I switch to MAA Yog and run a job, then back to Yog Container Updater to run a job, it will pull cubesky/AnsibleForMAA and say it doesn't find playbook.

Logcat (Replace my git server as example.com)

1:05:56 AM
Task 2147483551 added to queue
1:05:57 AM
Started: 2147483551
1:05:57 AM
Run TaskRunner with template: 重新启动帕鲁服务器
1:05:57 AM
Preparing: 2147483551
1:05:58 AM
Warning: Permanently added 'example.com' (ED25519) to the list of known hosts.
1:05:59 AM
Updating Repository git@example.com:cubesky/AnsibleForYogServer.git
1:06:00 AM
Warning: Permanently added 'example.com' (ED25519) to the list of known hosts.
1:06:01 AM
From example.com:cubesky/AnsibleForMAA
1:06:01 AM
* branch master -> FETCH_HEAD
1:06:01 AM
Already up to date.
1:06:01 AM
installing static inventory
1:06:01 AM
No collections/requirements.yml file found. Skip galaxy install process.
1:06:01 AM
No roles/requirements.yml file found. Skip galaxy install process.
1:06:02 AM
ERROR! the playbook: restart-palworld.yml could not be found
1:06:02 AM
Running playbook failed: exit status 1

You can see it output the right repository AnsibleForYogServer first and then say it from AnsibleForMAA and failed.

cubesky commented 5 months ago

When I have two different repository in two projects. The last edited repo is used by all projects.

If I edit project 1, then other project will use project 1 repo and failed.

cubesky commented 5 months ago

I found that they clone into the same folder.

Repo 1

2:08:07 PM
Task 2147483465 added to queue
2:08:07 PM
Started: 2147483465
2:08:07 PM
Run TaskRunner with template: Restart PalWorld Server
2:08:07 PM
Preparing: 2147483465
2:08:07 PM
Cloning Repository git@example.com:cubesky/AnsibleForYogServer.git
2:08:07 PM
Cloning into 'repository_1_4'...
2:08:08 PM
Warning: Permanently added 'example.com' (ED25519) to the list of known hosts.
2:08:09 PM
installing static inventory
2:08:10 PM
Starting galaxy collection install process
2:08:10 PM
Process install dependency map
2:08:20 PM
Starting collection install process

Repo 2

5:14:32 PM
Task 2147483459 added to queue
5:14:32 PM
Started: 2147483459
5:14:32 PM
Run TaskRunner with template: HotUpdate MAA Resources
5:14:32 PM
Preparing: 2147483459
5:14:32 PM
Cloning Repository git@example.com:cubesky/AnsibleForMAA.git
5:14:32 PM
Cloning into 'repository_1_4'...
5:14:33 PM
Warning: Permanently added 'example.com' (ED25519) to the list of known hosts.
5:14:34 PM
installing static inventory
5:14:34 PM
No collections/requirements.yml file found. Skip galaxy install process.
5:14:34 PM
No roles/requirements.yml file found. Skip galaxy install process.

They all clone into the same repository_1_4