Skip to content

trigger BuildRun when source is updated #1017

@lizzzcai

Description

@lizzzcai

Hi Shipwright team, want to check if Shipwirght support trigger then buildrun by some webhook or GitHub action or Shipwirght monitoring the source branch that when my source branch is updated, automatically trigger a buildrun to build the new image with the latest changes. If yes, is there any example of this? Thanks.

REGISTRY_ORG=<your_registry_org>
cat <<EOF | kubectl apply -f -
apiVersion: shipwright.io/v1alpha1
kind: Build
metadata:
  name: buildpack-nodejs-build
spec:
  source:
    url: https://github.com/shipwright-io/sample-nodejs
    contextDir: source-build
  strategy:
    name: buildpacks-v3
    kind: ClusterBuildStrategy
  output:
    image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest
    credentials:
      name: push-secret
EOF

cat <<EOF | kubectl create -f -
apiVersion: shipwright.io/v1alpha1
kind: BuildRun
metadata:
  generateName: buildpack-nodejs-buildrun-
spec:
  buildRef:
    name: buildpack-nodejs-build
EOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/supportIndicates an issue that is a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions