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

chore: Propagate Bitbucket SAAS Oauth secret properties #1445

Merged
merged 1 commit into from
Jul 27, 2022
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jul 18, 2022

Signed-off-by: Igor Vinokur ivinokur@redhat.com

What does this PR do?

Add Bitbucket Oauth2 properties support. Propagate Bitbucket SAAS client id and client secret Oauth2 properties as workpsace environment variables.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#21517

How to test this PR?

cat EOF << > /tmp/patch.yaml
<PATCH_CONTENT>
EOF

chectl server:deploy \
     --installer operator \
     --platform <PLATFORM_TO_DEPLOY> \
     --che-operator-image <CUSTOM_OPERATOR_IMAGE> \
     --che-operator-cr-patch-yaml /tmp/patch.yaml

Create bitbucket oauth secret in the che-server namespace:

kind: Secret
apiVersion: v1
metadata:
  name: bitbucket-oauth-config
  namespace: eclipse-che
  labels:
    app.kubernetes.io/component: oauth-scm-configuration
    app.kubernetes.io/part-of: che.eclipse.org
  annotations:
    che.eclipse.org/oauth-scm-server: bitbucket
data:
  id:<base 64 encoded client id from the bitbucket oauth consummer>
  secret: <base 64 encoded secret from the bitbucket oauth consummer>
type: Opaque

Start a workspace and see the Bitbucket Oauth2 environment variable

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@tolusha
Copy link
Contributor

tolusha commented Jul 18, 2022

Pls run make fmt to format the code

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #1445 (1ec10ff) into main (35bd691) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 1ec10ff differs from pull request most recent head 9dbed7e. Consider uploading reports for the commit 9dbed7e to get more accurate results

@@            Coverage Diff             @@
##             main    #1445      +/-   ##
==========================================
+ Coverage   60.41%   60.43%   +0.01%     
==========================================
  Files          74       74              
  Lines        6286     6288       +2     
==========================================
+ Hits         3798     3800       +2     
  Misses       2118     2118              
  Partials      370      370              
Impacted Files Coverage Δ
api/v2/zz_generated.deepcopy.go 0.00% <ø> (ø)
pkg/deploy/server/server_deployment.go 80.78% <100.00%> (+0.13%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35bd691...9dbed7e. Read the comment docs.

Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Jul 18, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: tolusha, vinokurig

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Jul 18, 2022

@vinokurig: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/v9-devworkspace-happy-path 9dbed7e link true /test v9-devworkspace-happy-path

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@vinokurig vinokurig merged commit 452b078 into main Jul 27, 2022
@vinokurig vinokurig deleted the che-21517 branch July 27, 2022 09:24
@che-bot che-bot added this to the 7.51 milestone Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants