Skip to content
Snippets Groups Projects
Commit f7b1108a authored by Eskudero Gurrutxaga, Ibon's avatar Eskudero Gurrutxaga, Ibon
Browse files

use connection yaml

parent edd98cde
No related branches found
No related tags found
No related merge requests found
#do artifactory connections
include: '/npm-packages/artifactory_connect.yml'
artifactory: artifactory:
stage: deploy stage: deploy
tags:
- docker
image: $ACR_URL/node:18.12.0 image: $ACR_URL/node:18.12.0
#needed to restore the artifats from the build stage
dependencies: dependencies:
- build - build
# avoid restoring git repository
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
#set root user
- npm -g config set user root
# install jfrog cli. Use cache on .npm folder
- npm install -g jfrog-cli-go --cache .npm --prefer-offline
#create a publish package #create a publish package
- jfrog rt npm-publish --build-name=$CI_PROJECT_NAME --build-number=$CI_JOB_ID - jfrog rt npm-publish --build-name=$CI_PROJECT_NAME --build-number=$CI_JOB_ID
# save environment variables into thepackage # save environment variables into thepackage
- jfrog rt bce $CI_PROJECT_NAME $CI_JOB_ID - jfrog rt bce $CI_PROJECT_NAME $CI_JOB_ID
# publish the package to artifactory # publish the package to artifactory
- jfrog rt bp $CI_PROJECT_NAME $CI_JOB_ID - jfrog rt bp $CI_PROJECT_NAME $CI_JOB_ID
tags:
- docker
only: only:
- tags - tags
\ No newline at end of file
cache: #do artifactory connections
untracked: true include: '/npm-packages/artifactory_connect.yml'
key: npm
policy: pull-push
paths:
- dist/
- root/.jfrog/
- .npm/
- usr/local/lib/node_modules/
build: build:
image: $ACR_URL/node:18.12.0
stage: build stage: build
# cache build for the next jobs
artifacts: artifacts:
untracked: true
expire_in: 1 day expire_in: 1 day
tags: paths:
- docker - dist/**/*
image: $ACR_URL/node:18.12.0
script: script:
#set root user
- npm -g config set user root
# install jfrog cli. Use cache on .npm folder
- npm install -g jfrog-cli-go --cache .npm --prefer-offline
# load artifactory config from base64 encoded string
- jfrog config import $ARTIFACTORY_CI_CONFIGURATION
# set server id
- jfrog rt use $ACR_SERVER_ID
# install dependencies # install dependencies
- jfrog rt npm-install --build-name=$CI_PROJECT_NAME --build-number=$CI_JOB_ID - jfrog rt npm-install --build-name=$CI_PROJECT_NAME --build-number=$CI_JOB_ID
# build the package # build the package
- npm run build - npm run build
tags:
- docker
only: only:
- tags - tags
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment