Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
ims
Commits
c1534584
提交
c1534584
authored
5月 18, 2023
作者:
余乾开
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(ArgoCD):补充配置
上级
ac8989d9
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
17 行增加
和
73 行删除
+17
-73
alibabacloud.yml
.github/workflows/alibabacloud.yml
+9
-40
application.yaml
kustomization/application.yaml
+2
-2
deployment.yaml
kustomization/base/deployment.yaml
+1
-1
deployment.yaml
kustomization/overlays/dev/deployment.yaml
+0
-11
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+2
-4
deployment.yaml
kustomization/overlays/prod/deployment.yaml
+0
-12
kustomization.yaml
kustomization/overlays/prod/kustomization.yaml
+3
-3
没有找到文件。
.github/workflows/alibabacloud.yml
浏览文件 @
c1534584
# This workflow will build and push a new container image to Alibaba Cloud Container Registry (ACR),
# and then will deploy it to Alibaba Cloud Container Service for Kubernetes (ACK), when there is a push to the "develop" branch.
#
# To use this workflow, you will need to complete the following set-up steps:
#
# 1. Create an ACR repository to store your container images.
# You can use ACR EE instance for more security and better performance.
# For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm
#
# 2. Create an ACK cluster to run your containerized application.
# You can use ACK Pro cluster for more security and better performance.
# For instructions see https://www.alibabacloud.com/help/doc-detail/95108.htm
#
# 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`.
# For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/
#
# 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME.
#
name
:
Build and Push to ACR
on
:
...
...
@@ -29,8 +10,6 @@ env:
NAMESPACE
:
sharefly
IMAGE
:
ims
TAG
:
${{ github.sha }}
#ACK_CLUSTER_ID: clusterID
#ACK_DEPLOYMENT_NAME: nginx-deployment
ACR_EE_REGISTRY
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com
ACR_EE_INSTANCE_ID
:
cri-yhk5zgfc2v1sia6l
...
...
@@ -38,6 +17,7 @@ env:
ACR_EE_IMAGE
:
ims
ACR_EE_TAG
:
${{ github.sha }}
JAVA_VERSION
:
'
8'
GITLAB_URL
:
https://oauth2:MjVJKxB7m4tCy7symBzn@git.mmcuav.cn/iuav/ims.git
permissions
:
contents
:
read
...
...
@@ -51,13 +31,11 @@ jobs:
-
name
:
Checkout
uses
:
actions/checkout@v3
#- uses: actions/checkout@v3
-
name
:
Set up JDK 8
uses
:
actions/setup-java@v1
with
:
java-version
:
${{env.JAVA_VERSION}}
# 2.1 (Optional) Login to ACR EE
-
name
:
Login to ACR EE with the AccessKey pair
uses
:
aliyun/acr-login@v1
with
:
...
...
@@ -65,33 +43,24 @@ jobs:
region-id
:
"
${{
env.REGION_ID
}}"
username
:
"
QD--KeBiTeHangKong@1354706964800968"
password
:
"
MMC@2023&ACR"
#access-key-id: "${{ secrets.ACCESS_KEY_ID }}"
#access-key-secret: "${{ secrets.ACCESS_KEY_SECRET }}"
instance-id
:
"
${{
env.ACR_EE_INSTANCE_ID
}}"
# 2.2 (Optional) Build and push image ACR EE
-
name
:
Build and push image to ACR EE
run
:
|
mvn clean package
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
# 3.2 Deploy the image to the ACK cluster
-
name
:
Kustomize Set Image
run
:
|-
cd kustomization/overlays/dev
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash /dev/stdin 3.8.6
./kustomize edit set image REGISTRY/NAMESPACE/IMAGE:TAG=$REGISTRY/$NAMESPACE/$IMAGE:$TAG
#- name: Commit files
# run: |
# git config --local user.email "986022405@qq.com"
# git config --local user.name "qiankaiyu"
# git commit -am "Image Update"
# git push
#- name: Push changes
# uses: ad-m/github-push-action@master
# with:
# #github_token: ${{ secret.GITHUB_TOKEN }}
# github_token: "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"
\ No newline at end of file
-
name
:
Commit and Push
run
:
|
git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL"
git commit -am "generated Image update"
git push origin develop
\ No newline at end of file
kustomization/application.yaml
浏览文件 @
c1534584
...
...
@@ -9,10 +9,10 @@ spec:
source
:
repoURL
:
http://git.mmcuav.cn/iuav/ims.git
targetRevision
:
HEAD
#develop master # 分支名
path
:
argocd
# 资源文件路径
path
:
kustomization/overlays/dev
# 资源文件路径
destination
:
server
:
https://kubernetes.default.svc
# API Server 地址
namespace
:
dev
elop
# 部署应用的命名空间
namespace
:
dev
# 部署应用的命名空间
# 默认情况下每 3 分钟会检测 Git 仓库一次
syncPolicy
:
syncOptions
:
...
...
kustomization/base/deployment.yaml
浏览文件 @
c1534584
...
...
@@ -18,7 +18,7 @@ spec:
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
resources
:
limits
:
memory
:
2
56
Mi
memory
:
2
048
Mi
cpu
:
100m
ports
:
-
containerPort
:
10001
...
...
kustomization/overlays/dev/deployment.yaml
deleted
100644 → 0
浏览文件 @
ac8989d9
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
ims-deployment
spec
:
template
:
spec
:
containers
:
-
name
:
ims
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
c1534584
...
...
@@ -2,13 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind
:
Kustomization
resources
:
-
../../base
namePrefix
:
dev-
#
namePrefix: dev-
namespace
:
dev
commonLabels
:
variant
:
dev
commonAnnotations
:
note
:
This is dev!
patches
StrategicMerge
:
patches
:
-
configMap.yaml
-
deployment.yaml
# - ingress.yaml
kustomization/overlays/prod/deployment.yaml
deleted
100644 → 0
浏览文件 @
ac8989d9
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
ims-deployment
spec
:
replicas
:
1
template
:
spec
:
containers
:
-
name
:
ims
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
\ No newline at end of file
kustomization/overlays/prod/kustomization.yaml
浏览文件 @
c1534584
...
...
@@ -3,11 +3,10 @@ kind: Kustomization
resources
:
-
../../base
namespace
:
prod
namePrefix
:
prod-
#
namePrefix: prod-
commonLabels
:
variant
:
prod
commonAnnotations
:
note
:
This is prod!
patches
StrategicMerge
:
patches
:
-
configMap.yaml
\ No newline at end of file
-
deployment.yaml
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论