summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>2021-03-24 11:30:59 +0100
committerKrzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>2021-03-24 11:49:26 +0100
commit61ee000cefc0e1a13681aa54ff7eee04604c2138 (patch)
tree129c726d53cdb11cb5835376963b31e66c3e8102
parent657621f8dfd3694398baba0bbbffb24f5d0d3630 (diff)
downloadoobe-tizen_6.0.tar.gz
oobe-tizen_6.0.tar.bz2
oobe-tizen_6.0.zip
Update docker imagetizen_6.0
Change-Id: I1fabd082ab952afa940ec8540ea40062bb0e32db Signed-off-by: Krzysztof Wieclaw/IoT & UI Sample (PLT) /SRPOL/Engineer/Samsung Electronics <k.wieclaw@samsung.com>
-rw-r--r--Jenkinsfile37
1 files changed, 21 insertions, 16 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 93fe290..2250fd2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,7 +1,7 @@
pipeline {
agent {
docker {
- image 'art.sec.samsung.net/tizenwearable_docker/ci:v0.18'
+ image 'art.sec.samsung.net/tizenwearable_docker/ci:v0.19'
registryUrl 'https://art.sec.samsung.net/'
registryCredentialsId 'botoxcorp'
}
@@ -23,8 +23,6 @@ pipeline {
SOLUTION_NAME = "Oobe.sln"
SOLUTION_PATH = "${SOLUTION_DIR}/${SOLUTION_NAME}"
GIT_COMMIT_REV = GIT_COMMIT
- REPO_NAME = env.GIT_URL.tokenize("/")[-1].tokenize(".")[0]
- REPO_OWNER = env.GIT_URL.tokenize("/")[-2]
if(BRANCH_NAME == "tizen")
{
MERGE_TYPE = ""
@@ -52,7 +50,8 @@ pipeline {
script {
def return_code = sh(script: "dotnet format --check --report dotnet-format-report ${SOLUTION_PATH}", returnStatus: true)
DOTNET_FORMAT_RESULT_CODE = return_code
- withCredentials([usernamePassword(credentialsId: 'http_server_password', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
+
+ withCredentials([sshUserPrivateKey(credentialsId: 'http_server_ssh', keyFileVariable: 'SSH_KEY', passphraseVariable: 'PASSPHRASE', usernameVariable: 'USERNAME')]) {
def user_host = "${USERNAME}@${HTTP_SERVER}"
def www_path = ""
if(BRANCH_NAME == "tizen") {
@@ -62,11 +61,13 @@ pipeline {
www_path = "${HTTP_DOTNET_FORMAT_PATH}/${PROJECT_NAME}_dotnet_format_output/${BRANCH_NAME}/${GIT_COMMIT_REV}"
}
def path = "~/www/${www_path}"
+ def KEY_FILE = SSH_KEY
+ sh "chmod 400 ${KEY_FILE}"
if(BRANCH_NAME == "tizen") {
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
}
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
- sh "sshpass -p ${PASSWORD} scp ${SOLUTION_DIR}/dotnet-format-report/format-report.json \"${user_host}:${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
+ sh "scp -i ${KEY_FILE} ${SOLUTION_DIR}/dotnet-format-report/format-report.json \"${user_host}:${path}\""
DOTNET_FORMAT_RESULT_URL="${HTTP_BASE_URL_PATH}/${www_path}/format-report.json"
}
}
@@ -95,7 +96,7 @@ pipeline {
sh "echo Clang format exited with unknown error"
currentBuild.result = 'FAILURE'
}
- withCredentials([usernamePassword(credentialsId: 'http_server_password', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
+ withCredentials([sshUserPrivateKey(credentialsId: 'http_server_ssh', keyFileVariable: 'SSH_KEY', passphraseVariable: 'PASSPHRASE', usernameVariable: 'USERNAME')]) {
def user_host = "${USERNAME}@${HTTP_SERVER}"
def www_path = ""
if(BRANCH_NAME == "tizen") {
@@ -105,11 +106,13 @@ pipeline {
www_path = "${HTTP_CLANG_FORMAT_PATH}/${PROJECT_NAME}_clang_format_output/${BRANCH_NAME}/${GIT_COMMIT_REV}"
}
def path = "~/www/${www_path}"
+ def KEY_FILE = SSH_KEY
+ sh "chmod 400 ${KEY_FILE}"
if(BRANCH_NAME == "tizen") {
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
}
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
- sh "sshpass -p ${PASSWORD} scp clang_format.diff \"${user_host}:${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
+ sh "scp -i ${KEY_FILE} clang_format.diff \"${user_host}:${path}\""
CLANG_RESULT_URL="${HTTP_BASE_URL_PATH}/${www_path}/clang_format.diff"
}
}
@@ -124,7 +127,7 @@ pipeline {
archiveArtifacts("${PROJECT_NAME}_SAM.zip")
sh "cp output/html/*.html output/html/report.html"
sh "cp output/html/*.png output/html/result.png"
- withCredentials([usernamePassword(credentialsId: 'http_server_password', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
+ withCredentials([sshUserPrivateKey(credentialsId: 'http_server_ssh', keyFileVariable: 'SSH_KEY', passphraseVariable: 'PASSPHRASE', usernameVariable: 'USERNAME')]) {
def user_host = "${USERNAME}@${HTTP_SERVER}"
def www_path = ""
if(BRANCH_NAME == "tizen") {
@@ -134,12 +137,14 @@ pipeline {
www_path = "${HTTP_SAM_PATH}/${PROJECT_NAME}_SAM_output/${BRANCH_NAME}/${GIT_COMMIT_REV}"
}
def path = "~/www/${www_path}"
+ def KEY_FILE = SSH_KEY
+ sh "chmod 400 ${KEY_FILE}"
if(BRANCH_NAME == "tizen") {
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} rm -rf \"${path}\""
}
- sh "sshpass -p ${PASSWORD} ssh -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
- sh "sshpass -p ${PASSWORD} scp -r output \"${user_host}:${path}\""
- sh "sshpass -p ${PASSWORD} scp ${PROJECT_NAME}_SAM.zip \"${user_host}:${path}\""
+ sh "ssh -i ${KEY_FILE} -o StrictHostKeychecking=no ${user_host} mkdir -p \"${path}\""
+ sh "scp -i ${KEY_FILE} -r output \"${user_host}:${path}\""
+ sh "scp -i ${KEY_FILE} ${PROJECT_NAME}_SAM.zip \"${user_host}:${path}\""
SAM_RESULT_URL="${HTTP_BASE_URL_PATH}/${www_path}/output/html/report.html"
}
}