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 CICD #11

Merged
merged 7 commits into from
Feb 7, 2024
Merged

add CICD #11

merged 7 commits into from
Feb 7, 2024

Conversation

pelletier2017
Copy link
Contributor

@pelletier2017 pelletier2017 commented Jan 30, 2024

Changes:

  • remove v1alpha directory
  • add static versions to operator/webhook/requirements-dev.txt
  • add build/release jobs for minimal-app (image), webhook (image), and operator (github release with yamls)
  • add docs to describe how to release

Artifacts are currently pushed up to view what they would look like. They will be deleted prior to merging.

Release details:

  • minimal-app
    • version 0.0.2 (found in minimal-app/pom.xml)
    • git tag minimal-app_v0.0.2
    • docker image ghcr.io/octoconsulting/keip/minimal-app:0.0.2
  • webhook
    • version 0.4.0 (found in operator/webhook/version.txt)
    • git tag webhook_v0.4.0
    • docker image ghcr.io/octoconsulting/keip/route-webhook:0.4.0
  • operator
    • version 0.1.0 (found in operator/version.txt)
    • git tag operator_v0.1.0
    • github release operator_v0.1.0

Right before merging:

  • delete extra artifacts that act as examples for PR review so they don't interfere with merging

Followup after PR:

  • check release job for each artifact triggered after being merged to main
  • check redundant build jobs for each released artifact are not built
  • check git tag(s) are correctly put on latest commit on main branch
  • check creating PR and modifying subdirectory of minimal-app, webhook, and operator will trigger only their respective jobs
  • follow steps for overwriting an old release from .github/workflows/README.md to ensure it works as expected

@pelletier2017 pelletier2017 changed the title [work in progress] add CICD add CICD Feb 2, 2024
README.md Outdated Show resolved Hide resolved
operator/webhook/Makefile Outdated Show resolved Hide resolved
@@ -0,0 +1,105 @@
name: webhook-workflo
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Should this be webhook-workflow instead of webhook-workflo?

@@ -15,6 +15,7 @@

<properties>
<docker.registry>ghcr.io/octoconsulting</docker.registry>
<image-name>keip/${project.artifactId}</image-name>
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Do we need the version here?

Copy link
Contributor Author

@pelletier2017 pelletier2017 Feb 7, 2024

Choose a reason for hiding this comment

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

No because the version is at the top above properties and we set the tag for the image version here

<image>${docker.registry}/${image-name}</image>
<tags>
    <tag>${project.version}</tag>
</tags>

@@ -115,7 +116,7 @@
</labels>
</container>
<to>
<image>${docker.registry}/keip/${project.artifactId}</image>
<image>${docker.registry}/${image-name}</image>
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Do we need the version here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, the tag is added to the version. You can see it built and uploaded the correct image tag here.
https://github.com/OctoConsulting/keip/pkgs/container/keip%2Fminimal-app/176007969?tag=0.0.2

prep-release:
rm -rf output
mkdir output
kustomize build ./controller > ./output/controller.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ For the release, are we expecting to deliver to one yaml file or multiple as shown here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The release is made up of 3 files that are the output of kustomize build on those 3 directories. This follows the same pattern that metacontroller uses so people can include things separately as needed.
https://github.com/OctoConsulting/keip/releases/tag/operator_v0.1.0

@pelletier2017 pelletier2017 merged commit 3f32fd6 into main Feb 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants