zsh in Cloud Linux agents

Answered

Hello. Our build needs zsh to perform some steps. Is zsh available in the Linux Agent images? Can it be added? Thank-you

6 comments
Comment actions Permalink

The official TeamCity agent docker images do not contain zsh, but it is easy to customize the image using docker commit

You can customize the image via the usual Docker procedure:

  1. Run the image (it is necessary to use "-u root" in order to install software)

    docker run -it -e SERVER_URL="<url to TeamCity server>"  \ 
    -u root \ -v <path to agent config folder>:/data/teamcity_agent/conf \ --name="my-customized-agent" \ jetbrains/teamcity-minimal-agent \
  2. Enter the container

    docker exec -it my-customized-agent bash
  3. Change whatever you need

  4. Exit and create a new image from the container:

    docker commit my-customized-agent <the registry where you what to store the image>

For more information, please visit

https://github.com/JetBrains/teamcity-docker-images/blob/master/dockerhub/teamcity-minimal-agent/README.md#customization

0
Comment actions Permalink

Thank-you Eric.

But I was referring to TeamCity Cloud Agents (Linux Small and Linux Medium by now). Can you add zsh to their images? If not will I need to change my scripts to have them use bash?

Thank-you.

0
Comment actions Permalink

Oh, I see. You're referring to the cloud images that are available with the TeamCity Cloud beta program. Sorry for the confusion. I'm told these agent images allow for password-less sudo apt-get operations, so you could add an additional build step to install zsh in the short-term. I was able to get it to work with a command-line build step of:

sudo apt-get update
sudo apt-get install -y zsh
touch ~/.zshrc

You are also welcome to submit a request to have zsh installed by default on our YouTrack site for TeamCity Cloud, https://youtrack.jetbrains.com/issues/TCC.

0
Comment actions Permalink

Hello. I come back to this topic after a while.

Is it possibile to add zsh (and some other stuff) to the default Linux images in TeamCity Cloud? All my build configurations require the following tools, and all my builds use 4 minutes just to install them in the images:

  • zsh (via apt-get)
  • mvn (via apt-get)
  • git-lfs (via apt-get)
  • npm-cli-login (via npm install)

Thank-you.

0
Comment actions Permalink

Hi Federico,

 

we have just added zsh and npm-cli-login to our TeamCity Cloud agent images. They will probably not be available until we push the new images which might take up to a few days. Maven and LFS should have been there for quite some time now, and besides them being installed on the path, maven in particular should be available as a tool so you would have some additional degree of control.

0
Comment actions Permalink

Thank-you a lot. I was not updated about that.

0

Please sign in to leave a comment.