Skip to content

Commit ccc0548

Browse files
authored
Merge branch 'master' into remove-typescript-experimental-setting
2 parents 5a96adf + 001c0d6 commit ccc0548

File tree

9 files changed

+379
-15
lines changed

9 files changed

+379
-15
lines changed

.github/workflows/draft-release.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
build_release:
88
name: Build and Release
9-
runs-on: ubuntu-latest
9+
runs-on: macos-latest
1010
env:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1212
steps:
@@ -22,6 +22,12 @@ jobs:
2222
with:
2323
node-version: 12.x
2424

25+
- name: Use NPM 7
26+
run: npm install -g npm@7
27+
28+
- name: Install sha256sum
29+
run: brew install coreutils
30+
2531
- name: Get version number
2632
id: version_step
2733
run: |
@@ -52,11 +58,11 @@ jobs:
5258

5359
- name: Checksum and sign
5460
run: |
55-
sha256sum --tag vrealize-developer-tools-${version}.vsix > vrealize-developer-tools-${version}.vsix.sha256
56-
gpg --default-key ${keyid} --armor --detach-sig vrealize-developer-tools-${version}.vsix.sha256
57-
with:
58-
version: ${{steps.version_step.outputs.version}}
59-
keyid: ${{steps.import_gpg.outputs.keyid}}
61+
sha256sum --tag vrealize-developer-tools-$PKG_VERSION.vsix > vrealize-developer-tools-$PKG_VERSION.vsix.sha256
62+
gpg --default-key $KEYID --armor --detach-sig vrealize-developer-tools-$PKG_VERSION.vsix.sha256
63+
env:
64+
PKG_VERSION: ${{steps.version_step.outputs.version}}
65+
KEYID: ${{steps.import_gpg.outputs.keyid}}
6066

6167
- name: Upload artifact
6268
uses: actions/upload-artifact@v2
@@ -74,7 +80,7 @@ jobs:
7480
7581
- name: Generate release notes
7682
id: generate_changelog
77-
uses: nblagoev/pull-release-notes-action@v1
83+
uses: nblagoev/pull-release-notes-action@v1.0.2
7884
with:
7985
base-ref: ${{ env.baseRef }}
8086
head-ref: ${{ github.ref }}

.github/workflows/publish.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@ jobs:
77
name: Publish to Visual Studio Marketplace
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- name: Use Node.js 12.x
11+
uses: actions/setup-node@v2
12+
with:
13+
node-version: 12.x
14+
15+
- name: Install vsce
16+
run: npm install -g vsce
1117

1218
- name: Download release asset
1319
id: release_asset
1420
env:
15-
TAG_NAME: ${{ github.event.tag_name }}
21+
TAG_NAME: ${{ github.event.release.tag_name }}
1622
run: |
1723
VERSION=$(echo -n $TAG_NAME | sed 's/^v//')
1824
FILE_NAME="vrealize-developer-tools-${VERSION}.vsix"
19-
DOWNLOAD_URL=$(jq --raw-output '.release.assets[] | select(.name == "$FILE_NAME") | .browser_download_url' "$GITHUB_EVENT_PATH")
25+
DOWNLOAD_URL=$(jq --raw-output ".release.assets[] | select(.name == \"$FILE_NAME\") | .browser_download_url" "$GITHUB_EVENT_PATH")
2026
2127
wget $DOWNLOAD_URL
2228
echo "::set-output name=file_name::$FILE_NAME"
2329
24-
- name: Publish
30+
- name: Publish to VS Marketplace
2531
env:
2632
MARKETPLACE_SECRET: ${{ secrets.VS_MARKETPLACE_TOKEN }}
2733
FILE_NAME: ${{ steps.release_asset.outputs.file_name }}
28-
run: "node node_modules/.bin/vsce publish -p $MARKETPLACE_SECRET --packagePath $FILE_NAME"
34+
run: "vsce publish -p $MARKETPLACE_SECRET --packagePath $FILE_NAME"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "vrealize-developer-tools",
44
"displayName": "vRealize Developer Tools",
55
"description": "Provides code intelligence features and enables a more developer-friendly experience when creating VMware vRealize Orchestrator and VMware vRealize Automation content.",
6-
"version": "2.2.0",
6+
"version": "2.2.1",
77
"publisher": "vmware-pscoe",
88
"license": "MIT",
99
"homepage": "https://github.com/vmware/vrealize-developer-tools",

