Skip to content

Instantly share code, notes, and snippets.

@judeebene
Created April 19, 2018 11:29
Show Gist options
  • Save judeebene/5ee0553d37c2f14a6df46d628564de66 to your computer and use it in GitHub Desktop.
Save judeebene/5ee0553d37c2f14a6df46d628564de66 to your computer and use it in GitHub Desktop.
Artifactory evaluation
version: 2
jobs:
build:
working_directory: ~/pillar
docker:
- image: circleci/node:8.9.4
steps:
- checkout
- run:
name: download + configure jfrog cli to interact with artifactory
command: |
wget https://dl.bintray.com/jfrog/jfrog-cli-go/1.7.1/jfrog-cli-linux-amd64/jfrog
chmod +x jfrog
echo "$ARTIFACTORY_URL"
echo "$ARTIFACTORY_USER"
./jfrog rt config --url $ARTIFACTORY_URL --user $ARTIFACTORY_USER --apikey $ARTIFACTORY_APIKEY --interactive false
- run:
name: update-npm
command: 'sudo npm install -g npm@latest'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: install-npm
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- run:
name: unit-test
command: npm run test:coverage
- run:
name: plato
command: npm run plato
- store_artifacts:
path: ./reports/
destination: reports
- run:
name: package
command: |
npm pack
mkdir -p bundledDependencies
mv registration-backend-*.tgz bundledDependencies
- store_artifacts:
path: ./bundledDependencies/
destination: dist
- run:
name: upload package to ARTIFACTORY_URL
command: |
./jfrog rt u "./bundledDependencies/registration-backend-*.tgz" circleci-generic-local --build-name=circleci-generic-artifactory --build-number=$CIRCLE_BUILD_NUM --flat=false
./jfrog rt u "./bundledDependencies/registration-backend-*.tgz" circleci-generic-local --build-name=circleci-generic-artifactory --build-number=$CIRCLE_BUILD_NUM --flat=false
./jfrog rt bce circleci-generic-artifactory $CIRCLE_BUILD_NUM
./jfrog rt bp circleci-generic-artifactory $CIRCLE_BUILD_NUM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment