Skip to content

Commit e7e4865

Browse files
author
Tim Etchells
committed
Finalize travis for opensource
1 parent 606d64d commit e7e4865

File tree

4 files changed

+67
-37
lines changed

4 files changed

+67
-37
lines changed

.travis.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
distro: Xenial
21
env:
3-
matrix:
4-
secure: FA7K+PfQh4DOHnSGBYORZcj816+wrryFv3GBvYBHbXAd27Or0V8PyTRxm6SEwL79wC9EtNla8r0OZ/xZHMGYn86JFEGQNYvMWZXxH7nom4cV85tQTL2RIbQPC4U8TjEbQDr1aEj1O97SFjw/UfgIjcs1Kuuxu/VNx4zWO1Wcs8xbvXiuQAveWraCLV41ZEpzJrCm7ljnwBGpKTJ1fb3odneBngDBWw6ilJNkyZ0/Y4KJxuBG/H0YYAdyf4Z26JuAgdOcqvSZ1L1qIp5t4NRTuE9nhg0bnL2aAXvUq3DKK4twpAxaCNz+31qy6WeNYvhHvK0+mVXze7O0d35/tpq1NV7ta6q02WCh570KBrsEO57Lb0PbSSOm+37z5GBRAXDUrwTRZgKXI9BdlFeJ2DYzwv+nVaJrUkxOuWgGJzsJ/EZBf3XBiIFHvLqq/lTnf1Zfo0JoLIgBQqtG4uKg3NUzGl7b5KytBCcYVJGA52QwfyxKfAi0Dg8ts6wVDjAt0eVjpdeDTavXG0PeFyZ+vNofEfC1FkXaMJv03yOd4UMMcipGgJScSg18YqhU6rmeglLW9i6GzqbdfIA/2N3vnd1XGOjyAyS8GzvtLY5kylKFpQpdswvjw8LB1NCT+jmqZoEWPvtlG7Sv0iRf9K238Xc6Qc6nXYaiPMQEgoAusToJ3CQ=
2+
global:
3+
- do_artifactory_deploy="true"
4+
- user_name="devexbld"
5+
- user_email="[email protected]"
6+
- artifactory_url="https://sys-mcs-docker-local.artifactory.swg-devops.com/artifactory/sys-mcs-docker-local/microclimate-vscode/"
7+
- secure: FA7K+PfQh4DOHnSGBYORZcj816+wrryFv3GBvYBHbXAd27Or0V8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g5eDQ3Tn60iU143DuCEGytx8jCaUbKz27nYLbtNDYDvz8AziHEL7//v25QPnDKbfwF34+vfYD6PwvAeQXEZeBfGJM1SyuNNdyGSP5tsPv4wTXSte3jmgcwcOgd+su31L//krTGoivoeS4MVE7f0PVLx7V3Xc6/3hUewXyGnb0FGydKMYx6LIYQzsFov0Ap/mk2QUQSz6ix1yzuVAVRcpBk/UVxKhA2B+A6aqPpLOEL7H/U5ifu4YJzz94B6UY1Tzs8hY1kny5O/hYM=
59

610
branches:
711
only:
812
- master
913

1014
notifications:
11-
on_success: change
12-
on_failure: change
15+
email:
16+
recipients:
17+
18+
19+
on_success: change
20+
on_failure: change
1321

1422
os:
1523
- linux
@@ -27,27 +35,31 @@ before_install:
2735
# Make sure compilation will succeed (vsce package won't show the compilation failures)
2836
# Fail the build if compile fails
2937
- npm run compile
30-
- npm run lint-f
38+
# Run the linter, could switch to lint-f to not fail the build
39+
- npm run lint
3140

3241
script:
3342
- vsce package
3443

