![]() You can see my Dockerfile and docker-compose.yml files in my infrastructure repository. That gave me an image that I could use to run as a TeamCity Build agent. I was able to take the base docker image that JetBrains provides and add the MSBuild tools to it. So I took the opportunity to jump into Docker on Windows (or Windows Containers, or whatever you want to call it). Whether the image was corrupt or what, I don’t know, but it was stuck. I was trying to consolidate VMs onto the new hypervisor, and for one reason or another, the build VM did not want to move nicely. Then I got some updated hardware, specifically a new hypervisor. I left the VM with the build agent running, and it worked. Starting the container again is a bit easier. And then, as quickly as I had started, I quit containerizing. They will be used to configure the teamcity-server container the next time it runs. Running TeamCity on Docker would allow us to use TeamCity without local installation, regardless of operating systems. Then this blog, which is hosted on the same docker server. I started small, with a Linux (Ubuntu) docker server running the Unifi Controller software and the TeamCity server containers. I installed a full-blown copy of Visual Studio Community on the build agent, which provided me the ability to pretty much run any build I wanted.Īs some of my work research turned me towards containers, I realized that this setup is probably a little to heavy, and running some of my support systems (TeamCity, Unifi, etc) in docker makes them much easier to manage and update. However, because I like to have a sandbox in which to play, I have been hosting an instance of TeamCity at home for roughly the same amount of time.Īt first, I went with a basic install on a local VM and put the database on my SQL Server, and spun up another VM (a GUI Windows Server instance) which acted as my build agent. Setup building dependencies in TeamCity and install all dependencies once in one build and move artifacts (node_modules, xvfb etc) somehow to next build which will run tests by timers.I have been using TeamCity for a few years now, primarily as a build tool for some of our platforms at work. I see but can not understand how to put it in my building steps I tried this but TeamCity server was not able to find this agent and agents tab was empty version: "3" More recently, weve also started using Octopus. We use TeamCity as our build and continuous integration server. I was following cypress documentation and aware that special docker images are designed for thatīut they are not compatible with Teamcity server (Teamcity agents need to have a java wrapper) or I dont know how to run them from docker-compose.yml At Xero we have over 60+ testing environments. Developers can specify the builds, run the builds and view the results, which will be introduced later in this tutorial. It basically helps to deliver software with high quality faster and simplier. TeamCity is a CI/CD tool published by JetBrains. In that case I do not need to install it every time I run tests. This is a small tutorial about how to run TeamCity on the docker container. Windows images have the following suffixes in tags: -nanoserver and -windowsservercore. Images TeamCity provides docker images for Linux and Windows containers. to have a docker image compatible with teamcity containing all cypress ENV: node, cypress, xvfb etc. TeamCity docker-compose samples Simple docker compose files to run TeamCity server together with agents.I see 3 ways how to avoid this huge execution time: I do belieave that main heavy dependency are cypress and xvfb packages. apt-get install xvfb libgtk-3-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 (which I need to install extra for linux).This is I need to run for every time I execute tests and it takes around 10 mins to execute each test set taking 60-70% time on installation of all dependencies which are "^8.0.0", Yarn silent -spec "%env.cypress_path_to_landing_pages%" ![]() SERVER_URL= - AGENT_NAME=docker-agent-3Īnd in building steps I am using node:10.18.1 in settings as per screen below:Įxport CYPRESS_CACHE_FOLDER="%env.cypress_cache_path%"Īpt-get update & apt-get -y install libgtk2.0-0 libgtk-3-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb SERVER_URL= - AGENT_NAME=docker-agent-2 ![]() ![]() Image: jetbrains/teamcity-agent:2020.1.2-linux-sudo Image: jetbrains/teamcity-server:2020.1.2 I run teamcity-server with 3 teamcity-agents with the following docker-compose.yml Tests will be run very frequently that is why I am interesting to execute them as quick as possible I want to run my cypress.io tests in CI (Teamcity) by scheduled timers. ![]()
0 Comments
Leave a Reply. |