Skip to content

Instantly share code, notes, and snippets.

@dennis-d
Last active September 20, 2021 15:59
Show Gist options
  • Save dennis-d/785358a90def0e3bd875c70a80a98663 to your computer and use it in GitHub Desktop.
Save dennis-d/785358a90def0e3bd875c70a80a98663 to your computer and use it in GitHub Desktop.
artifactory

** Artifactory Artifactory builds can happen on dev-wrex-01, dev-wrex-04, dev-garrus-01, dev-garrus-04, and dev-webui-rhel7-02. Sometimes dev-wrex-01 does not work from some projects, not sure why, but they can be built on dev-wrex-04.

If you want to build and publish not to artifactory, run a manual build on dev-wrex-02, dev-wrex-03, dev-garrus-02, dev-garrus-03, and dev-webuirhel7-01. Generally the setup is removing the old repository references from npmrc, bowerrc, and package.json and utilizing the user configuration (these are stored on the build server) because we do not want to publish the auth tokens and creds in the projects.

To use artifactory libraries locally you have to setup your machine with the following steps. Do note that this configuration will prevent non-artifactory libraries from being pulled in. This also means, an app not configured to use artifactory yet may not work because of missing modules.

  1. login to https://bf-dev-artifactory.prod.hclpnp.com/ui/login/ using software AD creds on the left, click on artifactory > artifacts on the top right, click on "set me up"
  2. use your software AD creds in the password box at the top right of the new modal that popped up
  3. Change tool to npm, change repo to webui-npm-dev
  4. Open .npmrc in your user folder, Windows: C:\Users<Username>, linux/unix: /home/ or /users/ or ~/
  5. Delete all old references to old npm repositories
  6. Copy the "Using basic authentication" section into your npmrc file put these lines in
  registry=https://bf-dev-artifactory.prod.hclpnp.com/artifactory/api/npm/webui-npm-dev/
  cafile=<path to your home directory>\dev-artifactory.crt
  strict-ssl=false
  1. Change tool to bower and repo to webui-bower-dev
  2. Create a .bowerrc file in home directory with the snippet under "If authentication is required to use:"
  3. Add strict-ssl: false to the json object that was copied
  4. download http://bfwiki.prod.hclpnp.com/upload/a/a2/Bf-dev-artifactory.crt and rename it to dev-artifactory.crt and drop it in your home folder
  5. run npm install -g bower-art-resolver your npmrc file should look something like this
python=<some python path>
cafile=<home directory>\dev-artifactory.crt
registry=https://bf-dev-artifactory.prod.hclpnp.com/artifactory/api/npm/webui-npm-dev/
_auth=<redacted key>
email=<your username>@software.hclpnp.com
always-auth=true

your bowerrc file should look something like this

{
  "registry": "https://<username>:<token>@bf-dev-artifactory.prod.hclpnp.com/artifactory/api/bower/webui-bower-dev",
  "resolvers": [
    "bower-art-resolver"
  ],
  "strict-ssl": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment