diff --git a/.azure/azure-pipelines.npm.yml b/.azure/azure-pipelines.npm.yml new file mode 100644 index 0000000..a763119 --- /dev/null +++ b/.azure/azure-pipelines.npm.yml @@ -0,0 +1,48 @@ +trigger: none +pr: none + +parameters: + - name: version + type: string + default: patch + values: + - patch + - minor + - major + - name: dryRun + type: boolean + default: false + - name: publishPublic + type: boolean + default: true + - name: publishInternal + type: boolean + default: true + +variables: + - group: studadm-general-params + +resources: + repositories: + - repository: stratus-templates + type: git + name: Cloud Excellence Team/stratus-templates + ref: main + +pool: + vmImage: 'ubuntu-latest' + +extends: + template: templates/security/security-scans.yml@stratus-templates + parameters: + break: false + steps: + - template: /templates/npm/publish.yml@stratus-templates + parameters: + version: ${{ parameters.version }} + nodeVersion: 20.x + verbose: false + dryRun: ${{ parameters.dryRun }} + publishPublic: ${{ parameters.publishPublic }} + publishInternal: ${{ parameters.publishInternal }} + testCommand: '--version' #kör 'npm --version' istället för 'npm run test' diff --git a/.azure/azure-pipelines.pr.yml b/.azure/azure-pipelines.pr.yml new file mode 100644 index 0000000..d8cdf1b --- /dev/null +++ b/.azure/azure-pipelines.pr.yml @@ -0,0 +1,28 @@ +trigger: none +pr: + - master + +variables: + - group: studadm-general-params + +resources: + repositories: + - repository: stratus-templates + type: git + name: Cloud Excellence Team/stratus-templates + ref: main + +pool: + vmImage: 'ubuntu-latest' + +extends: + template: templates/security/security-scans.yml@stratus-templates + parameters: + break: false + jobs: + - job: test + displayName: 'Test' + steps: + - template: /templates/test/npm.yml@stratus-templates + parameters: + nodeVersion: 20.x diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 3a08513..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Evolene CI - -on: - push: - branches: - - main - paths-ignore: - - '*.md' - - '*.png' - pull_request: - branches: - - main - paths-ignore: - - '*.md' - - '*.png' - -jobs: - Evolene: - name: Continuous Integration - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2.3.4 - - name: Run Evolene CI pipeline steps - shell: bash - env: - SLACK_CHANNELS: '#team-studadm-build' - NPM_UPDATES_AVAILABLE: True - BUILD_INFORMATION_OUTPUT_FILE: '/config/version.js' - run: | - ${{ secrets.EVOLENE_RUN_COMMAND }} diff --git a/npm.conf b/npm.conf deleted file mode 100644 index 086ee07..0000000 --- a/npm.conf +++ /dev/null @@ -1,9 +0,0 @@ -# What version of node should be used? -# This is installed via nvm (https://github.com/creationix/nvm) on jenkins if missing -NODE_VERSION=16.13.1 - -# Do we allow npm audit to find criticals and let the build finish? -# Comment this out otherwise -ALLOW_CRITICALS=0 - -NPM_VERSION_CHANGED=True diff --git a/package-lock.json b/package-lock.json index 5609968..00ceec9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@kth/ug-rest-api-helper", - "version": "1.0.9", + "version": "1.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@kth/ug-rest-api-helper", - "version": "1.0.9", + "version": "1.1.0", "license": "MIT", "dependencies": { "@azure/msal-node": "^2.1.0", diff --git a/package.json b/package.json index 8e353c9..c8e4458 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kth/ug-rest-api-helper", - "version": "1.0.9", + "version": "1.1.0", "description": "Node.js module to make JSON calls against APIs.", "main": "index.js", "automaticPublish": "true", @@ -45,6 +45,10 @@ "prettier": "^3.0.0", "pretty-quick": "^3.1.2" }, + "homepage": "https://github.com/KTH/ug-rest-api-helper", + "publishConfig": { + "access": "public" + }, "// (prettier)": "configuration version 2020-06-15 - might also reside in .prettierrc.json", "prettier": { "arrowParens": "avoid", @@ -66,4 +70,4 @@ "/node_modules/" ] } -} \ No newline at end of file +}