DevOps Tools/Repository Management/Artifactory
From r00tedvw.com wiki
(Difference between revisions)
Line 8: | Line 8: | ||
~$ docker pull docker.bintray.io/jfrog/artifactory-oss:latest | ~$ docker pull docker.bintray.io/jfrog/artifactory-oss:latest | ||
~$ docker run --name artifactory-oss -d -v /opt/jfrog/artifactory:/var/opt/jfrog/artifactory -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest</nowiki> | ~$ docker run --name artifactory-oss -d -v /opt/jfrog/artifactory:/var/opt/jfrog/artifactory -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest</nowiki> | ||
+ | |||
+ | =Uploading bulk= | ||
+ | quick script to upload in bulk and add the sha1 checksum. | ||
+ | <nowiki>#!/bin/bash | ||
+ | FILES=/Users/r00t/Downloads/* | ||
+ | username=r00t | ||
+ | password=FDOdohfsohf347fsHDJDokhf89 | ||
+ | artifactoryurl=http://usa-rnc-dockerhost:8081/artifactory/generic-local/ | ||
+ | for f in $FILES | ||
+ | do | ||
+ | echo "Uploading $f to artifactory" | ||
+ | checksum=$(shasum -a 1 $f | awk '{ print $1 }') | ||
+ | file=$(printf $f | awk -F "/" '{ print $NF}') | ||
+ | curl --header "X-Checksum-Sha1:${checksum}" -u $username:$password -T $f "$artifactoryurl/$file" | ||
+ | done</nowiki> |
Revision as of 13:10, 25 September 2019
Artifactory
Installation
Docker
Using docker you can pull the container from jfrog and then mount a local volume to house the configuration files and data.
https://www.jfrog.com/confluence/display/RTF/Installing+with+Docker
~$ sudo mkdir -p /opt/jfrog/artifactory ~$ sudo chown -R 1030:1030 /opt/jfrog/artifactory ~$ docker pull docker.bintray.io/jfrog/artifactory-oss:latest ~$ docker run --name artifactory-oss -d -v /opt/jfrog/artifactory:/var/opt/jfrog/artifactory -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest
Uploading bulk
quick script to upload in bulk and add the sha1 checksum.
#!/bin/bash FILES=/Users/r00t/Downloads/* username=r00t password=FDOdohfsohf347fsHDJDokhf89 artifactoryurl=http://usa-rnc-dockerhost:8081/artifactory/generic-local/ for f in $FILES do echo "Uploading $f to artifactory" checksum=$(shasum -a 1 $f | awk '{ print $1 }') file=$(printf $f | awk -F "/" '{ print $NF}') curl --header "X-Checksum-Sha1:${checksum}" -u $username:$password -T $f "$artifactoryurl/$file" done