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

feat(tekton provider): Update tekton provider #3933

Merged
merged 30 commits into from
Sep 8, 2022

Conversation

briangleeson
Copy link
Contributor

@briangleeson briangleeson commented Jul 25, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Changes

Update the tekton pipeline provider with latest go sdk:

  • Bump github.com/IBM/continuous-delivery-go-sdk to v0.0.8
  • Refactor naming scheme from tekton_pipeline_* to cd_tekton_pipeline_*
  • Add some new diff suppress functions
  • Add ForceNew to a few schemas where necessary for immutable values
  • Add enum handling to Trigger Property
  • Add missing description for some id properties
  • Added href property to pipeline run resource
  • Update all strings after internal review
  • Change created property to created_at
  • Breaking: Change concurrency object property to max_concurrent_runs integer property
  • Add support for the preview worker option in v2 APIs, when supported in that region. Falls back to public if not supported
  • Breaking: Reshape scm source object to include service_instance_id
  • Change patch requests to use JSON merge-patch content-type
  • Rename html_url to runs_url and run_url, for pipeline and pipelineRun resources respectively
  • Breaking: Reshape property types to use snake case: text, single_select, integration, secure, appconfig
  • Breaking: Reshape secret types to use snake case: token_matches, digest_matches, internal_validation
  • Add support for enable_slack_notifications and enable_partial_cloning pipeline settings
  • Breaking: Reshape enum value to remove the default option in favour of value instead
  • Breaking: Refactored Trigger into separate request and response shapes

Output from acceptance testing:

$ make testacc TEST=./ibm/service/cdtoolchain TESTARGS='-run=TestAccIBMCdToolchain*'

