-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run feature tests in dynamic Jenkins workers #611
Run feature tests in dynamic Jenkins workers #611
Conversation
1c47dae
to
0f47108
Compare
0f47108
to
0eb3077
Compare
/test-ubuntu-e2e-feature-main |
0eb3077
to
fb4da27
Compare
/test-ubuntu-e2e-feature-main |
/test-centos-e2e-feature-main |
/test-centos-e2e-feature-main |
/test-centos-e2e-feature-main |
/test-ubuntu-e2e-feature-release-1-3 |
/test-ubuntu-e2e-feature-release-1-5 |
1 similar comment
/test-ubuntu-e2e-feature-release-1-5 |
/test-centos-e2e-feature-release-1-5 |
/test-ubuntu-integration-main |
/test-ubuntu-e2e-feature-release-1-5 |
fb4da27
to
6bc6412
Compare
/test-centos-e2e-feature-main |
2 similar comments
/test-centos-e2e-feature-main |
/test-centos-e2e-feature-main |
/test-ubuntu-integration-main |
fi | ||
|
||
# Fetch k8s logs form target cluster | ||
target_config=$(sudo find /tmp/ -type f -name "kubeconfig*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file cleaned up between runs? Otherwise we could end up with multiple kubeconfigs!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using dynamic vm only for one test, then it is deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok good!
# Fetch k8s logs form target cluster | ||
target_config=$(sudo find /tmp/ -type f -name "kubeconfig*") | ||
if [[ -n "${target_config}" ]]; then | ||
#fetch target cluster k8s logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
#fetch target cluster k8s logs | |
# fetch target cluster k8s logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small things to fix and some nits.
fi | ||
cd ../ | ||
|
||
if [[ ( "${REPO_NAME}" == "metal3-dev-env") || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [[ ( "${REPO_NAME}" == "metal3-dev-env") || | |
if [[ "${REPO_NAME}" == "metal3-dev-env" ]] || [[ "${REPO_NAME}" == "cluster-api-provider-metal3") ]]; then |
One condition per [[ .. ]]
and no parethesis please.
fetch_k8s_logs "management_cluster" "/home/metal3ci/.kube/config" | ||
|
||
# Fetch Ironic containers logs before pivoting to the target cluster, if they exist | ||
if [ -d /tmp/"${CONTAINER_RUNTIME}" ] && [ "$(ls /tmp/"${CONTAINER_RUNTIME}"/)" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -d /tmp/"${CONTAINER_RUNTIME}" ] && [ "$(ls /tmp/"${CONTAINER_RUNTIME}"/)" ]; then | |
if [[ -d /tmp/"${CONTAINER_RUNTIME}" ]] && [[ -n "$(ls /tmp/"${CONTAINER_RUNTIME}"/)" ]]; then |
Not exactly sure what the latter condition is expected to do, but assuming you're trying to check if its empty?
mkdir -p "${LOGS_DIR}/e2e_artifacts" | ||
# only if we triggered the e2e from the capm3 repo it will be cloned under tested_repo | ||
# else it is under metal3 | ||
if [[ -d "/home/metal3ci/tested_repo/_artifacts" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite a bit of repetition for the home dir / tested_repo dir, could we use ${HOME}
or other variable to avoid repetition?
mkdir -p "${LOGS_DIR}/${dir_name}" | ||
for NAMESPACE in ${NAMESPACES}; do | ||
mkdir -p "${LOGS_DIR}/${dir_name}/${NAMESPACE}" | ||
PODS="$(kubectl --kubeconfig="${kconfig}" get pods -n "${NAMESPACE}" -o jsonpath='{.items[*].metadata.name}' 2> /dev/null)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, a lot of kubectl --kubeconfig="${kconfig}"
repetition. Maybe put that in a var to make this more readable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
Hold until the nits are fixed.
cb3d5df
to
501ccc9
Compare
/test-centos-e2e-feature-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
I'm cool with this. Please follow up with the clean up, so we keep it maintainable.
/test-centos-e2e-feature-main |
/test-ubuntu-integration-main |
/unhold |
This PR makes feature tests run directly in dynamic workers instead of using worker as a jumphost Signed-off-by: Sunnatillo <[email protected]>
501ccc9
to
c20ac15
Compare
/test-centos-e2e-feature-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/test-ubuntu-e2e-feature-main |
/test-ubuntu-e2e-feature-main |
2 similar comments
/test-ubuntu-e2e-feature-main |
/test-ubuntu-e2e-feature-main |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lentzi90, Rozzii The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR makes feature tests run directly in dynamic workers instead of using worker as a jumphost