To make this integration work you will need to have running Artifactory-Enterprise/Artifactory-pro/Artifactory SAAS.
- Set npm command line client to work with Artifactory Npm Registry.
create
.npmrc
file and paste following content to it:
registry = https://$ARTIFACTORY_URL/api/npm/$ARTIFACTORY_NPM_REPO_NAME/
_auth = $ARTIFACTORY_USER:$ARTIFACTORY_PASSWORD
email = youremail@email.com
always-auth = true
- Install dependencies:
npm install
- Start node Server:
npm start
- Test node package:
npm test
- Access Application on: http://localhost:3000
- Build docker image:
docker build -t $ARTIFACTORY_DOCKER_REPOSITORY/node-version .
- Run docker container:
docker run -d -p 3000:3000 $ARTIFACTORY_DOCKER_REPOSITORY/node-version
- Login to Artifactory docker registry:
docker login -u ARTIFACTORY_USER -p $ARTIFACTORY_PASSWORD $ARTIFACTORY_DOCKER_REPOSITORY
- Push docker image:
docker push $ARTIFACTORY_DOCKER_REPOSITORY/node-version
copy circle.yml
to your project
Enable your project in CircleCI.
add Environment Variables ARTIFACTORY_USER
, ARTIFACTORY_EMAIL
, ARTIFACTORY_DOCKER_REPOSITORY
and ARTIFACTORY_PASSWORD
in build settings of CircleCI.
In this example $ARTIFACTORY_DOCKER_REPOSITORY=gcartifactory-us.jfrog.info:5005
You should be able to see published Docker image and build information in Artifactory.