diff --git a/concourse/docker/Dockerfile b/concourse/docker/Dockerfile index f2fd58f7e..02f4a5a1f 100644 --- a/concourse/docker/Dockerfile +++ b/concourse/docker/Dockerfile @@ -4,6 +4,7 @@ ADD npmrc /root/.npmrc RUN apt-get update && apt-get install -y \ build-essential \ + gettext-base \ git \ jq \ openjdk-8-jdk \ diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 9bbc5bbea..425402ba3 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -1,9 +1,15 @@ +########################################################## resource_types: +- name: s3-multi + type: docker-image + source: + repository: kdvolder/s3-resource-simple - name: slack-notification type: docker-image source: repository: cfcommunity/slack-notification-resource tag: latest +######################################################### resources: - name: docker-git type: git @@ -36,6 +42,17 @@ resources: secret_access_key: {{s3_secretkey}} region_name: {{s3_region}} regexp: sts4/vscode-extensions/vscode-manifest-yaml-(.*).vsix +- name: website + type: s3-multi + source: + bucket: {{s3_bucket}} + access_key_id: {{s3_accesskey}} + secret_access_key: {{s3_secretkey}} + region_name: {{s3_region}} + path: sts4/nigthly-distributions + options: + - "--acl public-read" + - "--delete" - name: slack-notification type: slack-notification source: @@ -69,12 +86,27 @@ jobs: - put: s3-manifest-yaml-vsix params: file: vsix-files/vscode-manifest-yaml-*.vsix + acl: public-read - put: s3-boot-properties-vsix params: file: vsix-files/vscode-boot-properties-*.vsix + acl: public-read on_failure: put: slack-notification params: channel: "@kdvolder" text: | Concourse ${BUILD_PIPELINE_NAME}/${BUILD_JOB_NAME}/${BUILD_NAME} has failed! +- name: build-website + plan: + - aggregate: + - get: sts4 + - get: s3-manifest-yaml-vsix + trigger: true + - get: s3-boot-properties-vsix + trigger: true + - task: build-website + file: sts4/concourse/tasks/build-website.yml + - put: website + params: + path: website diff --git a/concourse/tasks/build-website.sh b/concourse/tasks/build-website.sh new file mode 100755 index 000000000..354311569 --- /dev/null +++ b/concourse/tasks/build-website.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -e +workdir=`pwd` +sources=$workdir/sts4/eclipse-distribution/common/html +target=$workdir/website + +#cp -r "${sources}/stylesheet.css" "$target" +#cp -r ${sources}/*.js "$target" +#cp s3-manifest-yaml-vsix/*.vsix "$target" +#cp s3-boot-properties-vsix/*.vsix "$target" + +export vscode_manifest_yaml=$(basename s3-manifest-yaml-vsix/*.vsix) +echo "vscode_manifest_yaml=$vscode_manifest_yaml" +export vscode_boot_properties=$(basename s3-boot-properties-vsix/*.vsix) +echo "vscode_boot_properties=$vscode_boot_properties" +envsubst > "$target/vscode-extensions.html" << XXXXXX + + + + +

STS4 Vscode Extensions

+ + + + + +XXXXXX + +cat $target/vscode-extensions.html diff --git a/concourse/tasks/build-website.yml b/concourse/tasks/build-website.yml new file mode 100644 index 000000000..c6325f3e7 --- /dev/null +++ b/concourse/tasks/build-website.yml @@ -0,0 +1,13 @@ +inputs: +- name: sts4 +- name: s3-manifest-yaml-vsix +- name: s3-boot-properties-vsix +outputs: +- name: website +platform: linux +image_resource: + type: docker-image + source: + repository: kdvolder/sts4-build-env +run: + path: "sts4/concourse/tasks/build-website.sh" diff --git a/concourse/tasks/mvn-package.yml b/concourse/tasks/mvn-package.yml deleted file mode 100644 index aa1ffc9e2..000000000 --- a/concourse/tasks/mvn-package.yml +++ /dev/null @@ -1,25 +0,0 @@ -# This is meant to be run as a local task -# I.e. you upload the code from local hd and -# It gets built in concourse ci -# -# To run it: -# -# - cd to the top of sts4 git repo on your machine -# - git clean -fxd (to avoid sending stuff that's not needed like locally built crap in maven target dirs) -# Caution! This command may delete files you may still want (if they are new and not yet tracked by git) -# - fly -t tools execute -c concourse/tasks/mvn-package.yml ---- -platform: linux - -image_resource: - type: docker-image - source: - repository: kdvolder/sts4-build-env - -inputs: -- name: sts4 - -run: - path: mvn - args: ["clean", "package"] - dir: sts4/vscode-extensions