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

fix(cdevents-webhooks) : Adding support for Artifact Constraints and Parameters #1357

Merged
merged 18 commits into from Dec 22, 2023

Conversation

rjalander
Copy link
Contributor

@rjalander rjalander commented Nov 9, 2023

This PR includes the changes to fix the CDEvents type Automated trigger to run the pipeline executions with Artifact Constraints and Parameters.

The structure of the CDEvents is defined in the CDEvents-spec

The sample CDEvent data with Parameters in the customData object

{
  "context": {
    "id": "5fb38d7d-28dd-47e4-ade2-cb21153cc8dc",
    "type": "dev.cdevents.artifact.published.0.1.0",
    "source": "https://ci-build.est.tech/",
    "version": "0.1.2"
  },
  "customData": {
    "parameters": {
      "stack": "prod"
    }
  },
  "customDataContentType": "application/json",
  "subject": {
    "type": "ARTIFACT",
    "content": {
      "pipelineName": "test-1",
      "outcome": "SUCCESS"
    }
  }
}

Sample CDEvent data with artifacts in the customData object

{
  "context": {
    "id": "5fb38d7d-28dd-47e4-ade2-cb21153cc8dc",
    "type": "dev.cdevents.artifact.published.0.1.0",
    "source": "https://ci-build.est.tech/",
    "version": "0.1.2"
  },
  "customData": {
    "artifacts": [
      {
        "type": "custom/object",
        "name": "image-cdevents",
        "version": "1.0.1",
        "reference": "custom/object/artifact"
      }
    ]
  },
  "customDataContentType": "application/json",
  "subject": {
    "type": "ARTIFACT",
    "content": {
      "pipelineName": "test-1",
      "outcome": "SUCCESS"
    }
  }
}

Dependent PR : spinnaker/gate#1732

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • a4e527d: CDEvents webhook trigger with artifacts and parameters support

  • d41b3f1: removing the test file

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

@rjalander
Copy link
Contributor Author

@jasonmcintosh Can you please merge this if there are no other comments. Thank you.

@jasonmcintosh jasonmcintosh added the ready to merge Approved and ready for merge label Dec 22, 2023
@mergify mergify bot added the auto merged label Dec 22, 2023
@mergify mergify bot merged commit 9442bac into spinnaker:master Dec 22, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants