Add timestamps to .vsix packages

Also publish links to the latest ones on a simple web page.

Want to use envsubst command from it.
This commit is contained in:
Kris De Volder
2016-12-09 13:57:58 -08:00
parent d69241cc6a
commit 75e550713f
5 changed files with 82 additions and 25 deletions

View File

@@ -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 \

View File

@@ -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

View File

@@ -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
<!DOCTYPE html>
<html>
<body>
<h1>STS4 Vscode Extensions</h1>
<ul>
<li>Spring Boot Property Language Server:
<a href="http://s3-test.spring.io/sts4/vscode-extensions/${vscode_boot_properties}">${vscode_boot_properties}</a>
</li>
<li>Cloud Foundry Manifest Language Server:
<a href="http://s3-test.spring.io/sts4/vscode-extensions/${vscode_manifest_yaml}">${vscode_manifest_yaml}</a>
</li>
</ul>
</body>
</html>
XXXXXX
cat $target/vscode-extensions.html

View File

@@ -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"

View File

@@ -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