Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion .github/workflows/build.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: CI
name: CI/CD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published

jobs:

Expand Down Expand Up @@ -74,3 +77,37 @@ jobs:

- name: Check format
run: yarn format:check

publish-next:
name: Publish 'next' packages to npm
needs: build-and-test
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/theia-trace-extension'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: yarn --frozen-lockfile
- run: yarn publish:next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

publish-latest:
name: Publish 'latest' packages to npm
needs: build-and-test
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/theia-trace-extension'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: yarn --frozen-lockfile
- run: yarn publish:latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
23 changes: 0 additions & 23 deletions .github/workflows/publish-next.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
branches:
- master
paths:
- 'RELEASE'
pull_request:
types: [opened, synchronize]
branches:
- master
paths:
- 'RELEASE'

jobs:
gh-release:
name: GitHub release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pipe-cd/[email protected]
with:
release_file: 'RELEASE'
# Actions that run using the auto-generated GitHub token are
# not allowed to trigger a new workflow run. In this case we want
# the tag created by actions-gh-release to re-trigger the main workflow
# and result in publishing the package to npm.
# The following scopes are required when creating the committer token:
# - repo:status, repo_deployment, public_repo, read:org
# See here for more details:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow
token: ${{ secrets.GH_COMMITTER_TOKEN }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added that secret/token


16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,25 @@ For issues related to the Trace Viewer, please open a GitHub tracker for the [Th

For issues concerning `eclipse-cdt-cloud`, please refer to the contact options listed on the [CDT.Cloud website][cdt-cloud-website].

[architecture]: https://github.com/theia-ide/theia-trace-extension#architecture
[architecture]: https://github.com/eclipse-cdt-cloud/theia-trace-extension#architecture
[cdt-cloud-website]: https://cdt-cloud.io/contact/
[commit-message-example]: https://github.com/theia-ide/theia-trace-extension/commit/bc18fcd110d7b8433293692421f2e4fb49f89bd6
[commit-message-example]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/commit/bc18fcd110d7b8433293692421f2e4fb49f89bd6
[commit-message-message]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[commiter-handbook]: https://www.eclipse.org/projects/handbook/#resources-commit
[contact-us]: #contact
[creating-changes]: https://www.dataschool.io/how-to-contribute-on-github/
[dev-process]: https://eclipse.org/projects/dev_process
[eca]: http://www.eclipse.org/legal/ECA.php
[external-components]: https://github.com/theia-ide/theia-trace-extension#related-code
[good-first-issues]: https://github.com/theia-ide/theia-trace-extension/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
[external-components]: https://github.com/eclipse-cdt-cloud/theia-trace-extension#related-code
[good-first-issues]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
[flexible-architecture-video]: https://www.youtube.com/watch?v=8s5vGf45e-g
[flexible-architecture-slides]: https://tracingsummit.org/ts/2019/files/Tracingsummit2019-theia-dagenais.pdf
[gitpod-demo]: https://github.com/theia-ide/theia-trace-extension#try-a-live-demo-via-gitpod
[gitpod-demo]: https://github.com/eclipse-cdt-cloud/theia-trace-extension#Nightly-via-Gitpod
[ip-policy]: https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf
[issues]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/issues
[issue-317]: https://github.com/theia-ide/theia-trace-extension/issues/317
[issue-369]: https://github.com/theia-ide/theia-trace-extension/pull/369/files
[issue-402]: https://github.com/theia-ide/theia-trace-extension/pull/402
[issue-317]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/issues/317
[issue-369]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/pull/369/files
[issue-402]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/pull/402
[new-contributors]: #new-contributors
[pr-guide]: #pull-request-guidelines
[pull-requests]: https://github.com/eclipse-cdt-cloud/theia-trace-extension/pulls
Expand Down
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,43 @@ pip install -r requirements.txt
* The virtual environment can be replaced with another setup locally.
* Above, the `./requirements.txt` file has [the ADR tool][tools] to install.

## Release/publish

Publishing this repository's npm packages and creating a corresponding GitHub release with git tag (latest only), all happen on GitHub CI.

### Publish next packages

A set of `next` package is automatically published to `npm` every time a PR is merged.

### Publish latest / release

Whenever a new release is desired, including publishing a corresponding set of `latest` package to `npm`, it can be triggered through a PR. The following has to be done:

Create a new branch for your PR. e.g.
```bash
git branch new-release && git checkout new-release
```

Then decide if the release shall be a `Major`, `Minor` or `Patch` release and use the corresponding command below to step packages versions, according to the release type. A new release commit will be created:

``` bash
yarn version:major
# or
yarn version:minor
# or
yarn version:patch
```

Modify the _version tag_ in file `./RELEASE`, to match the new release. Then amend the release commit to include this change:

```bash
<edit ./RELEASES to update tag>
git add RELEASE && git commit --amend
```

Finally, push the branch and use it to create a PR. When the PR is merged, a GitHub release should be created with auto-generated release notes, as well as a git tag. Then the `publish-latest` CI job should trigger and if everything goes well, publish the new version of the repo's packages to `npm`.


[adr]: https://adr.github.io
[app-image]: https://www.dorsal.polymtl.ca/files/other/electron-theia-trace-example-app-0.0.1.AppImage
[cdt-cloud-demo]: https://try.theia-cloud.io/?appDef=cdt-cloud-demo
Expand Down
8 changes: 8 additions & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tag: v0.0.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created and pushed that tag, on commit 412b849 - Trace viewer prototype application (the second commit in this repo, right after "Initial commit"). This way, the first generated release notes will go back to the start of the repo's history (we can edit them after as needed)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a 0.1.0 release that was manually pushed to npm and a tag in the repo. Shouldn't you base the new release on the 0.1.0 tag instead?

Copy link
Contributor Author

@marcdumais-work marcdumais-work Mar 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but then the auto-generated release notes would start at v0.1.0. The plan is, after the next release, I will take the release notes and move those relevant to v0.1.0 into a manually-created GitHub release (from that tag). I did similar for time-line chart: https://github.com/eclipse-cdt-cloud/timeline-chart/releases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timeline-chart: original release notes / GH release, that I manually massaged after release:
eclipse-cdt-cloud/timeline-chart#274 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. Forgot about it. Makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, I'm not sure I was totally clear - the discussed tag (v0.0.0) will only affect the starting point for the auto-generated release notes, when we proceed with the first release, in another PR. This PR here will not result in a release, just setting the stage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for clarifying


commitInclude:
parentOfMergeCommit: true

releaseNoteGenerator:
showAbbrevHash: true
showCommitter: false
6 changes: 0 additions & 6 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"run": {
"stream": true
},
"publish": {
"forcePublish": true,
"graphType": "all",
"skipGit": true,
"registry": "https://registry.npmjs.org/"
},
"verifyAccess": false
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
"lint": "lerna run lint",
"lint:fix": "lerna run lint:fix",
"test": "lerna run test --",
"publish:latest": "lerna publish --registry=https://registry.npmjs.org/ --exact --no-git-tag-version --no-push",
"publish:latest": "lerna publish from-git --registry=https://registry.npmjs.org/ --exact --no-push --yes",
"publish:next": "lerna publish --registry=https://registry.npmjs.org/ --exact --canary minor --preid=next.$(date -u '+%Y%m%d%H%M%S').$(git rev-parse --short HEAD) --dist-tag=next --no-git-tag-version --no-push --yes",
"version:major": "lerna version major --exact --no-push --git-tag-command /usr/bin/true --yes -m \"Release %s (Major)\"",
"version:minor": "lerna version minor --exact --no-push --git-tag-command /usr/bin/true --yes -m \"Release %s (Minor)\"",
"version:patch": "lerna version patch --exact --no-push --git-tag-command /usr/bin/true --yes -m \"Release %s (Patch)\"",
"format:write": "lerna run format:write",
"format:check": "lerna run format:check",
"browser": "yarn -s --cwd examples/browser",
Expand Down
4 changes: 2 additions & 2 deletions packages/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ The Trace Viewer base package contains trace management utilities for managing t

## Additional Information

- [Theia Trace Viewer Extension](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Theia Trace Viewer Extension git repository](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol git repository](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Reference Trace Server - Download (Eclipse Trace Compass)](https://download.eclipse.org/tracecompass.incubator/trace-server/rcp/)
10 changes: 5 additions & 5 deletions packages/react-components/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Description

The Trace Viewer react-components package contains views and utilities for visualizing traces and logs via the Trace Server Protocol connected a Trace Server applications. While being initially used within the Theia Trace Viewer extension, its code base is independent to any Theia APIs and hence can be integrated in other web applications.
The Trace Viewer react-components package contains views and utilities for visualizing traces and logs via the Trace Server Protocol, connected a Trace Server application. While being initially used within the Theia Trace Viewer extension, its code base is independent to any Theia APIs and hence can be integrated in other web applications.

## Styling

The Trace Viewer react-components package does not define CSS styles for its components, but it provides CSS variables that can be map to custom CSS styles or variables. Any projects that use the package should define its own CSS styles for the components. All the mappable variables have the prefix `--trace-viewer`.
The Trace Viewer react-components package does not define CSS styles for its components, but it provides CSS variables that can be map to custom CSS styles or variables. Any project that uses the package should define its own CSS styles for the components. All the mappable variables have the prefix `--trace-viewer`.

An example (of integration with Theia) that contains all the mappable variables can be found in [here](../../theia-extensions/viewer-prototype/style/trace-viewer.css).
An example (of integration with Theia) that contains all the mappable variables can be found in [here](https://github.com/eclipse-cdt-cloud/theia-trace-extension/blob/master/theia-extensions/viewer-prototype/style/trace-viewer.css).

## Additional Information

- [Theia Trace Viewer Extension](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Theia Trace Viewer Extension git repository](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol git repository](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Reference Trace Server - Download (Eclipse Trace Compass)](https://download.eclipse.org/tracecompass.incubator/trace-server/rcp/)
4 changes: 4 additions & 0 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"type": "git",
"url": "https://github.com/eclipse-cdt-cloud/theia-trace-extension"
},
"bugs": {
"url": "https://github.com/eclipse-cdt-cloud/theia-trace-extension/issues"
},
"homepage": "https://github.com/eclipse-cdt-cloud/theia-trace-extension",
"files": [
"lib",
"src",
Expand Down
8 changes: 5 additions & 3 deletions theia-extensions/viewer-prototype/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Description

The Theia trace viewer extension is providing a trace viewing front-end to Trace Server applications implementing the Trace Server protocol.
The Theia trace viewer extension is a Theia extension, that one can use to add trace viewing capabilities, to a Theia-based application.

## Additional Information

- [Theia Trace Viewer Extension](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Theia Trace Viewer Extension git repository](https://github.com/eclipse-cdt-cloud/theia-trace-extension)
- [Trace Server Protocol git repository](https://github.com/eclipse-cdt-cloud/trace-server-protocol)
- [Reference Trace Server - Download (Eclipse Trace Compass)](https://download.eclipse.org/tracecompass.incubator/trace-server/rcp/)
- [Theia Trace Viewer Docker appliance example](https://github.com/eclipse-cdt-cloud/theia-trace-extension/blob/master/examples/docker/)
- [CDT Cloud Blueprint git repository (Contains the Theia Trace Viewer Extension)](https://github.com/eclipse-cdt-cloud/cdt-cloud-blueprint)

## Screenshots

Expand Down
6 changes: 5 additions & 1 deletion theia-extensions/viewer-prototype/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "theia-traceviewer",
"version": "0.1.0",
"description": "Trace Viewer Theia Extension",
"description": "A Trace Viewer for Theia applications, in the form of a Theia extension",
"keywords": [
"theia-extension"
],
Expand All @@ -10,6 +10,10 @@
"type": "git",
"url": "https://github.com/eclipse-cdt-cloud/theia-trace-extension"
},
"bugs": {
"url": "https://github.com/eclipse-cdt-cloud/theia-trace-extension/issues"
},
"homepage": "https://github.com/eclipse-cdt-cloud/theia-trace-extension",
"files": [
"lib",
"src",
Expand Down