Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[Teamcity] Design as a code on Teamcity through Kotlin DSL

Posted on August 28, 2022September 3, 2022 By nim No Comments on [Teamcity] Design as a code on Teamcity through Kotlin DSL

Hiện tại trên teamcity thi trước giờ họ toàn click trên UI các bạn ạ
mình thì không thích điều này lăm

Giờ chung ta sẽ Design Teamcity as a code

Contents

Toggle
  • 1) Create Parent Project.
  • 2) Create Sub-Project
    • 2.1) Create Build Configuration inside Sup-Project
  • 3) Control the project via Kotlin DSL and Git
    • 3.1) Add Kotlin code in Parent Project
    • 3.2) You yourself design Kotlin code for the TeamCity project.
  • 4) How can we code a project on teamcity?

1) Create Parent Project.

Từ root project bạn tạo ta 1 sub project
ví dụ tên công ty nimtechnology

2) Create Sub-Project

trong nimtechnology mình sẽ tạo ra 1 product là market place

2.1) Create Build Configuration inside Sup-Project

trong product trên mình tạo trước cho họ build easy là build docker

3) Control the project via Kotlin DSL and Git

3.1) Add Kotlin code in Parent Project

Mình có repo rỗng tên là
https://github.com/mrnim94/kotlin-teamcity.git

giờ mình sẽ add nó vào vcs của project nimtechnology

thêm thông tin của repo vả branch mặc định
config authen
test và create
Giờ config Kotlin trên teamcity
khi bạn nhấn apply thì bạn nhớ ần phần mà push code từ teamcity lên github nhé

3.2) You yourself design Kotlin code for the TeamCity project.

Giờ minh sẽ cung cấp cho bạn 1 repo mẫu và chúng ta cùng so sánh

https://github.com/mrnim94/kotlin-teamcity

và minh dựa trên kiến thức của bài này
https://blog.safnet.com/archive/2020/03/22/splitting-teamcity-kotlin-into-multiple-files/

Đầu tiên mình nghĩ thì bạn cần biết teamcity của bạn đang chạy import jetbrain version nào!
Bạn tạo 1 build config bất kì và view as code

Bạn cứ ấn loạn xạ thử cho biết nhé!

Bạn chú ý là lúc nào trong folder của .teamcity luôn có 2 file pom.xml và setting.kts
Bạn thấy là mình có tạo 1 mô tả cho project cha và mình tạo trong project cha có 1 subProject

Ok bạn đã thấy có sự liên quan chưa nào?

trong _self directory sẽ là sân chơi custom của chúng ta.

subProject(_self.HelloWorldProject)
bạn thấy là mình đang dẫn vào thư mục _self và sẽ có project tên là HelloWorldProject trong đó


mà để được gợi ý về code thì bạn đọc thêm bài này nhé

[Teamcity] What tools are best to code “Kotlin DSL” in Teamcity
vậy đây là ảnh của project Hello Project trên teamcity

Tiếp đến là cái build

Chỗ này thì mình run 1 comand đơn giản

4) How can we code a project on teamcity?

Làm sao ta biết code cho teamcity hiểu nhỉ?

Các đầu tiên mình thấy dễ nhất bạn cứ chọn chọn trên teamcity rồi vào view as code!

Tiếp theo là bạn download project đó xuống

Cách tiếp theo là bạn mò trên mạng, sem code example
mình cho bạn một cái repo nhìn thấy là khá nhiều thứ để học hỏi

https://github.com/Automattic/wp-calypso/tree/trunk/.teamcity
https://www.jetbrains.com/help/teamcity/kotlin-dsl.html

TeamCity

Post navigation

Previous Post: [Teamcity] What tools are best to code “Kotlin DSL” in Teamcity
Next Post: [kubectl/helm] invalid apiVersion “client.authentication.k8s.io/v1alpha1”

More Related Articles

[Teamcity] What tools are best to code “Kotlin DSL” in Teamcity TeamCity
[Teamcity] Kotlin codes on Git(repository) are conflicted with the TeamCity UI. TeamCity
[TeamCity] Installing and configuring TeamCity 2017 TeamCity
[Teamcity] How does TeamCity login and pull/push images to the private Docker HUB TeamCity
[Teamcity] Teamcity Server can create the agent on AWS. TeamCity
[Teamcity] Why does TeamCity can’t find tag and branch on git TeamCity

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Azure] The subscription is not registered to use namespace ‘Microsoft.ContainerService’ May 8, 2025
  • [Azure] Insufficient regional vcpu quota left May 8, 2025
  • [WordPress] How to add a Dynamic watermark on WordPress. May 6, 2025
  • [vnet/Azure] VNet provisioning via Terraform. April 28, 2025
  • [tracetcp] How to perform a tracert command using a specific port. April 3, 2025

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.