Code Monkey home page Code Monkey logo

teamcity-runas-plugin's Introduction

runAs plugin for

When building, testing, and deploying an application with TeamCity, you may need to run a build under a specific user account, different from the one used to run the build agent.

The teamcity-runas plugin can be used to run TeamCity build steps under a specified user account on Windows, Mac or Linux. See Wiki for more information:

See also announcement blog post.

Supported TeamCity versions:

The plugin is compatible with TeamCity 10.0 and later.

Build Status on Public TeamCity Server

Download

License

JetBrains runAs plugin for TeamCity is under the Apache License.

Contributors

teamcity-runas-plugin's People

Contributors

andrefmrocha avatar burnasheva avatar julia-alexandrova avatar kir avatar kirill-c9k avatar mikekidya avatar nikolaypianikov avatar orybak avatar pavelsher avatar vladrassokhin avatar yaegor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teamcity-runas-plugin's Issues

Temporary Directory Is Created As root Without Write Permissions

Either I'm doing something really dumb, or RunAs plugin is unusable when you need to use temporary directory. The directory is created as root:root with 755 permissions, which makes build impossible to save anything.

Work directory is also inaccessible, so running e.g. php composer produces:

[14:16:12]	[Step 2/2]   [RuntimeException]                                                                                        
[14:16:12]	[Step 2/2]   /opt/jetbrains/TeamCity/buildAgent/work/f613c80626aaf1ff/vendor does not exist and could not be created.  

Maven issue

When running a Maven step under RunAs, the step fails if a system property or environment variable has multi-line entry. Note: Maven passes system.* properties automatically to Maven.

Our failed build had three Nuget feeds defined in the system property and we got the following error:

[14:56:08][Step 1/1] Usage: java [-options] class [args...]
[14:56:08][Step 1/1] (to execute a class)
[14:56:08][Step 1/1] or java [-options] -jar jarfile [args...]
[14:56:08][Step 1/1] (to execute a jar file)
[14:56:08][Step 1/1] where options include:
[14:56:08][Step 1/1] -d32 use a 32-bit data model if available
[14:56:08][Step 1/1] -d64 use a 64-bit data model if available
[14:56:08][Step 1/1] -server to select the "server" VM
[14:56:08][Step 1/1] The default VM is server.
[14:56:08][Step 1/1]
[14:56:08][Step 1/1] -cp <class search path of directories and zip/jar files>
[14:56:08][Step 1/1] -classpath <class search path of directories and zip/jar files>
[14:56:08][Step 1/1] A ; separated list of directories, JAR archives,
[14:56:08][Step 1/1] and ZIP archives to search for class files.
...
...
...
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.
[14:56:08][Step 1/1] 'http:' is not recognized as an internal or external command,
[14:56:08][Step 1/1] operable program or batch file.

Due to newlines in the property, Windows assumed it is a command and tried to run HTTP command (the Nuget feed start with http://feedurl). We resolved this by clearing the property in the build. We don't see this error when running without RunAs.

Plugin added; "Run As" options not visible

I'm struggling to add this plugin to TeamCity 10.0.2 (build 42234). I built the plugin and then manually added teamcity-plugin.xml to generated zip package (without that, TC complains about it missing).

The plugin is unpacekd and visible in the plugin list:

image

yet there are no options related to it, neither in Build Step nor in Build Features.

Is there something I need to do in order to enable the plugin?

Admin UI

Add ability to turn off an interaction via - configuration via agent's config are available in this case

Selected archive doesn't contain teamcity-plugin.xml file.

Getting this error when trying to upload the plugin .zip file to TeamCity. Have tried uploading from a windows and a Mac machine. I also verified the .xml file is present in the directory and it is, so I'm not sure why this error is being thrown. TeamCity version TeamCity professional 2018.2.4

No runAs in build features

Installed plugin according to procedure described on wiki.
Can see it in plugins list

runAs Provides an ability to run builds under the specified Windows user account snapshot-20181204082407 JetBrains, s.r.o. /plugins/runAs.zip
runAs
Provides an ability to run builds under the specified Windows user account
snapshot-20181204082407 	[JetBrains, s.r.o.](https://www.jetbrains.com/) 	<TeamCity Data Directory>/plugins/runAs.zip

But there is no runAs in building features.
Tried to set teamcity.runAs.ui.enabled=true , it didn't work

TeamCity Professional 2022.04.1 (build 108575)
CentOS Linux release 7.9.2009

Add ability to configure list of credentials per agent

Each agent has special folder "runAs".
It contains a set of files, for example: user.xml, administrator.xml.

Each file has properies, for example user.xml could contain:
username: RunAsUser
Password: abc

The name of file is the unique id for the specified credentials.

Also each agent have ordinary configuration parameters:
run_as_mode = custom | predefined | enabled(default) | disabled
run_as_credentials_directory

TeamCity has read only configuration parameter for project "runas_credentials"

Enhance RunAs GUI

  1. Provide ability to change integrity level via drop down.
  2. Provide ability to change log level via drop down.
  3. If possible provide drop down menu for other RunAs commandline options.

Use `mktemp` instead `tempfile`

For some non-debian-based OS has got the error 'tempfile: command not found', so we should use mktemp instead for cross-linux compatibility

runas plugin not working

Hi Team,

I recently enabled teamcity runas plugin and it is giving below error.

Followed procedure from :https://blog.jetbrains.com/teamcity/2017/09/introducing-teamcity-runas-plugin/?_ga=2.39319331.149853038.1597123377-452707039.1581600791

I have also installed socat in my SUSe machine as my agent not running as root user

zypper install socat
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
socat

1 new package to install.
Overall download size: 200.0 KiB. After the operation, additional 566.0 KiB will be
used.
Continue? [y/n/? shows all options] (y): y
Retrieving package socat-1.7.0.0-1.18.2.x86_64 (1/1), 200.0 KiB (566.0 KiB unpacked)
Retrieving: socat-1.7.0.0-1.18.2.x86_64.rpm [done]
Installing: socat-1.7.0.0-1.18.2 [done]

OS version is :SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 4

TeamCity version and build number
2018.2 (60925)

[04:26:26] Step 1/1: property files cleanup (Command Line)
[04:26:26] [Step 1/1] RunAs is not enabled
[04:26:26] [Step 1/1] RunAs is not enabled

RunAs not listed in build features

Plugin version
image

Internal property
image

TeamCity Server version
image

Missing build feature
image

I have installed the most recent version I could find. I can't see the RunAs option listed in the build feature dropdown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.