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

Add Bitbucket Data Center support #1303

Merged
merged 12 commits into from May 15, 2024
Merged

Add Bitbucket Data Center support #1303

merged 12 commits into from May 15, 2024

Conversation

zainq11
Copy link
Contributor

@zainq11 zainq11 commented Apr 2, 2024

Description

On Feb 15, 2024, Atlassian stopped support for Bitbucket Server. This PR introduces changes in go-tfe so that we can support Bitbucket Data Center while keeping Bitbucket Server. The docs, tests and examples have been updated to reference Bitbucket Data Center instead of Bitbucket Server to align with the deprecation of server.

Remember to:

Testing plan

  1. Running CI
  2. local testing with updated terraform provider creates a bitbucket data center vcs connection.
resource "tfe_oauth_client" "test" {
  name = "bbdc-cli-tester"
  # organization     = "zain-tfe"
  api_url          = "https://bitbucket.dev.tf-vcs.hashicorp.services"
  http_url         = "https://bitbucket.dev.tf-vcs.hashicorp.services"
  key              = "my_key"
  secret           = "-----BEGIN RSA PRIVATE KEY-----XXXXX-----END RSA PRIVATE KEY-----\n"
  rsa_public_key   = "-----BEGIN PUBLIC KEY-----XXXXX-----END PUBLIC KEY-----\n"
  service_provider = "bitbucket_data_center"
}
image

External links

Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.

Output from acceptance tests

Successfully ran all tests in resource_tfe_oauth_client_test.go

❯ TESTARGS="-run TFEOAuthClient" TEST="./internal/provider" make testacc

TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test ./internal/provider -v -run TFEOAuthClient -timeout 15m
=== RUN   TestAccTFEOAuthClientDataSource_basic
--- PASS: TestAccTFEOAuthClientDataSource_basic (4.98s)
=== RUN   TestAccTFEOAuthClientDataSource_findByID
--- PASS: TestAccTFEOAuthClientDataSource_findByID (3.28s)
=== RUN   TestAccTFEOAuthClientDataSource_findByName
--- PASS: TestAccTFEOAuthClientDataSource_findByName (3.34s)
=== RUN   TestAccTFEOAuthClientDataSource_findByServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_findByServiceProvider (3.10s)
=== RUN   TestAccTFEOAuthClientDataSource_missingParameters
--- PASS: TestAccTFEOAuthClientDataSource_missingParameters (0.13s)
=== RUN   TestAccTFEOAuthClientDataSource_missingOrgWithName
--- PASS: TestAccTFEOAuthClientDataSource_missingOrgWithName (0.13s)
=== RUN   TestAccTFEOAuthClientDataSource_missingOrgWithServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_missingOrgWithServiceProvider (0.12s)
=== RUN   TestAccTFEOAuthClientDataSource_sameName
--- PASS: TestAccTFEOAuthClientDataSource_sameName (2.34s)
=== RUN   TestAccTFEOAuthClientDataSource_noName
--- PASS: TestAccTFEOAuthClientDataSource_noName (1.94s)
=== RUN   TestAccTFEOAuthClientDataSource_sameServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_sameServiceProvider (2.37s)
=== RUN   TestAccTFEOAuthClient_basic
--- PASS: TestAccTFEOAuthClient_basic (2.75s)
=== RUN   TestAccTFEOAuthClientWithOrganizationScoped_basic
--- PASS: TestAccTFEOAuthClientWithOrganizationScoped_basic (2.52s)
=== RUN   TestAccTFEOAuthClient_rsaKeys
--- PASS: TestAccTFEOAuthClient_rsaKeys (2.71s)
PASS

Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.

If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.

$ TESTARGS="-run TestAccTFEWorkspace" make testacc

...

zainq11 and others added 4 commits April 2, 2024 12:43
Bumps [github.com/hashicorp/go-tfe](https://github.com/hashicorp/go-tfe) from 1.49.0 to 1.50.0.
- [Release notes](https://github.com/hashicorp/go-tfe/releases)
- [Changelog](https://github.com/hashicorp/go-tfe/blob/main/CHANGELOG.md)
- [Commits](hashicorp/go-tfe@v1.49.0...v1.50.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-tfe
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@zainq11 zainq11 changed the title Bitbucket Data Center support Add Bitbucket Data Center support Apr 24, 2024
@zainq11 zainq11 marked this pull request as ready for review April 25, 2024 00:04
@zainq11 zainq11 requested a review from a team as a code owner April 25, 2024 00:04
CHANGELOG.md Outdated Show resolved Hide resolved
@laurenolivia
Copy link
Contributor

@zainq11 ping me if you need another review

@zainq11
Copy link
Contributor Author

zainq11 commented May 14, 2024

@zainq11 ping me if you need another review

@laurenolivia Could you please review when you have time. I have made changes to the CHANGELOG.md and as discussed in slack, I have also run tests in resource_tfe_oauth_client_test.go which touch the updated resource. Please let me know if there is anything else I need to test as well. Happy to do that!

❯ TESTARGS="-run TFEOAuthClient" TEST="./internal/provider" make testacc

TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test ./internal/provider -v -run TFEOAuthClient -timeout 15m
=== RUN   TestAccTFEOAuthClientDataSource_basic
--- PASS: TestAccTFEOAuthClientDataSource_basic (4.98s)
=== RUN   TestAccTFEOAuthClientDataSource_findByID
--- PASS: TestAccTFEOAuthClientDataSource_findByID (3.28s)
=== RUN   TestAccTFEOAuthClientDataSource_findByName
--- PASS: TestAccTFEOAuthClientDataSource_findByName (3.34s)
=== RUN   TestAccTFEOAuthClientDataSource_findByServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_findByServiceProvider (3.10s)
=== RUN   TestAccTFEOAuthClientDataSource_missingParameters
--- PASS: TestAccTFEOAuthClientDataSource_missingParameters (0.13s)
=== RUN   TestAccTFEOAuthClientDataSource_missingOrgWithName
--- PASS: TestAccTFEOAuthClientDataSource_missingOrgWithName (0.13s)
=== RUN   TestAccTFEOAuthClientDataSource_missingOrgWithServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_missingOrgWithServiceProvider (0.12s)
=== RUN   TestAccTFEOAuthClientDataSource_sameName
--- PASS: TestAccTFEOAuthClientDataSource_sameName (2.34s)
=== RUN   TestAccTFEOAuthClientDataSource_noName
--- PASS: TestAccTFEOAuthClientDataSource_noName (1.94s)
=== RUN   TestAccTFEOAuthClientDataSource_sameServiceProvider
--- PASS: TestAccTFEOAuthClientDataSource_sameServiceProvider (2.37s)
=== RUN   TestAccTFEOAuthClient_basic
--- PASS: TestAccTFEOAuthClient_basic (2.75s)
=== RUN   TestAccTFEOAuthClientWithOrganizationScoped_basic
--- PASS: TestAccTFEOAuthClientWithOrganizationScoped_basic (2.52s)
=== RUN   TestAccTFEOAuthClient_rsaKeys
--- PASS: TestAccTFEOAuthClient_rsaKeys (2.71s)
PASS

Copy link
Collaborator

@brandonc brandonc left a comment

Choose a reason for hiding this comment

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

Good job balancing docs and deprecation without breaking anything

@zainq11 zainq11 merged commit 51f955e into main May 15, 2024
6 checks passed
@zainq11 zainq11 deleted the zainq11/bitbucket-data-center branch May 15, 2024 23:43
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.

None yet

3 participants