Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Space Whale
Nov 6, 2014
I'm extremely interested in this and somewhat experienced in using it, but not at all in setting it up. Since I'm the only one who cares enough to do this where I work at present, I figure I'll learn about it, and get it happening. And since CoC is where we talk about stuff, I figured i'd ask the people here who have done it how to not suck at it.

Also, I didn't see a thread for this yet!

Everyone knows about git these days, and a lot of people even use it. One awesome thing git lets you do is set up a branch that will, when code is pushed to it, trigger a build and deployment! This helps out with testing, catching bugs, making sure things are checked in properly, and make it that much harder for poo poo to sneak into production. It also means you can get real slick and script out stuff so I press a button and spin up a VM with a test db (with test data, or old real data!) and a test server and other test things and if I break poo poo being a cute cheeky idiot in my sandbox, nothing else is broken, whee!

I'm a C#/.NET/MVC/~full stack~ guy. Everything is windows this IIS that. We use bitbucket as our git repo host. What are my (GOOD) options to set this up? Which ones have which advantages? Is this a thing I can do in powershell or do I really need to get and configure something complicated?

Finally, how hard is it to arm-twist management if we have outside IT into in-housing it or just getting really chummy? We literally share an open floor with our IT/hosing company, so it shouldn't be a huge barrier, but if I understand this correctly, this is the kind of thing that needs to happen.

Adbot
ADBOT LOVES YOU

Space Whale
Nov 6, 2014
And it's officially "configure TeamCity with our bitbucket" day. We're ahead of schedule with our sprint, so I won't be too rushed with this.

This is also the first ops/IT thing I've done ever, whee!

So far the triggering is working, but the build stuff is not. Time to learn MSBuild or just copy poo poo from my dev environment and be a lazyfuck :geno:

Space Whale
Nov 6, 2014
So now build, msbuild, and nuget. But in what order?

Is there a way to trigger a build from the web interface or do I have to push a comment commit to git and wait a minute every time? :effort:

Edit: OK, screw it, wiping EVERYTHING and starting from scratch. The last time anyone even tried this was in November of last year and they gave up pretty quickly.

Space Whale fucked around with this message at 20:26 on Jan 30, 2015

Space Whale
Nov 6, 2014

Ithaqua posted:

NuGet package restore can be configured to run automatically as part of the build process (it modifies the *.*proj files to include a reference to an MSBuild target). If you're talking about publishing binaries into nuget, that's a different story.

TeamCity itself saw it as part of an orderable set of processes to go with the build when triggered. I'm going to do a fresh install of whatever build tool and teamcity from scratch and see if doing it right with up to date versions of everything is easier, meh.

Space Whale
Nov 6, 2014
I have absolutely no idea what I am doing or what is going on, I'm spoiled on just clicking "build" :downs:

gently caress.

Edit: OK, ran installers, manually ran scripts, TC cannot find build agents, hooray.

Edit2: "toolsVersion: Selected MSBuild tools version is not supported by selected MSBuild version" No wonder nobody else wanted to do this. At least my agent has found the TC and vice versa?

Feh: It thought it was MSBuild 4.0 when I had 12.0 installed. Now it can't detect default targets. I'm going to go to the .NET thread for this now.

Yay: works!

Space Whale fucked around with this message at 23:08 on Jan 30, 2015

Space Whale
Nov 6, 2014
So the "branch off of master, merge all into a dev branch; merge that dev branch into master to deploy" pattern has my architect a bit antsy, since with TFS it was hell. I've also seen at least one nasty git merge, but we were having spaghetti merges that looked like a cladogram of the protists.

...why not just use that dev as your master? What would make it all go pear shaped? I know that the project files can get a bit messy, but seriously, why?

Space Whale
Nov 6, 2014
What I mean is after you coalesce your feature branches into dev, and you're ready to deploy, sometimes that dev branch doesn't merge smoothly into master. So, why not just overwrite master with it?

Space Whale
Nov 6, 2014
That raises another question I've gotten.

Let's say that there are breaking changes made by work being done in the API or architecture of the project, or whatever. These changes all need to be shared and the breaking bits fixed. Would pushing that to master early then doing the rebase/merge from master onto their branches be the best way to do this?

