Skip to content

Commit 81269b9

Browse files
committed
Add new API to Service #69
* Extend public API * add verification job for new docker image * do not update all references to @eclipse-theiacloud/common: 0.8.1-alpha.2 yet, since this is not released yet
1 parent b78952a commit 81269b9

File tree

7 files changed

+35
-15
lines changed

7 files changed

+35
-15
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Docker Git Init CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Build the Docker image
18+
run: docker build -t theia-cloud-git-init:$(date +%s) -f dockerfiles/git-init/Dockerfile .

node/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@eclipse-theiacloud/common",
3-
"version": "0.8.1-alpha.1",
3+
"version": "0.8.1-alpha.2",
44
"description": "Common functionality for Theia.cloud",
55
"license": "EPL-2.0",
66
"keywords": [

node/common/src/client.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
22
import { v4 as uuidv4 } from 'uuid';
33

44
import {
5-
LaunchRequest as ClientLaunchRequest,
5+
GitInit as ClientGitInit, LaunchRequest as ClientLaunchRequest,
66
PingRequest as ClientPingRequest, RootResourceApi, SessionActivityRequest as ClientSessionActivityRequest, SessionListRequest as ClientSessionListRequest,
77
SessionPerformance, SessionPerformanceRequest as ClientSessionPerformanceRequest,
88
SessionResourceApi, SessionSpec, SessionStartRequest as ClientSessionStartRequest, SessionStopRequest as ClientSessionStopRequest,
@@ -49,13 +49,13 @@ export namespace LaunchRequest {
4949
}
5050

5151
export function createWorkspace(serviceUrl: string, appId: string, appDefinition: string, timeout?: number, user: string = createUser(),
52-
workspaceName?: string, label?: string): LaunchRequest {
53-
return { serviceUrl, appId, appDefinition, user, label, workspaceName, ephemeral: false, timeout };
52+
workspaceName?: string, label?: string, gitInit?: GitInit): LaunchRequest {
53+
return { serviceUrl, appId, appDefinition, user, label, workspaceName, ephemeral: false, timeout, gitInit };
5454
}
5555

5656
// eslint-disable-next-line max-len
57-
export function existingWorkspace(serviceUrl: string, appId: string, workspaceName: string, timeout?: number, appDefinition?: string, user: string = createUser()): LaunchRequest {
58-
return { serviceUrl, appId, workspaceName, appDefinition, user, timeout };
57+
export function existingWorkspace(serviceUrl: string, appId: string, workspaceName: string, timeout?: number, appDefinition?: string, user: string = createUser(), gitInit?: GitInit): LaunchRequest {
58+
return { serviceUrl, appId, workspaceName, appDefinition, user, timeout, gitInit };
5959
}
6060
}
6161

@@ -99,6 +99,8 @@ export namespace WorkspaceDeletionRequest {
9999
export const KIND = 'workspaceDeletionRequest';
100100
}
101101

102+
export type GitInit = ClientGitInit;
103+
102104
export namespace TheiaCloud {
103105
function rootApi(serviceUrl: string, accessToken: string | undefined): RootResourceApi {
104106
return new RootResourceApi(new Configuration({ basePath: serviceUrl, accessToken }));

node/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/testing-page/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@eclipse-theiacloud/common": "0.8.1-alpha.1",
6+
"@eclipse-theiacloud/common": "0.8.1-alpha.2",
77
"@testing-library/jest-dom": "^5.16.5",
88
"@testing-library/react": "^13.4.0",
99
"@testing-library/user-event": "^13.5.0",

node/try-now-page/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": ".",
66
"dependencies": {
7-
"@eclipse-theiacloud/common": "0.8.1-alpha.1",
7+
"@eclipse-theiacloud/common": "0.8.1-alpha.2",
88
"@testing-library/jest-dom": "^5.16.4",
99
"@testing-library/react": "^13.2.0",
1010
"@testing-library/user-event": "^13.5.0",

terraform/terraform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ You might have to configure the firewall for mounting.
6666

6767
```bash
6868
# This mounts the ~/tmp/minikube on the machine running minikube into minkube.
69-
# Check the persisted volume to find the exact /tmp/hostpath-provisioner/theia-cloud/id path
70-
minikube mount ~/tmp/minikube:/tmp/hostpath-provisioner/theia-cloud/a36c30cee-4d97-4097-826a-31ba72734fd0-pvc-ws-asdfghjkl-theia-c/
69+
# Check the persisted volume to find the exact /tmp/hostpath-provisioner/theia-cloud/ path
70+
minikube mount --uid 101 --gid 101 ~/tmp/minikube:/tmp/hostpath-provisioner/theia-cloud
7171
```
7272

7373
#### Destroy Minikube Cluster

0 commit comments

Comments
 (0)