I built below using different portals. I have confusion in below lines of code.
- Can i use just
docker push
instead of./jfrog rt dp
. Does it make any difference if i use either of them. - What's use of below lines of code. Is it required? Adding it makes any use. I see that i can see build info in JFROG. But i am already pushing my build to artifactory.
- ./jfrog rt bce gitlabci-docker-artifactory $CI_JOB_ID
- ./jfrog rt bp gitlabci-docker-artifactory $CI_JOB_ID
image: arielkv/dind-glibc:latest
services:
- docker:dind
stages:
- Install
- build
before_script:
- apk update
- apk add go curl
- curl -fL https://getcli.jfrog.io | sh
- ./jfrog rt config MyArtifactory --url $ARTIFACTORY_URL --user $ARTIFACTORY_USER --apikey $ARTIFACTORY_PASS
- docker login -u $ARTIFACTORY_USER -p $ARTIFACTORY_PASS $ARTIFACTORY_DOCKER_REPOSITORY
Build:
stage: build
script:
- docker build --rm=false --build-arg NODE_ENV=prod -t $ARTIFACTORY_DOCKER_REPOSITORY/artifactory-alpine:$CI_JOB_ID .
- docker run -d -p 8081:8081 $ARTIFACTORY_DOCKER_REPOSITORY/artifactory-alpine:$CI_JOB_ID; sleep 10
#- docker push $ARTIFACTORY_DOCKER_REPOSITORY/artifactory-alpine:$CI_JOB_ID
- ./jfrog rt dp $ARTIFACTORY_DOCKER_REPOSITORY/artifactory-alpine:$CI_JOB_ID $DOCKER_REPOSITORY_KEY --build-name=gitlabci-docker-artifactory
--build-number=$CI_JOB_ID
- ./jfrog rt bce gitlabci-docker-artifactory $CI_JOB_ID
- ./jfrog rt bp gitlabci-docker-artifactory $CI_JOB_ID
only:
- master