Skip to content

Commit

Permalink
make bml jenkins node related changes
Browse files Browse the repository at this point in the history
-removes Jumphost related logic from bml scripts
-changes jenkins agent label for bml jobs
  • Loading branch information
Sunnatillo committed Mar 7, 2024
1 parent 0e8d93b commit e804f1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 27 deletions.
2 changes: 1 addition & 1 deletion jenkins/jobs/bml_integration_tests.pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pipeline {
options {
disableConcurrentBuilds()
}
agent { label 'metal3-static-workers' }
agent { label 'metal3ci-bml-jenkins-node' }
environment {
METAL3_CI_USER="metal3ci"
REPO_ORG = "${PROJECT_REPO_ORG}"
Expand Down
2 changes: 0 additions & 2 deletions jenkins/scripts/bml_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ echo "Cleaning up the lab"
# Execute remote script
# shellcheck disable=SC2029

JUMPHOST_IP="129.192.80.20"
TEST_EXECUTER_IP="192.168.1.3"

ssh \
Expand All @@ -27,6 +26,5 @@ ssh \
-o SendEnv="BML_METAL3_DEV_ENV_REPO" \
-o SendEnv="BML_METAL3_DEV_ENV_BRANCH" \
-i "${METAL3_CI_USER_KEY}" \
-o ProxyCommand="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${METAL3_CI_USER_KEY} -W %h:%p ${METAL3_CI_USER}@${JUMPHOST_IP}" \
"${METAL3_CI_USER}"@"${TEST_EXECUTER_IP}" \
ANSIBLE_FORCE_COLOR=true ansible-playbook -v /tmp/bare_metal_lab/cleanup-lab.yaml --skip-tags "clone"
8 changes: 2 additions & 6 deletions jenkins/scripts/bml_integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@ declare -a SSH_OPTIONS=(
-o ServerAliveInterval=15
-o ServerAliveCountMax=10
-i "${METAL3_CI_USER_KEY}"
-o ProxyCommand="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${METAL3_CI_USER_KEY} -W %h:%p ${METAL3_CI_USER}@${JUMPHOST_IP}"
)

# Send Remote script to Executer
scp \
"${SSH_OPTIONS[@]}" \
-r \
"${CI_DIR}/files/run_integration_tests.sh" \
scp "${CI_DIR}/files/run_integration_tests.sh" \
"${CI_DIR}/files/vars.sh" \
"${CI_DIR}/bare_metal_lab/" \
"${METAL3_CI_USER}@${TEST_EXECUTER_IP}:/tmp/" >/dev/null
Expand All @@ -114,4 +110,4 @@ ssh \
"${SSH_OPTIONS[@]}" \
"${METAL3_CI_USER}"@"${TEST_EXECUTER_IP}" \
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/bin \
/tmp/run_integration_tests.sh /tmp/vars.sh "${GITHUB_TOKEN}"
/tmp/run_integration_tests.sh /tmp/vars.sh "${GITHUB_TOKEN}"
24 changes: 6 additions & 18 deletions jenkins/scripts/fetch_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ fi

# Get the IP
if [[ "${BARE_METAL_LAB}" == true ]]; then
JUMPHOST_IP="129.192.80.20"
TEST_EXECUTER_IP="192.168.1.3"
else
TEST_EXECUTER_IP="$(openstack port show -f json "${TEST_EXECUTER_PORT_NAME}" |
Expand All @@ -54,24 +53,13 @@ else
fi
fi

if [[ "${BARE_METAL_LAB}" == true ]]; then
declare -a SSH_OPTIONS=(
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-o ServerAliveInterval=15
-o ServerAliveCountMax=10
-i "${METAL3_CI_USER_KEY}"
-o ProxyCommand="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${METAL3_CI_USER_KEY} -W %h:%p ${METAL3_CI_USER}@${JUMPHOST_IP}"
)
else
declare -a SSH_OPTIONS=(
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-o ServerAliveInterval=15
-o ServerAliveCountMax=10
-i "${METAL3_CI_USER_KEY}"
declare -a SSH_OPTIONS=(
-o StrictHostKeyChecking=no
-o UserKnownHostsFile=/dev/null
-o ServerAliveInterval=15
-o ServerAliveCountMax=10
-i "${METAL3_CI_USER_KEY}"
)
fi

# Send Remote script to Executer
scp \
Expand Down

0 comments on commit e804f1b

Please sign in to comment.