Skip to content

Commit

Permalink
V3.3 (#157)
Browse files Browse the repository at this point in the history
* axios remove, logging env + rpm upload

* host import fix #149

* automation start and cfgApp partitions

* update changelog

* working tests
  • Loading branch information
DumpySquare authored Dec 2, 2021
1 parent aca728d commit f7366d2
Show file tree
Hide file tree
Showing 16 changed files with 245 additions and 358 deletions.
122 changes: 122 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: "Main"

on:
push:
branches: [main]

env:
NODE_VERSION: 14.x

jobs:

test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
name: Test on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb"
shell: bash
if: ${{ success() && matrix.os == 'ubuntu-latest' }}
- run: npm install
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm test
env:
DISPLAY: ":99.0"

package-release-publish:
runs-on: ubuntu-latest
environment: publishing
needs: test
name: Package-Release-Publish
steps:

- name: Checkout code
uses: actions/checkout@v2

- name: setup node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}

- name: install node deps
run: npm ci

- name: install vscode marketplace cli (vsce)
run: npm install -g vsce

- name: install open-vsix marketplace cli (ovsx)
run: npm install -g ovsx

- name: package extension
run: vsce package

- name: get extension path
run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV

- name: get extension name
run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV

- name: get extension version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: create upload artifacts
uses: actions/upload-artifact@v2
with:
path: ${{ env.VSIX_PATH }}
name: ${{ env.VSIX_NAME }}

- name: create github release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.PACKAGE_VERSION }}
release_name: ${{ env.VSIX_NAME }}
body: See [CHANGE LOG](https://github.com/f5devcentral/vscode-f5-chariot/blob/main/README.md) for details.
draft: false
prerelease: false

- name: upload releases
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_TOKEN: ${{ secrets.MARKETPLACE_PUBLISH_KEY }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.VSIX_PATH }}
asset_name: ${{ env.VSIX_NAME }}
asset_content_type: application/zip

- name: publish to marketplace
run: vsce publish -i ${{ env.VSIX_PATH }} -p ${{ secrets.MARKETPLACE_PUBLISH_KEY }}

- name: publish to open-vsix
run: ovsx publish ${{ env.VSIX_PATH }} -p ${{ secrets.OPEN_VSX_TOKEN }}



# good example of action workflow for publishing an extension
# https://github.com/politie/omt-odt-language/pull/30/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34

# vsce source for understanding switches
# https://github.com/microsoft/vscode-vsce/tree/main/src

# ovsx source
# https://github.com/eclipse/openvsx
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,20 @@ All notable changes to the "vscode-f5" extension will be documented in this file

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file

---

## [3.3.0] - (11-30-2021)

- update local axios or move it to f5-conx-core (removed)
- moved log env from default F5_CONX_CORE_LOG_LEVEL to F5_VSCODE_LOG_LEVEL
- this will represent the more specific log settings for the extension and not interfere with f5-conx-core development/settings
- fixed issue where it was uploading ilx atc rpm twice
- The second loop is supposed to upload the package signature to allow for verification later
- [bug] "Import Devices" is not populating F5 Hosts section [#149](https://github.com/f5devcentral/vscode-f5/issues/149)
- [RFE] config explorer - group apps by partition [#156](https://github.com/f5devcentral/vscode-f5/issues/156)
- automate testing/package/publishing with github actions


---

## [3.2.1] - (11-23-2021)
Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "The F5 Extension",
"description": "Supercharge your F5 automation development",
"publisher": "F5DevCentral",
"version": "3.2.1",
"version": "3.3.0",
"keywords": [
"F5",
"F5Networks",
Expand All @@ -19,7 +19,7 @@
"Snippets"
],
"engines": {
"vscode": "^1.52.0"
"vscode": "^1.55.0"
},
"bugs": {
"url": "https://github.com/f5devcentral/vscode-f5/issues"
Expand Down Expand Up @@ -1153,16 +1153,14 @@
"pretest": "npm run compile && npm run lint",
"test": "node ./out/test/runTest.js",
"docs": "docsify serve docs",
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install",
"refresh-corkscrew": "rm -rf node_modules/f5-corkscrew && npm install f5devcentral/f5-corkscrew#certs",
"refresh-f5-conx": "rm -rf node_modules/f5-conx-core && npm install dumpysquare/f5-conx-core"
"refresh": "rm -rf ./node_modules ./package-lock.json && npm install"
},
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/js-yaml": "4.0.0",
"@types/mocha": "^7.0.1",
"@types/node": "^12.20.6",
"@types/vscode": "^1.52.0",
"@types/vscode": "^1.55.0",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"eslint": "^6.8.0",
Expand All @@ -1174,10 +1172,9 @@
},
"dependencies": {
"@f5devcentral/f5-fast-core": "^0.7.0",
"axios": "^0.21.1",
"f5-conx-core": "^0.11.0",
"f5-corkscrew": "^0.9.2",
"js-yaml": "4.0.0",
"keytar": "^7.6.0"
"keytar": "^7.7.0"
}
}
14 changes: 0 additions & 14 deletions src/bigiqCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

'use strict';

import { AxiosError } from "axios";
import {
commands,
ExtensionContext,
Expand Down Expand Up @@ -103,16 +102,3 @@ export class BigiqCore {
}

}


/**
* function to try to slim down an axios error a bit...
* @param err
*/
export function slimAxiosError(err: AxiosError) {
delete err.config.httpsAgent;
delete err.request.agent;
delete err.request.socket;
delete err.request.res;
delete err.request.connection;
}
1 change: 0 additions & 1 deletion src/changeVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export class ChangeVersion {
// if we have a selection from the previous list
if (chosenVersion && typeof chosenVersion === 'object' && chosenVersion.asset) {

// const downloadLocation = await axios(chosenVersion.asset)
const downloadLocation = await extHttp.makeRequest({ url: chosenVersion.asset })
.then(async resp => {

Expand Down
2 changes: 1 addition & 1 deletion src/devicesCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export default function devicesCore(context: ExtensionContext, f5OutputChannel:
}
if (signature) {

await ext.f5Client?.atc.download(rpm.browser_download_url)
await ext.f5Client?.atc.download(signature.browser_download_url)
.then(async resp => {
await ext.f5Client?.atc.uploadRpm(resp.data.file);
})
Expand Down
2 changes: 1 addition & 1 deletion src/extensionVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export async function loadSettings() {
ext.settings.preserveEditorFocus = workspace.getConfiguration().get<boolean>('f5.preserveEditorFocus', true);
ext.settings.newEditorTabForAll = workspace.getConfiguration().get('f5.newEditorTabForAll', false);

process.env[logger.logEnv] = workspace.getConfiguration().get<string>('f5.logLevel', 'INFO');
process.env.F5_VSCODE_LOG_LEVEL = workspace.getConfiguration().get<string>('f5.logLevel', 'INFO');

process.env[ext.teemEnv] = workspace.getConfiguration().get<boolean>('f5.TEEM', true).toString();

Expand Down
2 changes: 1 addition & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ import Logger from 'f5-conx-core/dist/logger';
*
*/

export const logger = new Logger('F5_CONX_CORE_LOG_LEVEL');
export const logger = new Logger('F5_VSCODE_LOG_LEVEL');
// export const logger = loggerInst;
Loading

0 comments on commit f7366d2

Please sign in to comment.