Introduction
There are several excellent cloud-based source-code repositories available that can be used to set up powerful team collaboration spaces for managing your projects.
This Guide covers how to share an Elastic COBOL project with a (free) Bitbucket repository using the git source code management toolset.
This Guide does not attempt to cover the full use of using a SCM with a cloud-based repository as that is an extensive topic. Rather, it describes a series of steps that can be used as a basic model for the concept.
Using this Guide
Within each section, there are a set of suggested actions that you should take. These actions are identified as:
- Perform the action described in this text.
Outline
This article covers the following steps:
- Creating your Bitbucket account & repository (Bitbucket Setup)
- Setting up Elastic COBOL IDE with Bitbucket credentials (Bitbucket Setup in Elastic COBOL)
- Creating a new Elastic COBOL project (Elastic COBOL Project)
- Sharing the Elastic COBOL project in Bitbucket (Sharing in Bitbucket)
- Reviewing the Bitbucket repository and committing a change (Review & Change)
Bitbucket Setup
- Go to http://bitbucket.org and click "Sign up" (top right of the page).
- Enter your credentials, for example:
- Click "Sign up" and you will receive an email that includes a confirmation link that you must click to activate your account:
- At the top of the Bitbucket page, click "Create", and enter the following information, and click "Create repository".
Bitbucket Setup in Elastic COBOL
- In the Elastic COBOL IDE, select "Windows > Preferences > Team > Git > Configuration".
- Click "Add Entry", enter "user.email" in "Key" and enter "elasticbot@bitbucket.org" (substitute your Bitbucket email id).
- Click "Add Entry", enter "user.name" in "Key" and enter "Elastic Bot" (substitute your name).
- Expanding "user" should give you something similar to:
- Click "OK".
Elastic COBOL Project
- In the "Elastic COBOL" perspective of the IDE, select "File > New > COBOL Project".
- Enter "xmlp" as "Project name" and select "Samples > XML PARSE > Finish".
- In the "Navigator" view, expand "xmlp", right-click on "xmlp" and select "Team > Share Project > Git > Next".
- Click "Create", enter "xmlp" in "Name", and click "Finish":
- Click "Finish".
- In the "Navigator" view, right-click on "xmlp" and select "Team > Add to Index" (this identifies the project artifacts you want to track).
- In the "Navigator" view, right-click on "xmlp" and select "Team > Commit", enter "initial" as the "Commit message" and click "Commit". The project artifacts are now part of the xmlp git repository on your local machine:
Sharing in Bitbucket
The final step to setting up the project in Bitbucket is to push the local project to the cloud repository.
- In the "Navigator" view, right-click on "xmlp" and select "Team > Remote > Push".
- In the "Push to Another Repository" dialog, enter "https://elasticbot@bitbucket.org/elasticbot/xmlp.git" into the "URI" field (substitute your username), enter your Bitbucket username & password, and click "Next":
- On the "Push to https://..." dialog, click "Add All Branches Spec", and then click "Finish":
Review & Change
The Bitbucket repository now contains a copy of your project that other users can download, change and commit changes to.
- At the top of the Bitbucket web page, select "Repositories > elasticbot / xmlp" (substitute your username).
- From here you can review the repository "Source" and the "Commits" made. Select "Commits":
- Click on the hex sequence under "Commit" to show the contents of the commit payload that was pushed (uploaded).
- In the Elastic COBOL IDE, in the "Navigator" view, expand "xmlp > cobol_source", right-click on "xmlparse.cbl" and select "Open".
- In the "Editor" view, change "XMLPARSE" to "XMLPARSE DEMO". Further down, change "main-paragraph." to "xmlp-main-para", and click the "Save" icon on the toolbar.
- In the "Navigator" view, right-click on "xmlp" and select "Team > Commit".
- Enter "some small mods" for the "Commit message", then click "Commit and Push":
- Enter "https://elasticbot@bitbucket.org/elasticbot/xmlp.git" into the "URI" field (substitute your username), enter your Bitbucket username & password, and click "Next".
- On the "Push to https://..." dialog, click "Add All Branches Spec", and then click "Finish":
- Clicking "Commit" on Bitbucket web page will now show you the "some small mods" payload. Clicking on the hex sequence associated with that commit, will then show you all the changes that occurred (including the source code mods made above and the resulting changes in the files produced by the Elastic COBOL compiler).
0 Comments