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

[US] Buildpacks with opinionated defaults (Zero config) #2465

Closed
2 of 6 tasks
rohanKanojia opened this issue Nov 21, 2023 · 0 comments · Fixed by #2639
Closed
2 of 6 tasks

[US] Buildpacks with opinionated defaults (Zero config) #2465

rohanKanojia opened this issue Nov 21, 2023 · 0 comments · Fixed by #2639
Assignees

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Nov 21, 2023

Component

JKube Kit

Task description

Part of #439

User Story: As a user, I want to effortlessly use JKube's build goals with Buildpacks as a build strategy without needing additional configuration. This allows me to generate Kubernetes manifests using buildpack-based images.

Expected Behavior

  • Using Buildpacks CLI (pack) with Pre-installed pack CLI

    • Given:
      • The user has Docker and buildpacks installed.
      • User has a Spring Boot project (created from springboot starter.io) with Maven GAV: com.acme:myspringapp:1.0.0-SNAPSHOT.
      • The user has added the kubernetes-maven-plugin.
      • jkube.build.strategy is specified as buildpacks in the pom.xml Maven properties.
      <properties>
          <jkube.build.strategy>buildpacks</jkube.build.strategy>
          [...]
      </properties>
    • When:
      • User runs mvn package k8s:build.
    • Then:
      • An image named com.acme:myspringapp:1.0.0-SNAPSHOT is available in the local Docker registry.
      • The image contains labels indicating that 'pack' was used for its creation.
    • When:
      • User runs mvn k8s:resource.
    • Then:
      • The generated deployment resource contains com.acme:myspringapp:1.0.0-SNAPSHOT for the container usage.
    • When:
      • User runs mvn k8s:apply
    • Then:
      • Then generated manifests get applied to currently logged in Kubernetes Cluster
    • Sub tasks:
  • Acceptance Criteria for k8s:push

    • k8s:push/k8sPush should work with buildpacks build strategy #2464
    • Given:
      • User has build an image with k8s:build in previous step
      • User has configured image name with appropriate registry and registry username
      • User has configured registry credentials in ~/.docker/config.json or properties or ~/.m2/settings.xml
    • When:
      • User runs mvn k8s:push
    • Then:
      • Kubernetes Maven Plugin relies on Docker daemon to push the image to specified registry
  • Using Buildpacks CLI (pack) without Installed CLI

    • Given:
      • The user has Docker installed.
      • The user has not installed the buildpack CLI
      • User has a Spring Boot project (created from springboot starter.io) with Maven GAV: com.acme:myspringapp:1.0.0-SNAPSHOT.
      • The user has added the kubernetes-maven-plugin.
      • jkube.build.strategy is specified as buildpacks in the pom.xml Maven properties.
      <properties>
          <jkube.build.strategy>buildpacks</jkube.build.strategy>
          [...]
      </properties>
    • When:
      • User runs mvn package k8s:build.
    • Then:
      • An image named com.acme:myspringapp:1.0.0-SNAPSHOT is available in the local Docker registry.
      • The image contains labels indicating that 'pack' was used for its creation.
    • Sub tasks:
  • Acceptance Criteria for Gradle

    • Using Buildpacks CLI (pack) without Pre-installed pack CLI
    • Given:
      • The user has Docker and buildpacks installed.
      • User has a Spring Boot project (created from springboot starter.io) with Gradle GAV: com.acme:myspringapp:1.0.0-SNAPSHOT.
      • The user has added the kubernetes-gradle-plugin.
      • jkube.build.strategy is specified as buildpacks in the build.gradle Groovy DSL or gradle properties.
      jkube.build.strategy=buildpacks
    • When:
      • User runs gradle build k8sBuild.
    • Then:
      • An image named com.acme:myspringapp:1.0.0-SNAPSHOT is available in the local Docker registry.
      • The image contains labels indicating that 'pack' was used for its creation.
    • When:
      • User runs gradle k8sResource.
    • Then:
      • The generated deployment resource contains com.acme:myspringapp:1.0.0-SNAPSHOT for the container usage.
    • When:
      • User runs gradle k8sApply
    • Then:
      • Then generated manifests get applied to currently logged in Kubernetes Cluster
    • Sub tasks:
    • Sub tasks:
    • Acceptance Criteria for k8sPush
      • k8s:push/k8sPush should work with buildpacks build strategy #2464
      • Given:
        • User has build an image with k8sBuild in previous step
        • User has configured image name with the appropriate registry and registry username
        • User has configured registry credentials in ~/.docker/config.json or properties
      • When:
        • User runs gradle k8sPush
      • Then:
        • Kubernetes Gradle Plugin relies on Docker daemon to push the image to specified registry
@sunix sunix changed the title Add new build strategy named buildpacks [US] Add new build strategy named buildpacks Nov 30, 2023
@manusa manusa changed the title [US] Add new build strategy named buildpacks [US] Buildpacks with opinionated defaults (Zero config) Dec 4, 2023
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 a pull request may close this issue.

1 participant