Skip to content

Commit

Permalink
Add new API to Service #69
Browse files Browse the repository at this point in the history
* Extend public API
* add verification job for new docker image
* do not update all references to @eclipse-theiacloud/common:
0.8.0-alpha.23 yet, since this is not released yet
  • Loading branch information
jfaltermeier committed Nov 23, 2023
1 parent b78952a commit f06f15f
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 16 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-git-init.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Git Init CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build -t theia-cloud-git-init:$(date +%s) -f dockerfiles/git-init/Dockerfile .
2 changes: 1 addition & 1 deletion node/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eclipse-theiacloud/common",
"version": "0.8.1-alpha.1",
"version": "0.8.1-alpha.2",
"description": "Common functionality for Theia.cloud",
"license": "EPL-2.0",
"keywords": [
Expand Down
12 changes: 7 additions & 5 deletions node/common/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
import { v4 as uuidv4 } from 'uuid';

import {
LaunchRequest as ClientLaunchRequest,
GitInit as ClientGitInit, LaunchRequest as ClientLaunchRequest,
PingRequest as ClientPingRequest, RootResourceApi, SessionActivityRequest as ClientSessionActivityRequest, SessionListRequest as ClientSessionListRequest,
SessionPerformance, SessionPerformanceRequest as ClientSessionPerformanceRequest,
SessionResourceApi, SessionSpec, SessionStartRequest as ClientSessionStartRequest, SessionStopRequest as ClientSessionStopRequest,
Expand Down Expand Up @@ -49,13 +49,13 @@ export namespace LaunchRequest {
}

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

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

Expand Down Expand Up @@ -99,6 +99,8 @@ export namespace WorkspaceDeletionRequest {
export const KIND = 'workspaceDeletionRequest';
}

export type GitInit = ClientGitInit;

export namespace TheiaCloud {
function rootApi(serviceUrl: string, accessToken: string | undefined): RootResourceApi {
return new RootResourceApi(new Configuration({ basePath: serviceUrl, accessToken }));
Expand Down
2 changes: 1 addition & 1 deletion node/landing-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@eclipse-theiacloud/common": "0.8.1-alpha.1",
"@eclipse-theiacloud/common": "0.8.1-alpha.2",
"@types/uuid": "^8.3.2",
"axios": "^0.25.0",
"core-js": "^3.6.5",
Expand Down
10 changes: 5 additions & 5 deletions node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/testing-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@eclipse-theiacloud/common": "0.8.1-alpha.1",
"@eclipse-theiacloud/common": "0.8.1-alpha.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
2 changes: 1 addition & 1 deletion node/try-now-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"homepage": ".",
"dependencies": {
"@eclipse-theiacloud/common": "0.8.1-alpha.1",
"@eclipse-theiacloud/common": "0.8.1-alpha.2",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
4 changes: 2 additions & 2 deletions terraform/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ You might have to configure the firewall for mounting.

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

#### Destroy Minikube Cluster
Expand Down

0 comments on commit f06f15f

Please sign in to comment.