=== RUN   TestAccIBMCdToolchainDataSourceBasic
--- PASS: TestAccIBMCdToolchainDataSourceBasic (52.43s)
=== RUN   TestAccIBMCdToolchainDataSourceAllArgs
--- PASS: TestAccIBMCdToolchainDataSourceAllArgs (46.79s)
=== RUN   TestAccIBMCdToolchainToolAppconfigDataSourceBasic
--- PASS: TestAccIBMCdToolchainToolAppconfigDataSourceBasic (49.96s)
=== RUN   TestAccIBMCdToolchainToolAppconfigDataSourceAllArgs
--- PASS: TestAccIBMCdToolchainToolAppconfigDataSourceAllArgs (48.36s)
=== RUN   TestAccIBMCdToolchainToolArtifactoryDataSourceBasic
--- PASS: TestAccIBMCdToolchainToolArtifactoryDataSourceBasic (75.43s)
=== RUN   TestAccIBMCdToolchainToolArtifactoryDataSourceAllArgs
--- PASS: TestAccIBMCdToolchainToolArtifactoryDataSourceAllArgs (56.61s)
=== RUN   TestAccIBMCdToolchainBasic
--- PASS: TestAccIBMCdToolchainBasic (85.75s)
=== RUN   TestAccIBMCdToolchainAllArgs
--- PASS: TestAccIBMCdToolchainAllArgs (71.86s)
=== RUN   TestAccIBMCdToolchainToolPipelineBasic
--- PASS: TestAccIBMCdToolchainToolPipelineBasic (48.86s)
=== RUN   TestAccIBMCdToolchainToolPipelineAllArgs
--- PASS: TestAccIBMCdToolchainToolPipelineAllArgs (91.56s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cdtoolchain     633.398s

$ make testacc TEST=./ibm/service/cdtektonpipeline TESTARGS='-run=TestAccIBMCdTekton*'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./ibm/service/cdtektonpipeline -v -run=TestAccIBMCdTekton* -timeout 700m
=== RUN   TestAccIBMCdTektonPipelineBasic
--- PASS: TestAccIBMCdTektonPipelineBasic (99.81s)
PASS
ok      github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cdtektonpipeline        105.269s

Remaining work

  • Update the GO sdk version used for tekton pipeline once the new version has been published
  • Fix the detect-secrets errors in PR build
  • Fix cdtektonpipeline tests

@briangleeson briangleeson changed the title Update CD Tekton provider feat(tekton provider): Update tekton provider Aug 2, 2022
@briangleeson briangleeson force-pushed the updateTektonProvider branch from ae626dd to 4132e20 Compare August 2, 2022 16:12
@briangleeson briangleeson marked this pull request as ready for review August 4, 2022 16:42
@briangleeson briangleeson requested a review from hkantare August 11, 2022 14:54
@briangleeson briangleeson marked this pull request as draft August 17, 2022 11:00
@briangleeson
Copy link
Contributor Author

Moving this back to draft for now. We have more changes identified that we'd like to add to this before moving forward

@briangleeson
Copy link
Contributor Author

  • Large amount of String updates added
  • Refactored created, updated and concurrency properties
  • Added href property to pipeline run resource
  • Updated docs

@briangleeson
Copy link
Contributor Author

TODO

  • resolve merge conflicts
  • update GO sdk version once built and available

@briangleeson
Copy link
Contributor Author

@hkantare we are close to completing this piece of work. I'm wondering about the process to get this change (once approved) out into a provider release. Can you point me to a doc that describes this process?

@briangleeson
Copy link
Contributor Author

TODO: update continuous-delivery-go-sdk version once the new build is available

@briangleeson briangleeson marked this pull request as ready for review September 5, 2022 17:11
@briangleeson
Copy link
Contributor Author

@hkantare I've marked the PR ready for review again. Let me know if you have any feedback, thanks

@hkantare hkantare merged commit 5e1a59d into IBM-Cloud:master Sep 8, 2022
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this pull request Sep 14, 2022
* Update CD Tekton provider

* Update tekton provider

* Add tekton diff suppress functions

* chore(tekton provider): bump tekton go sdk version to latest

* chore(tekton provider): update secrets baseline

* fix(tekton pipeline):fix pipeline_definition error

* chore(tekton provider): fix optional property for trigger

* chore(review): revert changes in provider.go

* chore(review): revert provider.go changes

* chore(code review): fix pipeline_id in doc

* chore(code review): tekton provider string updates

* chore(code review): doc fix

* chore(code review): add missing provider updates

* fix(tekton): schema, string and doc updates

* chore(tekton): minor clean up

* fix(tekton): fix trigger worker props

* fix(tekton): json merge patch schema

* fix(tekton): refactor enum property types

* fix(tekton): snake case secret types

* fix(tekton): refactor enum value

* fix(tekton): support other settings on creation

* fix(tekton): remove enabled flag

* chore(tekton): remove duplicate trigger

* fix(tekton): refactor trigger resource

* chore(tekton): fix merge issue

* chore(tekton): update secrets baseline

* chore(tekton): format files

* chore(tekton): format provider.go

* chore(tekton): update to 0.1.0 Go SDK

* fix(tekton): fix tekton test
SunithaGudisagarIBM pushed a commit to ibm-vpc/terraform-provider-ibm that referenced this pull request Sep 14, 2022
* Update CD Tekton provider

* Update tekton provider

* Add tekton diff suppress functions

* chore(tekton provider): bump tekton go sdk version to latest

* chore(tekton provider): update secrets baseline

* fix(tekton pipeline):fix pipeline_definition error

* chore(tekton provider): fix optional property for trigger

* chore(review): revert changes in provider.go

* chore(review): revert provider.go changes

* chore(code review): fix pipeline_id in doc

* chore(code review): tekton provider string updates

* chore(code review): doc fix

* chore(code review): add missing provider updates

* fix(tekton): schema, string and doc updates

* chore(tekton): minor clean up

* fix(tekton): fix trigger worker props

* fix(tekton): json merge patch schema

* fix(tekton): refactor enum property types

* fix(tekton): snake case secret types

* fix(tekton): refactor enum value

* fix(tekton): support other settings on creation

* fix(tekton): remove enabled flag

* chore(tekton): remove duplicate trigger

* fix(tekton): refactor trigger resource

* chore(tekton): fix merge issue

* chore(tekton): update secrets baseline

* chore(tekton): format files

* chore(tekton): format provider.go

* chore(tekton): update to 0.1.0 Go SDK

* fix(tekton): fix tekton test
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 this pull request may close these issues.

2 participants