LoOPS_TeamCity.ipynb
517 lines
| 14.3 KiB
| text/plain
|
TextLexer
In [1]:
from traitlets.config.manager import BaseJSONConfigManager
from os.path import expanduser
home = expanduser("~")
path = home+"/.jupyter/nbconfig"
cm = BaseJSONConfigManager(config_dir=path)
cm.update("livereveal", {
"theme": "solarized",
"transition": "zoom",
"start_slideshow_at": "selected"
});
TeamCity¶
<center>
</center>
Alexis Jeandet <alexis.jeandet@lpp.polytechnique.fr>:
Github:jeandet |
Gitter:jeandet |
IRC@freenode:jeandet
TC quick overview¶
- A powerful distributed Continuous Integration tool
- Rich plugin ecosystem
- Really customizable system
- Not so complex...
- Updates so easy (Compared to redmine...)
- Mostly written in Java
- Closed source :(
- Limited to 100 build cfg & 3 agents
TC Plugins (335 on JetBrains website )¶
- Web Hooks plugin
- AWS S3 Artifact Storage
- Google Cloud Agents
- Docker Cloud
- Debian Package Server
- Slack Build Notifier
Installation as simple as uploading a zip file!
Vocabulary¶
- Agent: where stuff is done
- Build step: the smallest build task subdivision ( example )
- Build config: a collection of build steps ( example )
- VCS root: a mostly a VCS URL + some options ( example )
- Project: a collection of build configs + VCS + settings ( example )
- Meta-Runners: a build config that has been extracted to make a template ( example )
LPP goals (What we want)¶
- Being able to build on different OS
- Build inside a clean environment
- Produce compatibility matrices
- Being faster than Travis
LPP goals (What we want)¶
- Customize workflow
- Give users maximum freedom
LPP Setup¶
<center> </center>
Available build agents¶
- Based on Docker cloud plugin
- Virtually anything that runs either inside Docker or VirtualBox(Vagrant)
- Spawn on demand
- For now Windows, Linux(Fedora, Ubuntu), FreeBSD and Mac OSX 10.12.2(Siera)
FreeBSD & Mac¶
- Vagrant inside Docker
- Few txt files produces several GB machines
- Easy to deploy
- Hard to debug
I want to choose where I get built!¶
Team city introduce the notion of build requirements.
Agents expose parameters(<=> properties). ( sources )
For each build config, ones can declare some requirements that the agent has to match to get spawned.
What about reports?¶
- As build artifact ( LFR, Hephaistos Web, LibCDF )
- As Mail
- As slack message
- As stdout values ( GStreamer Ninja )
- As XML File ( LibCDF GTest )
Interactions with other tools¶
- SonarQube (example, config)
- Slack (example, config)
- Github, Bitbucket, VS Team Services...
- Rhodecode (Miniphare PR, config)
- VS IDE plugin, Eclipse plugin, IntelliJ-based IDEs
API?¶
- Quite easy to understand ( buildTypes, projects )
- Almost everything can be done through API
In [38]:
import teamcity
import json
print(json.dumps(teamcity.tc.projects()[0].__dict__, indent=1))
What Next?¶
- Improve Rhodecode integration
- Boost agents startup time
- Switch to Docker swarm
- More Meta-Runners