I recently installed OneDev for a personal code vault and I am loving it and it's CI. However, I cannot get the "Publish Site" build step to work in any repo. It always fails with Site publish is prohibited by current job executor. I know that the "sites" feature of OneDev isn't well documented, but this error message is not documented at all. :(
I set up a test repository with only two files: index.html (with some arbitrary text) and onedev-buildspec.yml, both in ROOT, to attempt to publish a site. I have yet to have any pipeline with the "Publish Site" build step to succeed.
15:38:09 No job executor defined, auto-discovering...
15:38:10 Discovered job executor type: Server Docker Executor
15:38:10 Pending resource allocation...
15:38:10 Executing job (executor: auto-discovered, server: 127.0.0.1:5710, network: auto-discovered-8-8-0)...
15:38:10 Setting up job cache...
15:38:10 Copying job dependencies...
15:38:10 Running step "Checkout"...
15:38:10 Checking out code...
15:38:10 Switched to branch 'main'
15:38:10 Branch 'main' set up to track remote branch 'main' from 'origin'.
15:38:10 Step "Checkout" is successful (0 seconds)
15:38:10 Running step "Publish"...
15:38:10 Step "Publish" is failed: (0 seconds) Site publish is prohibited by current job executor
I am running OneDev 8.1.1 in a Docker container (no swarm) on Ubuntu. I am using the embedded database and I do not have any connected agents.
Any pointers would be appreciated! Please let me know if I need to provide any more information. Thank you!
Robin Shen commented 1 year ago
By default site publishing is disabled to prevent XSS attach on untrusted CI jobs. To enable it, define an executor in menu `Administration / Job Executors' and tick the publish site feature. Then configure your job to use that job executor.
Alex H commented 1 year ago
This worked flawlessly. Definitely something worth putting in the Docs for this feature when that gets written. 😉
I recently installed OneDev for a personal code vault and I am loving it and it's CI. However, I cannot get the "Publish Site" build step to work in any repo. It always fails with
Site publish is prohibited by current job executor
. I know that the "sites" feature of OneDev isn't well documented, but this error message is not documented at all. :(I set up a test repository with only two files:
index.html
(with some arbitrary text) andonedev-buildspec.yml
, both in ROOT, to attempt to publish a site. I have yet to have any pipeline with the "Publish Site" build step to succeed.Here is the contents of
onedev-buildspec.yml
:And the resulting logs of the failed build:
I am running OneDev 8.1.1 in a Docker container (no swarm) on Ubuntu. I am using the embedded database and I do not have any connected agents.
Any pointers would be appreciated! Please let me know if I need to provide any more information. Thank you!