AICoE / aicoe-ci

AICoE-CI using TektonCD pipelines and triggers
13 stars 13 forks source link

first pass at deploying a single overlay from /deploy command #151

Closed Gregory-Pereira closed 2 years ago

Gregory-Pereira commented 2 years ago

Related Issues and Dependencies

AICOE/aicoe-ci issue 125

This introduces a breaking change

This Pull Request implements

The ability to build only one overlay at a time with the /deploy command

… Explain your changes.

Extended the pull-request pipeline with the ability to root through the .aicoe-ci.yaml file looking for overlays, and to deploy the single overlay that matches the overlay name from the pull request comment. Added additional debug step to the init-task to verify the new results that are being produced in that step. Fixed contribution logic to allow contributions from Github owners or members.

Additional notes that came up in the process of testing:

  1. Pushing to the quay thoth-station organization, even with the Thoth-station-thoth-pusher-secret did not work for some reason, and I could not ascertain why. Either the secret is incorrect or (more likely) the bot has limited permissions in those quay repositories, possibly read-only instead of write.
  2. This has so far been tested for all overlays on the elyra-aidevops-tutorial repo, not sure which other Thoth-station repos also have overlays. It works by looking under the /manifests directory in the repo to find imagestreamtag.yaml file and updating it, if we have overlays in other repositories without a manifests directory or in this structure, it will need rework.
  3. There are two overlay_contextpath variables, one from the init-task and one from the pr-config task. This is because the pr-config looks through the .aicoe-ci.yaml file and grabs the context-path under deploy for the correct overlay, and the init-task one comes from recursing under the manifests directory. Some logic is used to determine which gets passed in.
  4. When testing, a webhook must be created in your fork of a repo to trigger the pull-request-pipeline. Additionally to push an image, the repository must be created in Quay and your bot must have write privileges to that image repo. Not an issue for all thoth-station official repos, but if you are testing on your own forks this becomes an issue.
sesheta commented 2 years ago

@Gregory-Pereira: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/AICoE/aicoe-ci/pull/151#issuecomment-974747257): >/retest Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Gregory-Pereira commented 2 years ago

/remove-hold

Gregory-Pereira commented 2 years ago

Ready for re-review @harshad16.

Gregory-Pereira commented 2 years ago

Prow is having issues, but pre-commit passes fine locally:

$ pre-commit run -a
Add trailing commas......................................................Passed
Tabs remover.............................................................Passed
Trim Trailing Whitespace.................................................Passed
Check for merge conflicts................................................Passed
Fix End of Files.........................................................Passed
Check for added large files..............................................Passed
check BOM - deprecated: use fix-byte-order-marker........................Passed
Check for case conflicts.................................................Passed
Check Yaml...............................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Gregory-Pereira commented 2 years ago

pre-commit passes locally. /retest

sesheta commented 2 years ago

@Gregory-Pereira: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to [this](https://github.com/AICoE/aicoe-ci/pull/151#issuecomment-1072583943): >pre-commit passes locally. >/retest Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
harshad16 commented 2 years ago

/ok-to-test

sesheta commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16

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: - ~~[OWNERS](https://github.com/AICoE/aicoe-ci/blob/master/OWNERS)~~ [harshad16] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
Gregory-Pereira commented 2 years ago

/retest

Gregory-Pereira commented 2 years ago

Tests were failing because I forgot to rebase with new changes to AICOE.