diff --git a/.github/workflows/docker-git-init.yml b/.github/workflows/docker-git-init.yml new file mode 100644 index 00000000..27c43677 --- /dev/null +++ b/.github/workflows/docker-git-init.yml @@ -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 . diff --git a/.github/workflows/docker-landing-page.yml b/.github/workflows/docker-landing-page.yml index e8cf3ed3..84d944c6 100644 --- a/.github/workflows/docker-landing-page.yml +++ b/.github/workflows/docker-landing-page.yml @@ -1,10 +1,10 @@ -name: Docker landing Page CI +name: Docker Landing Page CI on: push: branches: [ main ] pull_request: - branches: [ main, osweek23 ] + branches: [ main ] jobs: diff --git a/.github/workflows/docker-operator.yml b/.github/workflows/docker-operator.yml index 134fa667..5e87e91e 100644 --- a/.github/workflows/docker-operator.yml +++ b/.github/workflows/docker-operator.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main, osweek23 ] + branches: [ main ] jobs: diff --git a/.github/workflows/docker-try-now-page.yml b/.github/workflows/docker-try-now-page.yml index 41816bf6..566f4070 100644 --- a/.github/workflows/docker-try-now-page.yml +++ b/.github/workflows/docker-try-now-page.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main, osweek23 ] + branches: [ main ] jobs: diff --git a/.github/workflows/docker-wondershaper.yml b/.github/workflows/docker-wondershaper.yml index 8c4ca64f..3d0be9ed 100644 --- a/.github/workflows/docker-wondershaper.yml +++ b/.github/workflows/docker-wondershaper.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main, osweek23 ] + branches: [ main ] jobs: diff --git a/.github/workflows/service-ci.yml b/.github/workflows/service-ci.yml index 6874f4f7..4867f362 100644 --- a/.github/workflows/service-ci.yml +++ b/.github/workflows/service-ci.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main, osweek23 ] + branches: [ main ] jobs: diff --git a/.vscode/extensions.json b/.vscode/extensions.json index cad1a218..91ec209a 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "hashicorp.terraform" + "hashicorp.terraform", + "ms-python.python" ] -} \ No newline at end of file +} diff --git a/doc/docs/Building-Internal.md b/doc/docs/Building-Internal.md index b0384e57..857922bc 100644 --- a/doc/docs/Building-Internal.md +++ b/doc/docs/Building-Internal.md @@ -61,3 +61,10 @@ Build and push the operator with: docker build --no-cache -t theiacloud/theia-cloud-operator:latest -f dockerfiles/operator/Dockerfile . docker push theiacloud/theia-cloud-operator:latest ``` + +Build and push the git-init container: + +```bash +docker build -t theiacloud/theia-cloud-git-init:latest -f dockerfiles/git-init/Dockerfile . +docker push theiacloud/theia-cloud-git-init:latest +``` diff --git a/doc/docs/openapi.json b/doc/docs/openapi.json index da4f4057..09088c09 100644 --- a/doc/docs/openapi.json +++ b/doc/docs/openapi.json @@ -2,7 +2,7 @@ "openapi" : "3.0.3", "info" : { "title" : "Theia.cloud API", - "version" : "0.8.0" + "version" : "0.8.1" }, "paths" : { "/service" : { @@ -144,6 +144,7 @@ "description" : "Not Allowed" } }, + "deprecated" : true, "security" : [ { "SecurityScheme" : [ ] } ] @@ -422,6 +423,40 @@ } } }, + "GitInit" : { + "description" : "Holds information used to initialize a Workspace with a clone of a Git repository.", + "required" : [ "repository", "checkout" ], + "type" : "object", + "properties" : { + "repository" : { + "description" : "The Git repository URL.", + "type" : "string" + }, + "checkout" : { + "description" : "The branch, commit-id, or tag name to checkout.", + "type" : "string", + "example" : "main, bd402d6, tags/1.0.0" + }, + "authInformation" : { + "description" : "Key for the required auth information, if the repository is not public.", + "type" : "string" + } + } + }, + "InitOperation" : { + "type" : "object", + "properties" : { + "id" : { + "type" : "string" + }, + "arguments" : { + "type" : "array", + "items" : { + "type" : "string" + } + } + } + }, "LaunchRequest" : { "description" : "A request to launch a new session.", "required" : [ "appId", "user" ], @@ -462,6 +497,13 @@ }, { "description" : "Environment variables" } ] + }, + "gitInit" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GitInit" + }, { + "description" : "Git Init information" + } ] } } }, @@ -589,6 +631,12 @@ "items" : { "type" : "string" } + }, + "initOperations" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InitOperation" + } } } }, @@ -624,6 +672,13 @@ }, { "description" : "Environment variables" } ] + }, + "gitInit" : { + "allOf" : [ { + "$ref" : "#/components/schemas/GitInit" + }, { + "description" : "Git Init information" + } ] } } }, @@ -737,6 +792,9 @@ "description" : "Authentication", "flows" : { "implicit" : { + "authorizationUrl" : "http://localhost:34159/realms/quarkus/protocol/openid-connect/auth", + "tokenUrl" : "http://localhost:34159/realms/quarkus/protocol/openid-connect/token/introspect", + "refreshUrl" : "http://localhost:34159/realms/quarkus/protocol/openid-connect/token" } } } diff --git a/dockerfiles/git-init/Dockerfile b/dockerfiles/git-init/Dockerfile new file mode 100644 index 00000000..fae57066 --- /dev/null +++ b/dockerfiles/git-init/Dockerfile @@ -0,0 +1,19 @@ +FROM debian:11-slim + +RUN apt update && \ + apt install python3 git -y && \ + apt clean && \ + mkdir /user && \ + chmod 777 /user && \ + chmod 777 /etc/passwd + +WORKDIR /tmp +COPY python/git-init/entrypoint.sh . +COPY python/git-init/ssh-keyscan.sh . +COPY python/git-init/git-init.py . +COPY python/git-init/git-askpw.py . + +ENV GIT_ASKPASS=/tmp/git-askpw.py + +ENTRYPOINT [ "/tmp/entrypoint.sh" ] +CMD ["-h"] \ No newline at end of file diff --git a/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs b/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs index 606155f8..766a660b 100644 --- a/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs +++ b/java/common/org.eclipse.theia.cloud.common/.settings/org.eclipse.jdt.ui.prefs @@ -3,7 +3,7 @@ editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=org.eclipse.jdt.ui.default.sun_profile formatter_settings_version=21 org.eclipse.jdt.ui.javadoc=false -org.eclipse.jdt.ui.text.custom_code_templates=