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

Automatically build images after Helm upgrade #525

Closed
michaelsauter opened this issue May 24, 2022 · 1 comment · Fixed by #544
Closed

Automatically build images after Helm upgrade #525

michaelsauter opened this issue May 24, 2022 · 1 comment · Fixed by #544
Labels
enhancement New feature or request
Milestone

Comments

@michaelsauter
Copy link
Member

When the Helm release is deployed, the user still needs to manually build all images. This is cumbersome and feels wrong.

Maybe we can make use of https://helm.sh/docs/topics/charts_hooks/, to run a Job after the upgrade to automatically trigger all builds (only in OpenShift of course).

@michaelsauter michaelsauter added the enhancement New feature or request label May 24, 2022
@michaelsauter
Copy link
Member Author

michaelsauter commented Jun 1, 2022

The below works but there are some questions left:

apiVersion: batch/v1
kind: Job
metadata:
  name: ods-start-builds
  annotations:
    # Will this also trigger for the initial installation? Do we need to add "post-install"?
    "helm.sh/hook": post-upgrade
    "helm.sh/hook-weight": "1"
    "helm.sh/hook-delete-policy": hook-succeeded,hook-failed
spec:
  template:
    metadata:
      name: ods-start-builds
    spec:
      serviceAccountName: pipeline
      restartPolicy: Never
      containers:
      - name: post-upgrade-job
        # Which version to pick here?
        # Also which source should we pull from?
        image: "quay.io/openshift/origin-cli:4.10"
        command: ["/bin/sh","-c"]
        # How do we know which build configs are installed?
        # Should we wait for the builds to succeed? This would probably trigger timeouts ...
        args: ["oc start-build ods-buildah; oc start-build ods-finish; oc start-build ods-go-toolset; oc start-build ods-gradle-toolset; oc start-build ods-helm; oc start-build ods-node16-npm-toolset; oc start-build ods-pipeline-manager; oc start-build ods-python-toolset; oc start-build ods-sonar; oc start-build ods-start"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant