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 and Bitbucket Server support #752

Merged
merged 4 commits into from
Jul 3, 2023
Merged

Add Bitbucket and Bitbucket Server support #752

merged 4 commits into from
Jul 3, 2023

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Jun 23, 2023

What does this PR do?

Add Bitbucket and Bitbucket Server support

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-4323

How to test this PR?

  1. Deploy bitbucket server: https://github.com/che-incubator/git-srv/tree/main/bitbucket.
  2. Create a repository with a devfile in the bitbucket server instance.
  3. Go to projects directory: '/tools/devworkspace-generator' directory
  4. execute yarn
  5. execute
node lib/entrypoint.js \
        --plugin-registry-url:https://che-plugin-registry-main.surge.sh/v3/ \
        --editor-entry:che-incubator/che-code/latest \
        --output-file:<output directory> \
        --injectDefaultComponent:true \
        --defaultComponentImage:registry.access.redhat.com/ubi8/openjdk-11:latest \
        --devfile-url:<url of the bitbucket server repo>

See: yaml file is generated and contains the devfile from the repository.

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.

@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@vinokurig vinokurig marked this pull request as ready for review June 23, 2023 13:50
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Copy link
Contributor

@svor svor left a comment

Choose a reason for hiding this comment

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

In general codebase looks good to me

@vinokurig
Copy link
Contributor Author

@svor I have added some new fixes for the build/scripts/generate_devworkspace_templates.sh and build/scripts/update_devworkspace_templates.sh scripts. Could you please take a look.

@vinokurig vinokurig requested a review from svor June 28, 2023 10:14
Copy link
Contributor

@svor svor left a comment

Choose a reason for hiding this comment

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

I've tried to run ./build.sh script and it was failed because of test didn't cover new code, could you please fix that.

The GH action didn't detect the problem because it builds only Dockerfile, probably we have to fix that but not in this PR

@vinokurig
Copy link
Contributor Author

@svor I've fixed the tests so the ./build.sh script executes without errors. Addressed other comments, please take a look.

Copy link
Contributor

@svor svor left a comment

Choose a reason for hiding this comment

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

  • Tested for both Bitbucket and Github repositories.
  • Generated devworkspaces by:
node lib/entrypoint.js \
        --devfile-url:https://bitbucket-bitbucket.apps.cluster-84ndn.84ndn.sandbox2846.opentlc.com/scm/myp/ansible-devspaces-demo.git \
        --plugin-registry-url:https://che-plugin-registry-main.surge.sh/v3/ \
        --editor-entry:che-incubator/che-code/latest \
        --output-file:/tmp/devworkspace-che-code-ansible-latest.yaml
DevWorkspace che-code-ansible-demo was generated.
  • Started workspaces from generated files
    screenshot-eclipse-che apps cluster-84ndn 84ndn sandbox2846 opentlc com-2023 06 30-15_08_13

Copy link
Contributor

@ScrewTSW ScrewTSW left a comment

Choose a reason for hiding this comment

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

LGTM

@vinokurig vinokurig merged commit 99986b8 into main Jul 3, 2023
6 checks passed
@vinokurig vinokurig deleted the CRW-4323 branch July 3, 2023 06:57
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

4 participants