Skip to content

Commit

Permalink
chore(webapps): adjust herdevs credentials
Browse files Browse the repository at this point in the history
related to: #4549
  • Loading branch information
venetrius committed Nov 14, 2024
1 parent 5deb396 commit f8bf452
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ pipeline {
[
path : 'secret/products/cambpm/ci/hero-devs',
secretValues: [
[envVar: 'XLTS_REGISTRY', vaultKey: 'registry'],
[envVar: 'XLTS_AUTH_TOKEN', vaultKey: 'authToken']]
[envVar: 'HERODEVS_REGISTRY', vaultKey: 'registry'],
[envVar: 'HERODEVS_AUTH_TOKEN', vaultKey: 'authToken']]
]]]) {
cambpmRunMaven('.',
'clean source:jar deploy source:test-jar com.mycila:license-maven-plugin:check -Pdistro,distro-ce,distro-wildfly,distro-webjar,h2-in-memory -DaltStagingDirectory=${WORKSPACE}/staging -DskipRemoteStaging=true '+ skipTests,
Expand Down
10 changes: 5 additions & 5 deletions webapps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,20 @@ The angular-moment project has been archived on Nov 30, 2021. We replaced the of
**Heads-up:** If you build the Webapps from source code, the build includes the no longer maintained angular-moment libraries in version 1.3.0 unless you have access to the HeroDevs registry and configure it as shown below.

##### Configure the HeroDevs registry
To enable pulling the HeroDevs extended support libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${XLTS_REGISTRY}` and `${XLTS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal.
To enable pulling the HeroDevs extended support libraries while building the Webapps, please configure the npm registry. Add the HeroDevs npm registry by replacing the variables `${HERODEVS_REGISTRY}` and `${HERODEVS_AUTH_TOKEN}` in the following commands and execute the commands in your terminal.

Commands to configure the HeroDevs npm registry:

```
npm set @neverendingsupport:registry=https://${XLTS_REGISTRY}/
npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN}
npm set @neverendingsupport:registry=https://${HERODEVS_REGISTRY}/
npm set //${HERODEVS_REGISTRY}/:_authToken ${HERODEVS_AUTH_TOKEN}
```

Alternatively, you can set the following environment variables:

```sh
export XLTS_REGISTRY = "example.com" # Hostname without protocol (e.g., "https://"), leading or trailing slashes
export XLTS_AUTH_TOKEN = "abc..." # Token to authenticate against the registry
export HERODEVS_REGISTRY = "example.com" # Hostname without protocol (e.g., "https://"), leading or trailing slashes
export HERODEVS_AUTH_TOKEN = "abc..." # Token to authenticate against the registry
```

You receive the information about the registry and the auth token directly from XLTS.dev.
Expand Down
10 changes: 5 additions & 5 deletions webapps/frontend/scripts/xlts.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,22 @@ const getDependencyVersion = (nameSpace, npmPackage, xltsVersion) => {

const registryConfigured = exec(`npm get @${scope}:registry`) !== 'undefined\n';

const {XLTS_REGISTRY, XLTS_AUTH_TOKEN} = process.env;
const {HERODEVS_REGISTRY, HERODEVS_AUTH_TOKEN} = process.env;

if (!registryConfigured && XLTS_REGISTRY && XLTS_AUTH_TOKEN) {
if (!registryConfigured && HERODEVS_REGISTRY && HERODEVS_AUTH_TOKEN) {
exec(
`npm set @${scope}:registry https://${XLTS_REGISTRY}/`,
`npm set @${scope}:registry https://${HERODEVS_REGISTRY}/`,
'XLTS registry configured.'
);

exec(
`npm set //${XLTS_REGISTRY}/:_authToken ${XLTS_AUTH_TOKEN}`,
`npm set //${HERODEVS_REGISTRY}/:_authToken ${HERODEVS_AUTH_TOKEN}`,
'XLTS auth token configured.'
);
}

if (
(registryConfigured || (XLTS_REGISTRY && XLTS_AUTH_TOKEN)) &&
(registryConfigured || (HERODEVS_REGISTRY && HERODEVS_AUTH_TOKEN)) &&
process.argv[2] === 'install'
) {
const xlts = require('../package.json').xlts;
Expand Down

0 comments on commit f8bf452

Please sign in to comment.