Commit 4d7950b5 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

CI: change git and ssh setup

No related merge requests found
Showing with 3 additions and 63 deletions
+3 -63
...@@ -19,8 +19,6 @@ variables: ...@@ -19,8 +19,6 @@ variables:
GIT_STRATEGY: "clone" GIT_STRATEGY: "clone"
before_script: before_script:
# make sure LFS hooks are installed
- git lfs install
# Provision efficiently the local LFS cache before checkout # Provision efficiently the local LFS cache before checkout
- git lfs fetch origin $CI_COMMIT_SHA - git lfs fetch origin $CI_COMMIT_SHA
# Checkout the expected branch # Checkout the expected branch
...@@ -83,17 +81,11 @@ ubuntu-llvm: ...@@ -83,17 +81,11 @@ ubuntu-llvm:
stage: prepare stage: prepare
before_script: before_script:
# This override the previous before_script # This override the previous before_script
- export GIT_LFS_SKIP_SMUDGE=1
- git checkout $CI_COMMIT_REF_NAME - git checkout $CI_COMMIT_REF_NAME
# We are now doing the git-lfs install - export GIT_LFS_SKIP_SMUDGE=0
# This is done after the checkout so we avoid downloading Data
# But we need it to upload the archive
- git-lfs install
- git config --global user.email "otbbot@orfeo-toolbox.org"
- git config --global user.name "otbbot"
- eval $(ssh-agent -s)
- ssh-add <(echo "$K8S_SECRET_SSH")
# This is for debug, we are checking the owner of the ssh key # This is for debug, we are checking the owner of the ssh key
- ssh -o StrictHostKeyChecking=no -T git@gitlab.orfeo-toolbox.org - ssh -T git@gitlab.orfeo-toolbox.org
after_script: after_script:
- echo "Nothing to do for after_script" - echo "Nothing to do for after_script"
artifacts: artifacts:
......
...@@ -185,55 +185,6 @@ execute_process( ...@@ -185,55 +185,6 @@ execute_process(
) )
set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" ) set ( SB_ARTIFACT_GIT "${OTB_SOURCE_DIR}/superbuild-artifact" )
# setting up the repo
# StrictHostKeyChecking so we don't have to add the host as a known key
# -F /dev/null so the agent is not taking a default file ~/.ssh/..
execute_process(
COMMAND ${GIT} "config" "core.sshCommand"
"ssh -o StrictHostKeyChecking=no"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE ssh_res
OUTPUT_VARIABLE ssh_out
ERROR_VARIABLE ssh_err
)
if ( DEBUG )
message( "Step 1: ssh")
message( "ssh_res = ${ssh_res}" )
message( "ssh_out = ${ssh_out}" )
message( "ssh_err = ${ssh_err}" )
endif()
execute_process(
COMMAND ${GIT} "config" "user.mail" "otbbot@orfeo-toolbox.org"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE mail_res
OUTPUT_VARIABLE mail_out
ERROR_VARIABLE mail_err
)
if ( DEBUG )
message( "Step 2: mail")
message( "mail_res = ${mail_res}" )
message( "mail_out = ${mail_out}" )
message( "mail_err = ${mail_err}" )
endif()
execute_process(
COMMAND ${GIT} "config" "user.name" "otbbot"
WORKING_DIRECTORY ${SB_ARTIFACT_GIT}
RESULT_VARIABLE name_res
OUTPUT_VARIABLE name_out
ERROR_VARIABLE name_err
)
if ( DEBUG )
message( "Step 3: name")
message( "name_res = ${name_res}" )
message( "name_out = ${name_out}" )
message( "name_err = ${name_err}" )
endif()
# create a branche # create a branche
execute_process( execute_process(
COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}" COMMAND ${GIT} "checkout" "-b" "${BRANCH_NAME}"
...@@ -261,9 +212,6 @@ execute_process( ...@@ -261,9 +212,6 @@ execute_process(
WORKING_DIRECTORY ${OTB_SOURCE_DIR} WORKING_DIRECTORY ${OTB_SOURCE_DIR}
) )
# In a near futur it might be nice to clean up the mess we made...
if ( DEBUG ) if ( DEBUG )
if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}") if (EXISTS "${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}") message("Tar file exists in superbuild_artefact at: ${SB_ARTIFACT_GIT}/${SB_TAR_NAME}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment