-
-
Notifications
You must be signed in to change notification settings - Fork 135
148 lines (130 loc) · 5.68 KB
/
lwpm-dist-k8s-file.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: LWPM Dist K8S File
on:
workflow_dispatch:
inputs:
LWPM_K8S_VERSION:
description: k8s version
required: true
default: 1.31.0
env:
LWPM_K8S_VERSION: ${{ github.event.inputs.LWPM_K8S_VERSION }}
CODING_DOCKER_REGISTRY: pcit-docker.pkg.coding.net
CODING_DOCKER_USERNAME: khs1994-1601432822176
CODING_DOCKER_PASSWORD: ${{secrets.CODING_DOCKER_PASSWORD}}
jobs:
lwpm-dist-k8s-file:
name: lwpm-dist-k8s-file
runs-on: ${{ matrix.os }}-latest
env:
LWPM_DOCKER_USERNAME: khs1994
LWPM_DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
LWPM_DOCKER_REGISTRY: registry-1.docker.io
LNMP_CN_ENV: "false"
strategy:
matrix:
os: ["windows","ubuntu"]
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
repository: khs1994-docker/lnmp
fetch-depth: 1
path: lnmp
- name: handle-kubectl
shell: pwsh
if: matrix.os == 'windows'
env:
TENCENT_DOCKER_USERNAME: "906210846"
TENCENT_DOCKER_REGISTRY: useccr.ccs.tencentyun.com
run: |
echo $ErrorActionPreference
$ErrorActionPreference = "Continue"
. ./lnmp/windows/sdk/dockerhub/rootfs.ps1
./lnmp/windows/lnmp-windows-pm.ps1 dist kubectl@${env:LWPM_K8S_VERSION}
./lnmp/windows/lnmp-windows-pm.ps1 push kubectl@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME="khs1994"
rootfs lwpm/kubectl ${env:LWPM_K8S_VERSION} -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
$env:LWPM_DOCKER_REGISTRY=$env:TENCENT_DOCKER_REGISTRY
$NS="khs1994"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubectl@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
rootfs $NS/kubectl ${env:LWPM_K8S_VERSION} -registry $env:LWPM_DOCKER_REGISTRY -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:CODING_DOCKER_USERNAME
$env:LWPM_DOCKER_PASSWORD=$env:CODING_DOCKER_PASSWORD
$env:LWPM_DOCKER_REGISTRY=$env:CODING_DOCKER_REGISTRY
$NS="khs1994-docker/lwpm"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubectl@${env:LWPM_K8S_VERSION}
- name: handle-kubernetes-server
shell: pwsh
env:
TENCENT_DOCKER_USERNAME: "906210846"
TENCENT_DOCKER_REGISTRY: useccr.ccs.tencentyun.com
if: matrix.os == 'windows'
run: |
echo $ErrorActionPreference
$ErrorActionPreference = "Continue"
. ./lnmp/windows/sdk/dockerhub/rootfs.ps1
./lnmp/windows/lnmp-windows-pm.ps1 dist kubernetes-server@${env:LWPM_K8S_VERSION}
./lnmp/windows/lnmp-windows-pm.ps1 push kubernetes-server@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME="khs1994"
rootfs lwpm/kubernetes-server ${env:LWPM_K8S_VERSION} -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
$env:LWPM_DOCKER_REGISTRY=$env:TENCENT_DOCKER_REGISTRY
$NS="khs1994"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubernetes-server@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
rootfs $NS/kubernetes-server ${env:LWPM_K8S_VERSION} -registry $env:LWPM_DOCKER_REGISTRY -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:CODING_DOCKER_USERNAME
$env:LWPM_DOCKER_PASSWORD=$env:CODING_DOCKER_PASSWORD
$env:LWPM_DOCKER_REGISTRY=$env:CODING_DOCKER_REGISTRY
$NS="khs1994-docker/lwpm"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubernetes-server@${env:LWPM_K8S_VERSION}
- name: handle-kubernetes-node
shell: pwsh
if: matrix.os == 'ubuntu'
env:
TENCENT_DOCKER_USERNAME: "906210846"
TENCENT_DOCKER_REGISTRY: useccr.ccs.tencentyun.com
run: |
echo $ErrorActionPreference
. ./lnmp/windows/sdk/dockerhub/rootfs.ps1
./lnmp/windows/lnmp-windows-pm.ps1 dist kubernetes-node@${env:LWPM_K8S_VERSION}
./lnmp/windows/lnmp-windows-pm.ps1 push kubernetes-node@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME="khs1994"
rootfs lwpm/kubernetes-node ${env:LWPM_K8S_VERSION} -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
$env:LWPM_DOCKER_REGISTRY=$env:TENCENT_DOCKER_REGISTRY
$NS="khs1994"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubernetes-node@${env:LWPM_K8S_VERSION}
$env:DOCKER_USERNAME=$env:TENCENT_DOCKER_USERNAME
rootfs $NS/kubernetes-node ${env:LWPM_K8S_VERSION} -registry $env:LWPM_DOCKER_REGISTRY -phase "manifest list"
$env:LWPM_DOCKER_USERNAME=$env:CODING_DOCKER_USERNAME
$env:LWPM_DOCKER_PASSWORD=$env:CODING_DOCKER_PASSWORD
$env:LWPM_DOCKER_REGISTRY=$env:CODING_DOCKER_REGISTRY
$NS="khs1994-docker/lwpm"
./lnmp/windows/lnmp-windows-pm.ps1 push $NS/kubernetes-node@${env:LWPM_K8S_VERSION}
trigger-coding-net-ci:
needs: lwpm-dist-k8s-file
name: trigger-coding-net-ci
runs-on: ubuntu-latest
steps:
- name: trigger-coding.net-ci
env:
CODING_PASSWORD: ${{secrets.CODING_CI_PCIT_PASSWORD}}
run: |
set -x
curl -u pto8bv6hoj8e:${CODING_PASSWORD} \
-v -X POST 'https://pcit.coding.net/api/cci/job/234348/trigger' \
-H 'Content-Type: application/json' \
-d "
{
\"ref\": \"master\",
\"envs\": [
{
\"name\": \"LWPM_K8S_VERSION\",
\"value\": \"${LWPM_K8S_VERSION}\",
\"sensitive\": 0
}
]
}"