wiki/ABX-project.md

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
Before you continue with this section validate that all of the [prerequisites](./Setup-Developer-Workstation.md) are met.
2+
3+
# Use
4+
5+
ABX Project is a development project representation of ABX package content.
6+
7+
## Create New ABX Project
8+
9+
**vRealize Build Tools** provides ready to use project templates (_maven archetypes_).
10+
11+
To create a new ABX project from archetype use the following commands for the respective runtime:
12+
13+
```Bash
14+
# NodeJS
15+
mvn archetype:generate \
16+
-DinteractiveMode=false \
17+
-DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes \
18+
-DarchetypeArtifactId=package-polyglot-archetype \
19+
-DarchetypeVersion=<iac_for_vrealize_version> \
20+
-DgroupId=local.corp.it.cloud \
21+
-DartifactId=abx \
22+
-Druntime=nodejs \
23+
-Dtype=abx
24+
25+
# Python
26+
mvn archetype:generate \
27+
-DinteractiveMode=false \
28+
-DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes \
29+
-DarchetypeArtifactId=package-polyglot-archetype \
30+
-DarchetypeVersion=<iac_for_vrealize_version> \
31+
-DgroupId=local.corp.it.cloud \
32+
-DartifactId=abx \
33+
-Druntime=python \
34+
-Dtype=abx
35+
36+
# PowerShell
37+
mvn archetype:generate \
38+
-DinteractiveMode=false \
39+
-DarchetypeGroupId=com.vmware.pscoe.polyglot.archetypes \
40+
-DarchetypeArtifactId=package-polyglot-archetype \
41+
-DarchetypeVersion=<iac_for_vrealize_version> \
42+
-DgroupId=local.corp.it.cloud \
43+
-DartifactId=abx \
44+
-Druntime=powershell \
45+
-Dtype=abx
46+
```
47+
48+
**Note**: _The specified <iac_for_vrealize_version> should be minimum 2.11.2_
49+
50+
The generated project from the archetype is specific to the runtime, i.e. the src directory will contain .py files
51+
for Python projects, .ts files for NodeJS projects and .ps1 files for PowerShell projects.
52+
53+
The result of this command will produce the following project file structure (example for NodeJS):
54+
55+
```
56+
.
57+
├── README.md
58+
├── handler.debug.yaml
59+
├── license_data
60+
│ ├── licenses.properties
61+
│ └── tp_license
62+
│ ├── header.txt
63+
│ └── license.txt
64+
├── package.json
65+
├── pom.xml
66+
├── release.sh
67+
├── src
68+
│ └── handler.ts
69+
└── tsconfig.json
70+
```
71+
72+
## Building
73+
74+
You can build any ABX project from sources using Maven:
75+
76+
```bash
77+
mvn clean package
78+
```
79+
80+
This will produce an ABX package with the groupId, artifactId and version specified in the pom. For example:
81+
82+
```xml
83+
<groupId>local.corp.it.cloud</groupId>
84+
<artifactId>abx</artifactId>
85+
<version>1.0.0-SNAPSHOT</version>
86+
<packaging>abx</packaging>
87+
```
88+
89+
will result in **local.corp.it.cloud.abx-1.0.0-SNAPSHOT.abx** generated in the target folder of your project.
90+
91+
## Configuration
92+
93+
The ABX project uses the same configuration definition and semantics as the **VRA-NG** project. Refer to the
94+
configuration definition of the **VRA-NG** project. The rationale for this is that the ABX service is embedded within
95+
the larger vRA8 ecosystem and any application interaction uses unified authentication and authorization methodology,
96+
as well as locating the target scope for content distribution, e.g. projects and organizations.
97+
98+
## Pull
99+
100+
ABX content pulling is not supported yet.
101+
102+
## Push
103+
104+
To deploy the code developed in the local project or checked out from source control to a live server, you can use
105+
the `vrealize:push` command:
106+
107+
```bash
108+
mvn package vrealize:push -Pcorp-env
109+
```
110+
111+
This will build the package and deploy it to the environment described in the `corp-env` profile.
112+
113+
## Release
114+
115+
To release a an ABX action uploaded on a live server, you can use the `vrealize:release` command:
116+
117+
```bash
118+
mvn vrealize:release -Pcorp-env -Dvrang.version=1
119+
```
120+
121+
The parameter `vrang.version` is required. The possible values of the parameter are:
122+
123+
- `vrang.version=auto` - use auto-versioning with next version being generated by inferring the version pattern
124+
and generating a new version following the same sequence (refer to the ABX auto-versioning section below).
125+
- `vrang.version=project` - use the version set in the project.
126+
- `vrang.version=<version>` - use an explicit version.
127+
128+
### ABX auto-versioning
129+
130+
When releasing an ABX action to a vRA server that contains previously released action with the same name as the one
131+
being released, a new version will be created and released.
132+
133+
When creating a new version and the versioning strategy is set to 'auto', the new version will be auto-generated based
134+
on the latest version of the action. The following version formats are supported with their respective incrementing rules:
135+
136+
| Latest version | New version | Incrementing rules |
137+
| -------------- | ------------------- | ---------------------------------------------------------- |
138+
| 1 | 2 | Increment major version |
139+
| 1.0 | 1.1 | Major and minor version - increment the minor |
140+
| 1.0.0 | 1.0.1 | Major, minor and patch version - incrementing the patch |
141+
| 1.0.0-alpha | 2020-05-27-10-10-43 | Arbitrary version - generate a new date-time based version |
142+
143+
## Clean Up
144+
145+
In order to clean up auto-generated content, you can use the following Maven goal:
146+
147+
```bash
148+
mvn clean
149+
```
150+
151+
This will remove the `target`, `out` and `dist` directories of the project.
152+
153+
## Troubleshooting
154+
155+
- If Maven error does not contain enough information rerun it with _-e_ debug flag. This will output the stack trace
156+
at the point where the error is encountered.
157+
158+
```bash
159+
mvn -e <rest of the command>
160+
```
161+
162+
- Additionally, debug information can be really helpful when troubleshooting a particular scenario. In order to
163+
increase the verbosity of the logs, you can use the _-X_ debug flag.
164+
165+
```bash
166+
mvn -X <rest of the command>
167+
```
168+
169+
- Sometimes Maven might cache old artifacts. Force fetching new artifacts with _-U_.
170+
Alternatively remove _<home>/.m2/repository_ folder.
171+
172+
```bash
173+
mvn -U <rest of the command>
174+
```

0 commit comments

Comments
 (0)