Space Whale
Nov 6, 2014
Problem: $work wants to "use Jenkins" to parse poo poo from an XML file and use it to send another as a restful POST to something, according to some schedule, then have some kind of report visible to a user based on the response from said endpoint, for the purposes of scheduled test automation. It's reading the file for params for the tests to run then asking the service on the other side of the endpoint to run said job.

I've used TeamCity before, and even set it up once, but just "check a distro, kick off a build when poo poo changes, unit tests, then some deploy script." Jenkins is something I used once at home to magically just make "oh I see you committed, I'll run build deploy" and since I said I did that months ago I'm now the expert. I also push for automation when possible so here I am.

Is Jenkins the way to go with this? Are plugins available that would make this easy? Is this a XY problem? I do not yet have any real requirements at all, they just want a proof of concept that this can be used in this way.

Space Whale
Nov 6, 2014
For background, I'm at a cable company, that just bought another cable company, and my boss is new, and I'm even newer. So there's no real requirements yet, this seems to be proof-of-concept fishing. I also haven't done any automation work like this in ages so I feel incredibly rusty.

What's the idiomatic way to get this out the door? I'm brand new to Jenkins and I've never green-fielded anything like this before. I'm sponging documentation but I hate not having anything to show.

Space Whale
Nov 6, 2014
Jenkins to schedule a .bat (I'm in windows) to then call a ruby script ~~on my machine~~ works. The actual Jenkins server/environment that already exists I have no access to nor any contact with the team that wanted this proof of concept.

lol

As far as "reporting" or "a dashboard" - the thing done by the ruby script is to call another server with a REST call that puts XML in a JSON (lol again) to "run these automated tests." These automated tests are not build tests, rather, integration tests to make sure all manner of devices that use our network actually work. It's cool but outside of scope*.

To get status of the job, you make another REST call - a get with the test job ID. So, you'd need to periodically keep hitting it and get status and if it's done then say "I'm done" :haw:

Obviously a ruby script can just loop and then "if response is that it's done, bust out of that loop." My question is how do I have Jenkins act as some sort of a dashboard for that. Just use stdout from the ruby script?

Because I have no clear requirements, I'm still just scratching my head. I'm not even sure what the people with Jenkins are doing except for the fact that they do use it for builds and would like to have daily/whatever test runs. OK fine. But I should be able to talk to them and see their environment.


*The testing I do involves an IR transmitter with IR-fibers taped to rokus, set top boxes, Xboxes, and so on simulating a remote and going through channel guides and channel switching on the STBs, roku channels and authentication (including ocr for the codes) and yadda yadda. Kinda cool. Basically every HO/CO has one of these test machines to catch outages and to test the rollout of new poo poo so the internet and tv stays on. This is the testing called by the ruby script called by Jenkins. We already have this implemented with automated builds for CI, I guess they just want to hit a machine daily too on top of that for some reason?

Space Whale
Nov 6, 2014

Bhodi posted:

Are you running jenkins 2.X? If so, yes. A pipeline script is exactly what you're looking for. Just use the built-in "stage" functionality to have pretty green / red boxes, derived from either script exit codes or string scraping or whatever you want. Sadly this requires access to jenkins which you don't have(?)

https://jenkins.io/doc/book/pipeline/



In a half hour I'm finally calling the guy wanting me to do that and actually getting requirements :stonk:

Adbot
ADBOT LOVES YOU

Space Whale
Nov 6, 2014
The guy having the call wanted me to just do it on the spot in the course of 30 minutes on the spot, over webex.

:wtc:

Apparently we already have a script running system that does this and he just doesn't know how to use it. So Jenkins is some magic bullet some manager heard and nobody realizes all it would do is fire off a script I'd have to write, it's not some magical test management system. And gently caress maintaining scripts, we already have a system we wrote to do this.

I have to talk to my boss and explain this is already doable. I drug in the new PM/Scrum/etc person of many hats and she just looked lost and confused the entire time but can corroborate what I saw so people know I'm not lying, because this is unbelievable.

edit: most sr dev here is pissed because our new test execution engine is coming out really soon and does what they want and they don't want to wait so I'm wasting time on old bs.

fgsfds

Space Whale fucked around with this message at 01:16 on Jan 27, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply