Teamcity trigger tool

This tool provides a Physical interface to click & start build on Teamcity. This is plug and play device.

Checkout video here: https://youtu.be/srnu6uvvWT0



Items required to build this tool :-

1 Arduino Uno Micro-controller board
1 USB Cable
2 LED
1 On-Off switch
1 Push button

Building circuit 

I used a online website to build my buffer circuit. Follow this link :-

https://123d.circuits.io/circuits/1659445-teamcity-trigger




Programming micro-controller 

Programming micro-controller is extremely easy. It is programmed in C language using Arduino IDE.

github url for project : https://github.com/luckgagan/OneclickDeploymentTool

C code has to part

1st is Setup & 2nd is Loop.

int InputPin = 13;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  analogReference(INTERNAL);
}

Setup code is initializing serial with baud 9600. This part executes once. another part is loop.

void loop() {
  // put your main code here, to run repeatedly:
  int tempVal = digitalRead(InputPin);
  if(tempVal == 0)
  {
    Serial.println("deploy");
    delay(1000);
  }
}
This is iterative code, It looks for input on Pin-13. And if it gets desired input it will write deploy instruction to serial port.

C# Code 

C# code can be cloned from github for same. It is listening on the connected port for deploy instruction. Once it will receive deploy instruction, It will trigger Teamcity build using REST API.
I have configured Teamcity on my local.

Setup Teamcity 

https://confluence.jetbrains.com/display/TCD9/Installing+and+Configuring+the+TeamCity+Server

Teamcity REST API (to trigger build)

https://confluence.jetbrains.com/display/TW/REST+API



Comments

Popular posts from this blog

FastEndpoint vs Minimal APIs vs Controller

Kick start 2021 😃😃

Work with Raspberry PI Zero W