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(artifacts): Support custom artifacts with custom type #7415

Merged
merged 2 commits into from
Sep 20, 2019

Conversation

jervi
Copy link
Contributor

@jervi jervi commented Sep 20, 2019

Some recent changes to the Expected Artifacts feature has severely broken backwards compatibility with artifacts that have a custom type (for instance Igor can create artifacts with type deb or rpm). This commit will make Deck be more lenient when it encounters legacy artifacts that does not strictly adhere to the new standard. It will also add back the UI fields type, name, version and location for custom artifacts.

Some recent changes to the Expected Artifacts feature has severely broken backwards compatibility with artifacts that have a custom type (for instance Igor can create artifacts with type `deb` or `rpm`). This commit will make Deck be more lenient when it encounters legacy artifacts that does not strictly adhere to the new standard. It will also add back the UI fields `type`, `name`, `version` and `location` for custom artifacts.
@jervi
Copy link
Contributor Author

jervi commented Sep 20, 2019

Example:

Given this legacy expected artifacts definition:

"expectedArtifacts": [
    {
      "defaultArtifact": {
        "customKind": true,
        "id": "47ae01ed-fca8-4513-972b-cf53f5dd9c1e"
      },
      "id": "d245c55c-84c5-46eb-82ba-d1c3ff3904ef",
      "matchArtifact": {
        "customKind": true,
        "id": "e3711912-8630-48e1-a209-69455cfa8f9f",
        "name": "my-artifact",
        "type": "deb"
      },
      "useDefaultArtifact": false,
      "usePriorArtifact": false
    }
  ],

Newer versions of Deck would display something like this when configuring the pipeline (the actual account would differ, but it would be the first retrieved from Clouddriver):
image

If you change to "custom-artifact", it will display this:
image

But if you save the pipeline, details from the original expected artifact definition are gone.

After applying this PR, Deck will display this instead:
image

Copy link

@Jammy-Louie Jammy-Louie left a comment

Choose a reason for hiding this comment

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

LGTM

@Jammy-Louie Jammy-Louie merged commit 9c0a994 into spinnaker:master Sep 20, 2019
@jervi jervi deleted the custom_artifacts branch September 23, 2019 08:59
erikmunson pushed a commit to erikmunson/deck that referenced this pull request Sep 23, 2019
5d2e469 feat(core/pipeline): Add timestamp for failed executions (spinnaker#7419)
3cfb3f1 feat(core/pipeline): Make custom artifacts more readable (spinnaker#7418)
0034fa8 fix(core/pipeline): Add space before Source-link for failed executions (spinnaker#7420)
bce3ac5 fix(core/pipeline): standardize manual execution field layouts (spinnaker#7413)
9c0a994 fix(artifacts): Support custom artifacts with custom type (spinnaker#7415)
erikmunson pushed a commit that referenced this pull request Sep 23, 2019
* chore(core): Bump version to 0.0.411

5d2e469 feat(core/pipeline): Add timestamp for failed executions (#7419)
3cfb3f1 feat(core/pipeline): Make custom artifacts more readable (#7418)
0034fa8 fix(core/pipeline): Add space before Source-link for failed executions (#7420)
bce3ac5 fix(core/pipeline): standardize manual execution field layouts (#7413)
9c0a994 fix(artifacts): Support custom artifacts with custom type (#7415)

* chore(titus): Bump version to 0.0.112

97c85d9 chore(titus): Deprecating pipeline migration strategy (#7414)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
* chore(core): Bump version to 0.0.411

5d2e469 feat(core/pipeline): Add timestamp for failed executions (spinnaker#7419)
3cfb3f1 feat(core/pipeline): Make custom artifacts more readable (spinnaker#7418)
0034fa8 fix(core/pipeline): Add space before Source-link for failed executions (spinnaker#7420)
bce3ac5 fix(core/pipeline): standardize manual execution field layouts (spinnaker#7413)
9c0a994 fix(artifacts): Support custom artifacts with custom type (spinnaker#7415)

* chore(titus): Bump version to 0.0.112

97c85d9 chore(titus): Deprecating pipeline migration strategy (spinnaker#7414)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants