Skip to content

Commit

Permalink
Preparing for release
Browse files Browse the repository at this point in the history
  • Loading branch information
tinchodias committed Jan 31, 2021
1 parent 73e7e8a commit d1fcfeb
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 44 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Run All Tests
name: Complete Test

on:
# Run on push and pull requests on any branch, but ignore if change doesn't affect code.
push:
branches: [ dev-1.9 ]
paths-ignore:
- 'README.md'
- 'docs/**'
pull_request:
branches: [ dev-1.9 ]
paths-ignore:
- 'README.md'
- 'docs/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
test:
strategy:
# Default value means that a failure in one OS cancels all
fail-fast: false
matrix:
smalltalk: [ Pharo64-9.0 ]
Expand All @@ -27,7 +30,7 @@ jobs:
os: windows-latest
ston: .smalltalk.windows.ston
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }} with ${{ matrix.ston }}
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Setup smalltalkCI
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
name: Update in Pharo
name: Update Test

on:
push:
branches: [ dev-1.9 ]
pull_request:
branches: [ dev-1.9 ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
update:
runs-on: ubuntu-latest
name: Update Iceberg in Pharo (only loading, no tests running)
steps:
- uses: actions/checkout@v2
- run: scripts/testUpdateIceberg.sh
- run: scripts/testUpdateIceberg.sh --dev
shell: bash
timeout-minutes: 15
49 changes: 49 additions & 0 deletions docs/Authentication-Credentials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

# Authentication Credentials

Iceberg performs two kinds of operations that normally require authentication:
- Git operations, such as clone, checkout, and push.
- Extra API operations, such as accept or reject a Pull Request via GitHub Plugin (which uses their [REST API](https://developer.github.com/v3/)).

The git operation will be authenticated depending on the chosen protocol (SSH or HTTPS). For SSH, only SSH credentials can be used, but for HTTPS, you have two options: Plain-Text and Token Credentials.

The Extra API operations can't be authenticated with SSH credentials.
You need Plain-Text and Token Credentials for these.

When authentication fails in an operation, Iceberg shows a dialog asking for Plain Text Credential, which consists on username and password. But that **may not** be the credential you need. For example, you may need a Token Credentials, explained below.

## Token Credentials

Personal access tokens are an alternative to using passwords for authentication. This is important for GitHub users, since using passwords on API calls [is not supported anymore](https://developer.github.com/changes/2/#--deprecating-password-authentication). Following, we describe the steps to register for token in Iceberg.

First, create a Personal Access Token in your GitHub account.
You can [follow this guide](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) to do it.
Include all "repo" and "user" permissions (scopes).
You won't be able to read the token after the webpage is closed, to paste it in a safe place.

Second, go to your Pharo image and open Iceberg -> Settings -> Edit credentials -> Add Token, as shown in the screenshot below.
Normally, you should fill the 'Username' field with your email.
Fill the Host field with 'github.com' to use the token for that server.

![image](images/token-credentials.png)

This wasn't tested on other servers, but it may work for git operations:
- [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)
- [BitBucket](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)

### Scripting

Alternatively, you can register your credential without using the GUI:

```Smalltalk
IceCredentialStore current
storeCredential: (IceTokenCredentials new
username: '[email protected]';
token: '4a01...e072';
yourself)
forHostname: 'github.com'.
```

## Troubleshooting

For troubleshooting, please refer to the [README's F.A.Q. section](https://github.com/pharo-vcs/iceberg#faq), which is the curret source to handle several issues with authentication.
33 changes: 18 additions & 15 deletions docs/Home.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# Welcome to Iceberg
# Welcome to Iceberg's Wiki

Iceberg is a set of tools that allow developers to handle git repositories directly from a Pharo image.

Next, we organize links to topics according to the reader's intention:
We gather in this Wiki section the documentation for users and developers.
Next, we organize the contents according to the reader's intention:

* For Users:
- [Tutorial: Getting Started](Tutorial)
- [Tutorial: Hotfixes](Metacello-Support)
- [Loading Baselines (Metacello Support)](Metacello-Support)
- [Glossary](Iceberg-glossary)
- [F.A.Q. (Frequently Asked Questions)](FAQ)
- [Advanced: Recovering Code Manually](Recovering-Code)
- [History (Background)](Background.md)
* For Contributors:
- [Contributing to Iceberg](Contributing-to-Iceberg)
- [How to Help? A List of Missing Features](How-to-help-us,-What-you-could-contribute)
- [Discussion: Working Copies?](The-Working-Copy(ies))
- [Discussion: Branching and Merging](Branching-and-Merging)
For Users:
- [Tutorial: Getting Started](Tutorial)
- [Tutorial: Hotfixes](Hotfixes)
- [Authentication Credentials](Authentication-Credentials)
- [Loading Baselines (Metacello Support)](Metacello-Support)
- [Glossary](Iceberg-glossary)
- [F.A.Q. (Frequently Asked Questions)](FAQ)
- [Advanced: Recovering Code Manually](Recovering-Code)
- [History (Background)](Background.md)

For Contributors:
- [Contributing to Iceberg](Contributing-to-Iceberg)
- [How to Help? A List of Missing Features](How-to-help-us,-What-you-could-contribute)
- [Discussion: Working Copies?](The-Working-Copy(ies))
- [Discussion: Branching and Merging](Branching-and-Merging)
14 changes: 1 addition & 13 deletions docs/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,4 @@ Both views are really similar: they list the commits to be pulled or pushed, and

Finally if you accept the dialog using the buttons "Pull" or "Push", they will take effect.


### Setting Git config values

Sometimes you may need to adjust the Git config values for your repository. For instance, to set your email address to your secure Github email address. The procedure is currently a little buried and perhaps there will be a modal for this in the future. You can do this from a command-line git tool outside of Pharo by going to the directory for the repo (in the `pharo-local/iceberg` directory of your image), but here is a method for doing it within Pharo.

1. Launch __Iceberg__
1. Right-click on the repository
1. Choose __Extra -> Inspect...__
![image](images/tutorial-repository-inspect.png)
1. In the __Raw__ tab, select `handle` to get to the underlying __LGitRepository__ instance
1. In the __Raw__ tab of the __LGitRepository__, access the email setter by using `self config email: '<your email address>'` and then `CMD/CTRL-d` to execute
![image](images/tutorial-config-set.png)
__LGitConfig__ also exposes __username__, which is not to be confused with the Github username, but is your friendly name for commit messages, like "Joel Wilson".
**Authentication.** Remote repositories normally require authentication for pushing. Please refer to the [Authentication Credentials](Authentication-Credentials) page.

0 comments on commit d1fcfeb

Please sign in to comment.