Skip to content
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

Add instructions on how to build dev environment #2472

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

dulek
Copy link
Contributor

@dulek dulek commented Nov 9, 2023

What this PR does / why we need it:
This commit enhances the CI playbooks to allow deploying from master branch and adds documentation on how to use them to deploy a development environment.

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 9, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2023
@dulek dulek force-pushed the dev-environment branch 2 times, most recently from c2e0f6e to 472684e Compare November 9, 2023 15:43
+--------------------------------------+--------------------------------------+----------------------------------+-------------+---------------------+------------------+----------+

# Call the LB
$ curl 172.24.5.93
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled the PR and tested locally it works fine

can this be updated as my env is different

+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+
| ID                                   | Floating IP Address | Fixed IP Address | Port                                 | Floating Network                     | Project                          |
+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+
| 15332df2-567d-411c-9ad0-6b28664a6fd9 | 172.24.5.101        | 10.1.0.20        | 36ecb62e-33c0-454d-bc08-1cbe6541874f | 74990c2b-fab0-4be1-9294-435a4b12f872 | 58b5f2a307cf4961b4d4918581c6fb38 |
+--------------------------------------+---------------------+------------------+--------------------------------------+--------------------------------------+----------------------------------+

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sure.

@@ -32,7 +32,6 @@ cd "${REPO_ROOT}" || exit 1
# PULL_NUMBER and PULL_BASE_REF are Prow job environment variables
PR_NUMBER="${PULL_NUMBER:-}"
[[ -z $PR_NUMBER ]] && echo "PR_NUMBER is required" && exit 1
PR_BRANCH="${PULL_BASE_REF:-master}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this used to be the branch that related to the submited PR
is it not necessary or you used other variable to replace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never found it used in the playbooks or script. Please correct me if I'm wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

um... I didn't check all code but from the naming convention I think we will do something like
master + PR => new test code thing to be tested on ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I have no idea, but it does seem this is unused anywhere.

mdulko:cloud-provider-openstack/ (dev-environment) $ grep -R "github_pr_branch" .
mdulko:cloud-provider-openstack/ (dev-environment) $ 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to make it safe, can you help change some code (e.g update a log in the code )
and after the CI run, we check the output and see whether log is really there to prove the PR is running on top of master, if it works then let's remove the log and get this PR merge?

Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jichenjc: Is there a need? If you take a look at build-log you can see the ci-occm-e2e.sh script running with -x and there's no PR_BRANCH line anymore, yet everything works. It clearly runs the new code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks for the tip ,I think that make sense to me

This commit enhances the CI playbooks to allow deploying from `master`
branch and adds documentation on how to use them to deploy a development
environment.
@jichenjc
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 16, 2023
@kayrus
Copy link
Contributor

kayrus commented Dec 13, 2023

@dulek I'll try this on my local VM and let you know if it works smoothly.

@kayrus
Copy link
Contributor

kayrus commented Dec 13, 2023

@dulek works great
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2023
@k8s-ci-robot k8s-ci-robot merged commit 96f2edb into kubernetes:master Dec 13, 2023
10 checks passed
@kayrus
Copy link
Contributor

kayrus commented Dec 14, 2023

/cherry-pick release-1.28
/cherry-pick release-1.27
/cherry-pick release-1.26

@k8s-infra-cherrypick-robot

@kayrus: #2472 failed to apply on top of branch "release-1.28":

Applying: Add instructions on how to build dev environment
Using index info to reconstruct a base tree...
M	docs/developers-guide.md
M	tests/ci-occm-e2e.sh
M	tests/playbooks/roles/install-cpo-occm/defaults/main.yaml
M	tests/playbooks/roles/install-cpo-occm/tasks/main.yaml
M	tests/playbooks/roles/install-csi-cinder/tasks/main.yaml
M	tests/playbooks/test-occm-e2e.yaml
Falling back to patching base and 3-way merge...
Auto-merging tests/playbooks/test-occm-e2e.yaml
CONFLICT (content): Merge conflict in tests/playbooks/test-occm-e2e.yaml
Auto-merging tests/playbooks/roles/install-csi-cinder/tasks/main.yaml
CONFLICT (content): Merge conflict in tests/playbooks/roles/install-csi-cinder/tasks/main.yaml
Auto-merging tests/playbooks/roles/install-cpo-occm/tasks/main.yaml
CONFLICT (content): Merge conflict in tests/playbooks/roles/install-cpo-occm/tasks/main.yaml
Auto-merging tests/playbooks/roles/install-cpo-occm/defaults/main.yaml
Auto-merging tests/ci-occm-e2e.sh
CONFLICT (content): Merge conflict in tests/ci-occm-e2e.sh
Auto-merging docs/developers-guide.md
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add instructions on how to build dev environment
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.28
/cherry-pick release-1.27
/cherry-pick release-1.26

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dulek
Copy link
Contributor Author

dulek commented Dec 14, 2023

Honestly I wouldn't bother too much with backporting this, it's just a development script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants