diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 2c130e442..f9083c5ae 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -14,6 +14,10 @@ resource_types: source: repository: springio/artifactory-resource tag: 0.0.10 +- name: theia-docker-image + type: docker-image + source: + repository: kdvolder/theia-sts4 ######################################################### resources: - name: monthly @@ -324,6 +328,22 @@ jobs: # params: # text: | # Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! +- name: build-theia-docker-snapshot-image + serial: true + plan: + - in_parallel: + - get: s3-concourse-vsix-snapshot + trigger: true + - get: s3-spring-boot-vsix-snapshot + trigger: true + - get: s3-bosh-vsix-snapshot + trigger: true + - get: s3-manifest-yaml-vsix-snapshot + trigger: true + - get: sts4 + - task: prepare-theia-docker-image + file: tasks/prepare-theia-docker-image.yml + - name: build-docker-image serial: true plan: @@ -1571,6 +1591,7 @@ groups: - publish-atom-releases - name: theia-snapshots jobs: + - build-theia-docker-snapshot-image - build-bosh-theia-snapshot - build-cf-manifest-yaml-theia-snapshot - build-concourse-theia-snapshot diff --git a/concourse/tasks/prepare-theia-docker-image.sh b/concourse/tasks/prepare-theia-docker-image.sh new file mode 100755 index 000000000..749f48d29 --- /dev/null +++ b/concourse/tasks/prepare-theia-docker-image.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e +workdir=$(pwd) +cp -R ${workdir}/sts4/concourse/theia-docker-image/* ${workdir}/output +for i in ${workdir}/*-vsix-*/*.vsix ; do + cp "$i" ${workdir}/output/plugins/ +done + +ls -Rl ${workdir}/output + diff --git a/concourse/tasks/prepare-theia-docker-image.yml b/concourse/tasks/prepare-theia-docker-image.yml new file mode 100644 index 000000000..8039b1aff --- /dev/null +++ b/concourse/tasks/prepare-theia-docker-image.yml @@ -0,0 +1,15 @@ +platform: linux +image_resource: + type: registry-image + source: + repository: kdvolder/sts4-build-env +inputs: +- name: sts4 +- name: s3-concourse-vsix-snapshot +- name: s3-spring-boot-vsix-snapshot +- name: s3-bosh-vsix-snapshot +- name: s3-manifest-yaml-vsix-snapshot +outputs: +- name: output +run: + path: sts4/tasks/prepare-theia-docker-image.sh \ No newline at end of file diff --git a/concourse/theia-docker-image/Dockerfile b/concourse/theia-docker-image/Dockerfile new file mode 100644 index 000000000..85c021e6e --- /dev/null +++ b/concourse/theia-docker-image/Dockerfile @@ -0,0 +1,29 @@ +FROM ubuntu:18.04 +RUN apt-get update && apt-get install -y \ + build-essential \ + gettext-base \ + git \ + jq \ + openjdk-8-jdk \ + curl + +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - +RUN apt-get install -y nodejs + +RUN npm install -g yarn + +RUN cd /usr/local/bin && \ + curl https://s3-us-west-1.amazonaws.com/cf-cli-releases/releases/v6.47.2/cf-cli_6.47.2_linux_x86-64.tgz | tar zxvf - + +RUN mkdir /theia-app +ADD package.json /theia-app +RUN cd /theia-app && \ + yarn && \ + yarn theia build + +ADD plugins /theia-app/plugins + +WORKDIR /theia-app +ENV SHELL /bin/bash +ENTRYPOINT [ "yarn", "theia", "start", "--hostname=0.0.0.0", "--plugins=local-dir:/theia-app/plugins/", "/home/project" ] +EXPOSE 3000 diff --git a/concourse/theia-docker-image/package.json b/concourse/theia-docker-image/package.json new file mode 100644 index 000000000..108cc7397 --- /dev/null +++ b/concourse/theia-docker-image/package.json @@ -0,0 +1,52 @@ +{ + "private": true, + "dependencies": { + "typescript" : "latest", + "@theia/callhierarchy": "next", + "@theia/console": "next", + "@theia/core": "next", + "@theia/debug": "next", + "@theia/debug-nodejs": "next", + "@theia/editor": "next", + "@theia/editor-preview": "next", + "@theia/editorconfig": "next", + "@theia/file-search": "next", + "@theia/filesystem": "next", + "@theia/getting-started": "next", + "@theia/git": "next", + "@theia/json": "next", + "@theia/keymaps": "next", + "@theia/languages": "next", + "@theia/markers": "next", + "@theia/merge-conflicts": "next", + "@theia/messages": "next", + "@theia/metrics": "next", + "@theia/mini-browser": "next", + "@theia/monaco": "next", + "@theia/navigator": "next", + "@theia/outline-view": "next", + "@theia/output": "next", + "@theia/plugin-dev": "next", + "@theia/plugin-ext": "next", + "@theia/plugin-ext-vscode": "next", + "@theia/plugin-metrics": "next", + "@theia/preferences": "next", + "@theia/preview": "next", + "@theia/process": "next", + "@theia/python": "next", + "@theia/scm": "next", + "@theia/search-in-workspace": "next", + "@theia/task": "next", + "@theia/terminal": "next", + "@theia/textmate-grammars": "next", + "@theia/tslint": "next", + "@theia/typehierarchy": "next", + "@theia/typescript": "next", + "@theia/userstorage": "next", + "@theia/variable-resolver": "next", + "@theia/workspace": "next" + }, + "devDependencies": { + "@theia/cli": "next" + } +} diff --git a/concourse/theia-docker-image/plugins/README.txt b/concourse/theia-docker-image/plugins/README.txt new file mode 100644 index 000000000..7419fccb1 --- /dev/null +++ b/concourse/theia-docker-image/plugins/README.txt @@ -0,0 +1,3 @@ +Place vscode .vsix files to be included into the +docker image into this directory prior to running +the docker build. \ No newline at end of file