简体   繁体   中英

Jenkins freestyle project running as SYSTEM conversion to Pipeline project

When I run a freestyle project in Jenkins server, here are the first two lines from the logs:

Started by user {username}
Running as SYSTEM

Question: What is SYSTEM referring to here? Is it root user?

I am trying to write pipeline script for the above mentioned freestyle project in Jenkins and here is the first few lines of its log.

Started by user {username}
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/jenkins_home/workspace/test-pipeline

Question: I don't think it is Running as SYSTEM. It must be running as JENKINS user. I see some projects that I am trying to convert from free style to pipeline scripts are failing due to reasons like "acl not found" or "npm install issues". When I run free style projects, they run without any issues. Any idea how I can let the pipeline scripts Run as SYSTEM?

"By default, builds run as the internal SYSTEM user that has full permissions to run on any node, create or delete jobs, start and cancel other builds, etc." See https://www.jenkins.io/doc/book/security/build-authorization/

The "Started by" text is indicating the cause of the job being run, and does not indicate who the job is running as. Examples are "Started by user xxx" means that user xxx pressed a button or caused the event to trigger. Other examples "Push event to branch main", and "Started by timer".

Its a little odd that I only see the "Running as SYSTEM" when the job is submitted by a user from the Jenkins console. But by inserting a couple of debug prints in my automated jobs, it appears they run as the same user as the manually started jobs by default, SYSTEM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM