Skip to content

Commit 0698c26

Browse files
authored
store-ovms-windows-artifacts (#3106)
* store-ovms-windows-artifacts * check win build * wait false * post trigger * updates * review * copy artifacts to share * set agent node * remove comments * test share * xcopy * final update * review * review v2
1 parent a75d849 commit 0698c26

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

ci/build_test_OnCommit.groovy

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ def client_test_needed = "false"
44
def shortCommit = ""
55
def agent_name_windows = ""
66
def agent_name_linux = ""
7+
def windows_success = ""
78

89
pipeline {
910
agent {
@@ -102,6 +103,7 @@ pipeline {
102103
windows.build()
103104
} finally {
104105
windows.archive_build_artifacts()
106+
windows_success = "True"
105107
}
106108
} else {
107109
error "Cannot load ci/loadWin.groovy file."
@@ -130,7 +132,7 @@ pipeline {
130132
}
131133
}
132134
}
133-
}
135+
}
134136
stage("Internal tests") {
135137
agent {
136138
label "${agent_name_linux}"
@@ -174,8 +176,21 @@ pipeline {
174176
}
175177
}
176178
}
177-
}
179+
}
178180
}
179181
}
180182
}
183+
post {
184+
always {
185+
node("${agent_name_windows}") {
186+
script {
187+
if (env.BRANCH_NAME == "main" && windows_success == "True") {
188+
bat(returnStatus:true, script: "ECHO F | xcopy /Y /E C:\\Jenkins\\workspace\\ovms_oncommit_main\\dist\\windows\\ovms.zip \\\\${env.OV_SHARE_05_IP}\\data\\cv_bench_cache\\OVMS_do_not_remove\\ovms-windows-main-latest.zip")
189+
} else {
190+
echo "Not a main branch, skipping copying artifacts."
191+
}
192+
}
193+
}
194+
}
195+
}
181196
}

0 commit comments

Comments
 (0)