Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/deploy_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/deploy_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/deploy_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 38 additions & 8 deletions src/content/docs/developing/local/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,50 @@ If you would prefer to change the default location, the user can right-click on

The user can change the deploy directory at any by using the same right-click option on another directory.

## 3. The Deploy button / Running the deployment process
## 3. Deployment

Using the 'Deploy' button on the status bar will start the deployment process. If the workspace has more than one folder, the user will have to select which folder they want to deploy.
### Running the deployment
Using the `Deploy` button on the status bar will start the deployment process. If the workspace has more than one folder, the user will have to select which folder they want to deploy.
![](../../../../assets/deploy_01.png)

There are five options for deployment:
Running the deployment will prompt the user to chose a deployment method amongst the [five possible options](#deployment-methods), unless a default method has been selected in the [connection settings](#setting-the-default-deployment-method).
![](../../../../assets/deploy_02.png)

1. Working Changes: This only works if the chosen workspace folder is a git repository. Code for IBM i will look at the git status to determine the files that have been changed since the last commit (unstaged and staged) and only uploads those files.
2. Staged Changes: The same as the "Working Changes" option, but only uploads staged / indexed files.
3. All: Will upload all files in the chosen workspace folder. Will ignore files that are part of the '.gitignore' file if it exists.
4. Changes: Will upload only files that VSCode knows have changed in the workspace since the last deploy.
5. Compare: Will compare every file in the local workspace against the deploy location and upload only those detected as different (by means of MD5 checksums). This is also the only method that will delete files from the deploy location, if they have been removed from the local workspace folder.
### Deployment methods

#### Working Changes
This only works if the chosen workspace folder is a git repository. Code for IBM i will look at the git status to determine the files that have been changed since the last commit (unstaged and staged) and only uploads those files.

#### Staged Changes
The same as the `Working Changes` option, but only uploads staged / indexed files.

#### All
Will upload all files in the chosen workspace folder.

#### Changes
Will upload only files that VSCode knows have changed in the workspace since the last deploy.

#### Compare
Will compare every file in the local workspace against the deploy location and upload only those detected as different (by means of MD5 checksums). This is also the only method that will delete files from the deploy location, if they have been removed from the local workspace folder.

The user can also define Actions that are for the 'file' (local) type to run the deploy before running the Action.

### Setting the default deployment method
Open the connection settings, go to the `Source Code` tab and select the default deployment method to apply when running a deployment.
![](../../../../assets/deploy_03.png)

### Ignore files during deployment with `.gitignore` and `.deployignore`
All the deployment methods will take into account the `.gitignore` file and they will not deploy files matching the patterns defined in it.

For example, this pattern, if put in `.gitignore`, will prevent all the files under the project's `images` and `assets` folders from being deployed:
```
images/**
assets/**
```

In case the patterns to ignore files during the deployment must be different from those found in `.gitignore`, a `.deployignore` file can be put at the root of the workspace folder. It will superseds `.gitignore` during the deployment to ignore files. `.deployignore` uses the same patterns as `.gitignore`.


## 4. Workspace Actions (deploy & build)

{/* Lots of this text comes from the variables.md file */}
Expand Down