init
This commit is contained in:
55
ado/azure-pipeline.k8s.yaml.j2
Normal file
55
ado/azure-pipeline.k8s.yaml.j2
Normal file
@@ -0,0 +1,55 @@
|
||||
trigger: none
|
||||
|
||||
## [SH] Import Self-hosting resources by DevOps Org. ==================================
|
||||
|
||||
pool: default
|
||||
|
||||
variables:
|
||||
- group: SKI_ACR_CREDENTIAL_GRP
|
||||
- name: GLOBAL_REGISTRY_URL # ACR 주소
|
||||
value: {{ regi }}
|
||||
- name: GLOBAL_REPOSITORY # 이미지 이름 ((프로젝트명)/(dev/prod 등)/(Repos or 이미지 명) --> skiwebacr.azurecr.io/devops/sample)
|
||||
value: {% if regi_repo %}{{ regi_repo | trim('/') }}/{% endif %}node-{{ node_id }}-main
|
||||
- name: DEPLOY_K8S # 배포할 K8s 이름 (pipelines -> environment 에서 확인 가능)
|
||||
value: {{ k8s_name }}
|
||||
- name: DEPLOY_NAMESPACE # 배포할 K8s namespace (pipelines -> environment -> Resources 에서 확인 가능)
|
||||
value: {{ namespace }}
|
||||
- name: DEPLOY_MANIFESTS_PATH # Manifest 파일 위치 (./manifests/dev/* or ./manifests/prd/*)
|
||||
value: ./k8s/*
|
||||
|
||||
parameters:
|
||||
- name: IMAGE_TAG
|
||||
displayName: "컨테이너 이미지 태그"
|
||||
type: string
|
||||
default: $(Build.SourceVersion)
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: pipeline-template # In a different organization
|
||||
endpoint: pipeline-template
|
||||
type: git
|
||||
name: DevOps_PF/pipeline-template
|
||||
ref: main
|
||||
|
||||
##=================================================================================
|
||||
|
||||
stages:
|
||||
- template: pipeline/v2/ci/python/PipContainerBuildStage.yaml@pipeline-template
|
||||
parameters:
|
||||
DOCKERFILE_NAME: Dockerfile # Dockerfile 위치
|
||||
CONTAINER_REGISTRY_URL: $(GLOBAL_REGISTRY_URL) # ACR URL
|
||||
CONTAINER_REPOSITORY: $(GLOBAL_REPOSITORY) # ACR Repository
|
||||
CONTAINER_TAG: {{ '${{ parameters.IMAGE_TAG }}' }} # 컨테이너 태그
|
||||
|
||||
COMMON_CONTAINER_REGISTRY_PASSWORD: $(COMMON_ACR_PW)
|
||||
WEB_CONTAINER_REGISTRY_PASSWORD: $(WEB_ACR_PW)
|
||||
|
||||
- template: pipeline/v2/cd/k8s/ManifestDeployStage.yaml@pipeline-template
|
||||
parameters:
|
||||
CONTAINER_REGISTRY_URL: $(GLOBAL_REGISTRY_URL) # ACR URL
|
||||
CONTAINER_REPOSITORY: $(GLOBAL_REPOSITORY) # ACR Repository
|
||||
CONTAINER_TAG: {{ '${{ parameters.IMAGE_TAG }}' }} # 이미지 태그
|
||||
|
||||
ENVIRONMENT_NAME: $(DEPLOY_K8S) # 배포할 K8s 이름 (pipeline -> environment)
|
||||
NAMESPACE: $(DEPLOY_NAMESPACE) # 배포할 k8s namespace
|
||||
MANIFESTS_DIR: $(DEPLOY_MANIFESTS_PATH) # Manifest 파일 위치
|
||||
Reference in New Issue
Block a user