3544
before_deploy:
36-
- git config --local user.name "devexbld"
37-
- git config --local user.email "[email protected]"
38-
- export TRAVIS_TAG="nightly-$(date +'%F')"
45+
- git config --local user.name "$user_name"
46+
- git config --local user.email "$user_email"
47+
48+
- export TRAVIS_TAG="nightly-$(date +'%F-%H%M')"
3949
- git tag $TRAVIS_TAG
4050
- export artifact_name="$(basename *.vsix)"
41-
- export tagged_artifact_name="${artifact_name/.vsix/$TRAVIS_TAG.vsix}"
51+
# Will resolve to something like "microclimate-tools-18.12.0_nightly-2018-12-07.vsix"
52+
- export tagged_artifact_name="${artifact_name/.vsix/_$TRAVIS_TAG.vsix}"
53+
4254
- cd ..
4355
- cp -v dev/*.vsix "./$tagged_artifact_name"
44-
- "./publish.sh"
56+
- ./publish-artifactory.sh || true
4557

4658
deploy:
4759
on:
4860
branch: master
61+
condition: $TRAVIS_EVENT_TYPE = cron
4962
provider: releases
5063
api_key: "$gh_apikey"
5164
file: "$tagged_artifact_name"
5265
skip_cleanup: true
53-

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
# Microclimate Developer Tools for VSCode
22

3-
[![Build Status](https://travis.ibm.com/dev-ex/microclimate-vscode.svg?token=jLZpzPrJozeLHsb1tpsR&branch=master)](https://travis.ibm.com/dev-ex/microclimate-vscode)
3+
[![Build Status](https://travis-ci.com/microclimate-dev2ops/microclimate-vscode-tools.svg?token=wpsJvyUkyhtfRa9prmMq&branch=master)](https://travis-ci.com/microclimate-dev2ops/microclimate-vscode-tools)
44

55
This is the Git repository top-level README.
66

7-
For the README packaged with this extension, see [the extension README](https://github.ibm.com/dev-ex/microclimate-vscode/tree/master/dev/README.md)
7+
For the README packaged with this extension, see [the extension README fix this link](github.com)
88

99
## How to install
10-
1. [Download the newest build from Artifactory](https://sys-mcs-docker-local.artifactory.swg-devops.com/artifactory/sys-mcs-docker-local/microclimate-vscode/)
11-
2. In VSCode, go `View` > `Extensions` > `...` overflow menu > `Install from VSIX...`
10+
Need to update this
1211

1312
## How to use
1413
- Open the Microclimate Projects view within the Explorer view group (`Ctrl/Cmd + Shift + E`),
1514
- Right-click to create a default local connection.
1615
- Right-click a project to see the actions available (see below)
1716
- Open the Command Pallete (`Ctrl/Cmd + Shift + P`) and type "Microclimate" to see the actions available
1817

18+
Link to the documentation
19+
1920
## Features
2021
- View all projects in Microclimate, including their app and build statuses
2122
- Debug **Microprofile, Spring, and Node** Microclimate projects
@@ -30,5 +31,7 @@ For the README packaged with this extension, see [the extension README](https://
3031
- Manually initiate project builds
3132
- Disable, Enable, and Delete projects
3233

34+
Link to the documentation
35+
3336
## Contributing
3437
We welcome issues (make this a link) and contributions from the public! See [CONTRIBUTING.md](https://github.ibm.com/dev-ex/microclimate-vscode/tree/master/CONTRIBUTING.md)

publish-artifactory.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# To be run from the repository root directory
4+
# $tagged_artifact_name must be set and the file it points to must be in the working directory
5+
6+
if [[ "$do_artifactory_deploy" != "true" ]]; then
7+
echo "$(basename $0): do_artifactory_deploy is not set to 'true', skipping."
8+
exit 0
9+
fi
10+
11+
set -e
12+
13+
build_info_file="last_build.txt"
14+
build_date="$(date +'%F_%H-%M_%Z')"
15+
commit_info="$(git log master -3 --pretty='%h by %an - %s')"
16+
17+
artifactory_path="$artifactory_url/"
18+
19+
if [[ "$tagged_artifact_name" == *"nightly"* ]]; then
20+
artifactory_path="${artifactory_path}nightlies/"
21+
fi
22+
23+
# Artifactory upload
24+
printf "Last build: $tagged_artifact_name at $build_date\n\nLatest commits:\n$commit_info" > "$build_info_file"
25+
26+
artf_resp=$(curl -X PUT -sS -u "$user_email:$artifactory_apikey" "$artifactory_path/$tagged_artifact_name" -T "$tagged_artifact_name")
27+
28+
if [[ "$artf_resp" != *"created"* ]]; then
29+
>&2 echo "Artifactory deploy failed!"
30+
>&2 echo "$artf_resp"
31+
exit 1
32+
else
33+
echo "$artf_resp"
34+
fi
35+
36+
curl -X PUT -sS -u "$user_email:$artifactory_apikey" "$artifactory_path/$build_info_file" -T "$build_info_file"

publish.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)