File tree 2 files changed +38
-2
lines changed
vcenter/src/main/kotlin/cn/edu/buaa/scs/vcenter
2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : ' 编译并推送vcenter模块镜像'
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - name : Checkout
10
+ uses : actions/checkout@v3
11
+
12
+ - name : Setup java
13
+ uses : actions/setup-java@v3
14
+ with :
15
+ distribution : ' temurin'
16
+ java-version : 8
17
+
18
+ - name : Build
19
+ run : ./gradlew clean :vcenter:build -x test --no-daemon
20
+
21
+ - name : Build and Push Docker Image
22
+ env :
23
+ image : ${{ secrets.ALIYUN_DOCKER_NAMESPACE }}/vcenter
24
+ tags : ${{ github.sha }}
25
+ registry : ${{ secrets.ALIYUN_DOCKER_REGISTRY }}
26
+ username : ${{ secrets.ALIYUN_DOCKER_USERNAME }}
27
+ password : ${{ secrets.ALIYUN_DOCKER_PASSWORD }}
28
+ run : |
29
+ cd vcenter
30
+ docker login ${registry} -u ${username} -p ${password}
31
+ docker build -t ${image}:${tags} .
32
+ docker push ${image}:${tags}
Original file line number Diff line number Diff line change @@ -184,8 +184,12 @@ object VCenterWrapper {
184
184
RetrieveOptions ()
185
185
)
186
186
vmList?.forEach { (_, vmProps) ->
187
- val vm = convertVMModel(hostName, vmProps)
188
- finalVirtualMachineList.add(vm)
187
+ try {
188
+ val vm = convertVMModel(hostName, vmProps)
189
+ finalVirtualMachineList.add(vm)
190
+ } catch (e: NullPointerException ) {
191
+ logger.error { e }
192
+ }
189
193
}
190
194
} catch (e: Throwable ) {
191
195
logger.error { e.stackTraceToString() }
You can’t perform that action at this time.
0 commit comments