diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 16427c8..034e4c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,13 @@ jobs: - uses: actions/checkout@v4 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: 1.21.x + cache: 'false' - name: Go Cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/go/pkg/mod key: ubuntu-go-${{ hashFiles('**/go.sum') }} diff --git a/go.mod b/go.mod index a6e2df8..c6dc902 100644 --- a/go.mod +++ b/go.mod @@ -3,60 +3,60 @@ module github.com/jfrog/documentation go 1.21 require ( - github.com/jfrog/jfrog-client-go v1.34.4 - github.com/stretchr/testify v1.8.4 + github.com/jfrog/jfrog-client-go v1.40.2 + github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonschema v1.2.0 gopkg.in/yaml.v2 v2.4.0 ) require ( dario.cat/mergo v1.0.0 // indirect - github.com/CycloneDX/cyclonedx-go v0.7.2 // indirect + github.com/CycloneDX/cyclonedx-go v0.8.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/andybalholm/brotli v1.0.1 // indirect - github.com/cloudflare/circl v1.3.3 // indirect + github.com/ProtonMail/go-crypto v1.0.0 // indirect + github.com/andybalholm/brotli v1.1.0 // indirect + github.com/cloudflare/circl v1.3.7 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect + github.com/dsnet/compress v0.0.1 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/forPelevin/gomoji v1.1.8 // indirect + github.com/forPelevin/gomoji v1.2.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect + github.com/go-git/go-git/v5 v5.12.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.2 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/gookit/color v1.5.4 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/jfrog/build-info-go v1.9.15 // indirect - github.com/jfrog/gofrog v1.3.1 // indirect + github.com/jfrog/archiver/v3 v3.6.0 // indirect + github.com/jfrog/build-info-go v1.9.26 // indirect + github.com/jfrog/gofrog v1.7.1 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/klauspost/compress v1.11.4 // indirect + github.com/klauspost/compress v1.17.4 // indirect github.com/klauspost/cpuid/v2 v2.2.3 // indirect - github.com/klauspost/pgzip v1.2.5 // indirect - github.com/mholt/archiver/v3 v3.5.1 // indirect + github.com/klauspost/pgzip v1.2.6 // indirect github.com/minio/sha256-simd v1.0.1 // indirect - github.com/nwaples/rardecode v1.1.0 // indirect - github.com/pierrec/lz4/v4 v4.1.2 // indirect + github.com/nwaples/rardecode v1.1.3 // indirect + github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.4.3 // indirect - github.com/sergi/go-diff v1.1.0 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect - github.com/ulikunitz/xz v0.5.9 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/skeema/knownhosts v1.2.2 // indirect + github.com/ulikunitz/xz v0.5.11 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/tools v0.21.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 21b75c2..cfb83fc 100644 --- a/go.sum +++ b/go.sum @@ -1,85 +1,91 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/CycloneDX/cyclonedx-go v0.7.2 h1:kKQ0t1dPOlugSIYVOMiMtFqeXI2wp/f5DBIdfux8gnQ= -github.com/CycloneDX/cyclonedx-go v0.7.2/go.mod h1:K2bA+324+Og0X84fA8HhN2X066K7Bxz4rpMQ4ZhjtSk= +github.com/CycloneDX/cyclonedx-go v0.8.0 h1:FyWVj6x6hoJrui5uRQdYZcSievw3Z32Z88uYzG/0D6M= +github.com/CycloneDX/cyclonedx-go v0.8.0/go.mod h1:K2bA+324+Og0X84fA8HhN2X066K7Bxz4rpMQ4ZhjtSk= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE= -github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= -github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= +github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oMMlVBbn9M= +github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= -github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= +github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= +github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= -github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= -github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/forPelevin/gomoji v1.2.0 h1:9k4WVSSkE1ARO/BWywxgEUBvR/jMnao6EZzrql5nxJ8= +github.com/forPelevin/gomoji v1.2.0/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= +github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE= +github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= -github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= -github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.12.0 h1:7Md+ndsjrzZxbddRDZjF14qK+NN56sy6wkqaVrjZtys= +github.com/go-git/go-git/v5 v5.12.0/go.mod h1:FTM9VKtnI2m65hNI/TenDDDnUf2Q9FHnXYjuz9i5OEY= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= -github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jfrog/build-info-go v1.9.15 h1:DN7DKZq6H5FlHfL3Lu8fo4t2INgczRgT09dJiZjJ1oo= -github.com/jfrog/build-info-go v1.9.15/go.mod h1:XVFk2rCYhIdc7+hIGE8TC3le5PPM+xYHU22udoE2b7Q= -github.com/jfrog/gofrog v1.3.1 h1:QqAwQXCVReT724uga1AYqG/ZyrNQ6f+iTxmzkb+YFQk= -github.com/jfrog/gofrog v1.3.1/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-client-go v1.34.4 h1:Qt6Yniv48N9EaE0rrUZznOohuDRvqp9sUUHiHXAo3Xs= -github.com/jfrog/jfrog-client-go v1.34.4/go.mod h1:0PVhP6xGvBBaUzOU9LKf5OYkke/gY2IFILHA++iabFM= +github.com/jfrog/archiver/v3 v3.6.0 h1:OVZ50vudkIQmKMgA8mmFF9S0gA47lcag22N13iV3F1w= +github.com/jfrog/archiver/v3 v3.6.0/go.mod h1:fCAof46C3rAXgZurS8kNRNdSVMKBbZs+bNNhPYxLldI= +github.com/jfrog/build-info-go v1.9.26 h1:1Ddc6+Ecvhc+UMnKhRVG1jGM6fYNwA49207azTBGBc8= +github.com/jfrog/build-info-go v1.9.26/go.mod h1:8T7/ajM9aGshvgpwCtXwIFpyF/R6CEn4W+/FLryNXWw= +github.com/jfrog/gofrog v1.7.1 h1:ME1Meg4hukAT/7X6HUQCVSe4DNjMZACCP8aCY37EW/w= +github.com/jfrog/gofrog v1.7.1/go.mod h1:X7bjfWoQDN0Z4FQGbE91j3gbPP7Urwzm4Z8tkvrlbRI= +github.com/jfrog/jfrog-client-go v1.40.2 h1:zdCWPPT11r0bMGnAXGhZPb3RrIINhiTFCceQABhguZ4= +github.com/jfrog/jfrog-client-go v1.40.2/go.mod h1:m3hIn12eFWk5nJH1swPRtFrjXbiiCscOpX+v/vCdmNI= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.11.4 h1:kz40R/YWls3iqT9zX9AHN3WoVsrAWVyui5sxuLqiXqU= -github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y70BU= github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= +github.com/klauspost/pgzip v1.2.6 h1:8RXeL5crjEUFnR2/Sn6GJNWtSQ3Dk8pq4CL3jvdDyjU= +github.com/klauspost/pgzip v1.2.6/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/mholt/archiver/v3 v3.5.1 h1:rDjOBX9JSF5BvoJGvjqK479aL70qh9DIpZCl+k7Clwo= -github.com/mholt/archiver/v3 v3.5.1/go.mod h1:e3dqJ7H78uzsRSEACH1joayhuSyhnonssnDhppzS1L4= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= -github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= +github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc= +github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= -github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= +github.com/pierrec/lz4/v4 v4.1.21/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -89,21 +95,23 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= -github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skeema/knownhosts v1.2.2 h1:Iug2P4fLmDw9f41PB6thxUkNUkJzB5i+1/exaj40L3A= +github.com/skeema/knownhosts v1.2.2/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/terminalstatic/go-xsd-validate v0.1.5 h1:RqpJnf6HGE2CB/lZB1A8BYguk8uRtcvYAPLCF15qguo= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= -github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/terminalstatic/go-xsd-validate v0.1.5/go.mod h1:18lsvYFofBflqCrvo1umpABZ99+GneNTw2kEEc8UPJw= +github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= @@ -122,14 +130,14 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= +golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -137,12 +145,13 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -157,15 +166,15 @@ golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -173,22 +182,22 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.0 h1:qc0xYgIbsSDt9EyWz05J5wfa7LOVW0YTLOXrqdLAWIw= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/jfrog-applications/.gitbook/assets/build-info-summary.png b/jfrog-applications/.gitbook/assets/build-info-summary.png new file mode 100644 index 0000000..4822d43 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/build-info-summary.png differ diff --git a/jfrog-applications/.gitbook/assets/image (1).png b/jfrog-applications/.gitbook/assets/image (1).png new file mode 100644 index 0000000..a89b637 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/image (1).png differ diff --git a/jfrog-applications/.gitbook/assets/jf-build-scan-summary.png b/jfrog-applications/.gitbook/assets/jf-build-scan-summary.png new file mode 100644 index 0000000..2365ca9 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/jf-build-scan-summary.png differ diff --git a/jfrog-applications/.gitbook/assets/jf-scan-summary.png b/jfrog-applications/.gitbook/assets/jf-scan-summary.png new file mode 100644 index 0000000..64d2022 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/jf-scan-summary.png differ diff --git a/jfrog-applications/.gitbook/assets/oidc-configure-integration.png b/jfrog-applications/.gitbook/assets/oidc-configure-integration.png new file mode 100644 index 0000000..52d8ab1 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/oidc-configure-integration.png differ diff --git a/jfrog-applications/.gitbook/assets/oidc-identity-mapping.png b/jfrog-applications/.gitbook/assets/oidc-identity-mapping.png new file mode 100644 index 0000000..026abe0 Binary files /dev/null and b/jfrog-applications/.gitbook/assets/oidc-identity-mapping.png differ diff --git a/jfrog-applications/.gitbook/assets/oidc-new-integration.png b/jfrog-applications/.gitbook/assets/oidc-new-integration.png new file mode 100644 index 0000000..5e118ad Binary files /dev/null and b/jfrog-applications/.gitbook/assets/oidc-new-integration.png differ diff --git a/jfrog-applications/.gitbook/assets/rt-upload-summary.png b/jfrog-applications/.gitbook/assets/rt-upload-summary.png new file mode 100644 index 0000000..6de870f Binary files /dev/null and b/jfrog-applications/.gitbook/assets/rt-upload-summary.png differ diff --git a/jfrog-applications/README.md b/jfrog-applications/README.md index cbff800..c3c05a0 100644 --- a/jfrog-applications/README.md +++ b/jfrog-applications/README.md @@ -21,7 +21,7 @@ layout: -## Welcome to the JFrog Applications Doc Hub +## Welcome to the JFrog Applications Doc Hub
IDEideIDE.png
CLIjfrog-clicli.png
FrogbotfrogbotFROG BOT.png
CI ci-integrationsCI Integrations.png
SDKssdksSDK.png
diff --git a/jfrog-applications/SUMMARY.md b/jfrog-applications/SUMMARY.md index d716699..5c2f332 100644 --- a/jfrog-applications/SUMMARY.md +++ b/jfrog-applications/SUMMARY.md @@ -10,7 +10,6 @@ * [Usage](jfrog-cli/get-started/download-and-install/usage.md) * [Configurations](jfrog-cli/get-started/configurations/README.md) * [JFrog Platform Configuration](jfrog-cli/get-started/configurations/jfrog-platform-configuration.md) - * [Setting up a CI Pipeline](jfrog-cli/get-started/configurations/setting-up-a-ci-pipeline.md) * [Proxy Support](jfrog-cli/get-started/configurations/proxy-support.md) * [CLI for JFrog Artifactory](jfrog-cli/cli-for-jfrog-artifactory/README.md) * [Environment Variables](jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md) @@ -30,13 +29,17 @@ * [CLI for JFrog Security](jfrog-cli/cli-for-jfrog-security/README.md) * [Authentication](jfrog-cli/cli-for-jfrog-security/authentication.md) * [Scan your Source Code](jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md) - * [Scan your Binaries](jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md) + * [cUrl Integration](jfrog-cli/cli-for-jfrog-security/curl-integration.md) * [Scan Published Builds](jfrog-cli/cli-for-jfrog-security/scan-published-builds.md) + * [Scan your Binaries](jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md) + * [Enrich your SBOM JSONs & XMLs](jfrog-cli/cli-for-jfrog-security/enrich-your-sbom.md) * [Download Updates for Xray's Database](jfrog-cli/cli-for-jfrog-security/download-updates-for-xrays-database.md) + * [Count Contributing Developers](jfrog-applications/jfrog-cli/cli-for-jfrog-security/count-contributing-developers.md) * [CLI for JFrog Curation](jfrog-cli/cli-for-jfrog-curation.md) * [CLI for JFrog Distribution](jfrog-cli/cli-for-jfrog-distribution.md) * [CLI for JFrog Pipelines](jfrog-cli/cli-for-jfrog-pipelines.md) * [CLI for JFrog Cloud Transfer](jfrog-cli/cli-for-jfrog-cloud-transfer.md) + * [CLI Command Summaries](jfrog-cli/cli-command-summaries.md) * [JFrog CLI Plugins](jfrog-cli/cli-plugins/README.md) * [JFrog CLI Plugins Developer Guide](jfrog-cli/cli-plugins/developer-guide.md) * [IDE](ide/README.md) @@ -65,19 +68,24 @@ * [Supported Technologies](jfrog-applications/frogbot/supported-technologies.md) * [Setup](frogbot/setup-frogbot.md) * [Frogbot Configuration](frogbot/frogbot-configuration.md) - * [Setup Frogbot Using GitHub Actions](frogbot/setup-frogbot-using-github-actions.md) + * [Setup Frogbot Using GitHub Actions](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/README.md) + * [OIDC Authentication](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/oidc-authentication.md) + * [Scan Git Repository Full Template](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-git-repository-full-template.md) + * [Scan Pull Request Full Template](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-pull-request-full-template.md) * [Setup Frogbot Using Jenkins](frogbot/setup-frogbot-using-jenkins.md) * [Setup Frogbot Using JFrog Pipelines](frogbot/setup-frogbot-using-jfrog-pipelines.md) - * [Setup Frogbot Using GitLab CI](frogbot/setup-frogbot-using-gitlab-ci.md) + * [Setup Frogbot Using GitLab CI](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/README.md) + * [GitLab Full Template](jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/gitlab-full-template.md) * [Setup Frogbot Using Azure Pipelines](frogbot/setup-frogbot-using-azure-pipelines.md) - * [Scan Pull Requests](jfrog-applications/frogbot/scan-pull-requests/README.md) - * [Scan GitHub Pull Request](jfrog-applications/frogbot/scan-pull-requests/scan-github-pull-request.md) - * [Scan Gitlab Pull Request](jfrog-applications/frogbot/scan-pull-requests/scan-gitlab-pull-request.md) - * [Scan Azure Repos Pull Request](jfrog-applications/frogbot/scan-pull-requests/scan-azure-repos-pull-request.md) - * [Scan Bitbucket Server Pull Request](jfrog-applications/frogbot/scan-pull-requests/scan-bitbucket-server-pull-request.md) - * [Pull Request Scan Results](jfrog-applications/frogbot/scan-pull-requests/pull-request-scan-results.md) - * [Scan Git Repositories](jfrog-applications/frogbot/scan-repositories/README.md) - * [View Security Alerts on GitHub](jfrog-applications/frogbot/scan-repositories/view-security-alerts-on-github.md) + * [Scan Execution](jfrog-applications/frogbot/scan-execution/README.md) + * [Scan Git Repositories](jfrog-applications/frogbot/scan-execution/scan-repositories/README.md) + * [View Security Alerts on GitHub](jfrog-applications/frogbot/scan-execution/scan-repositories/view-security-alerts-on-github.md) + * [Scan Pull Requests](jfrog-applications/frogbot/scan-execution/scan-pull-requests/README.md) + * [Scan GitHub Pull Request](jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-github-pull-request.md) + * [Scan GitLab Pull Request](jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-gitlab-pull-request.md) + * [Scan Azure Repos Pull Request](jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-azure-repos-pull-request.md) + * [Scan Bitbucket Server Pull Request](jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-bitbucket-server-pull-request.md) + * [Pull Request Scan Results](jfrog-applications/frogbot/scan-execution/scan-pull-requests/pull-request-scan-results.md) * [Frogbot Badge](frogbot/frogbot-badge.md) ## CI & SDKs diff --git a/jfrog-applications/ci-and-sdks/ci-integrations/artifactory-gradle-plugin.md b/jfrog-applications/ci-and-sdks/ci-integrations/artifactory-gradle-plugin.md index 2ce5346..42218e2 100644 --- a/jfrog-applications/ci-and-sdks/ci-integrations/artifactory-gradle-plugin.md +++ b/jfrog-applications/ci-and-sdks/ci-integrations/artifactory-gradle-plugin.md @@ -4,7 +4,7 @@ The Gradle Artifactory Plugin provides tight integration with Gradle. All that is needed is a simple modification of your `build.gradle` script file with a few configuration parameters, and you can deploy your build artifacts and build information to Artifactory. -The plugin adds the `artifactoryPublish` task for each project, in the 'publishing' group. The task performs the following actions on the project and its submodules: +The plugin adds the `artifactoryPublish` task for each project, in the `publishing` group. The task performs the following actions on the project and its submodules: 1. Extracting the [build-info](https://www.buildinfo.org/) file located in the root project. This file contains comprehensive information about the build, such as its configuration, dependencies, and other relevant details. 2. Deploying both the generated artifacts and the build-info file to your Artifactory repository. This ensures that the artifacts, which are the output of the build process, and the accompanying build-info file are stored and organized in your Artifactory repository for easy access and management. diff --git a/jfrog-applications/ci-and-sdks/ci-integrations/github-actions.md b/jfrog-applications/ci-and-sdks/ci-integrations/github-actions.md index 13e828e..4f509b8 100644 --- a/jfrog-applications/ci-and-sdks/ci-integrations/github-actions.md +++ b/jfrog-applications/ci-and-sdks/ci-integrations/github-actions.md @@ -1,212 +1,4 @@ # GitHub Actions -Setup JFrog CLI - -This GitHub Action downloads, installs and configures JFrog CLI, so that it can be used as part of the workflow. - -In addition, the Action includes the following features, when using JFrog CLI to work with JFrog Platform. - -* The connection details of the JFrog platform used by JFrog CLI can be stored as secrets. -* There's no need to add the _build name_ and _build number_ options and arguments to commands which accept them. All build related operations will be automatically recorded with the _Workflow Name_ as build name and _Run Number_ as build number. - -## Usage - -### General - -```yml -- uses: jfrog/setup-jfrog-cli@v3 -- run: jf --version -``` - -### Storing JFrog connection details as secrets - -The connection details of the JFrog platform used by JFrog CLI can be stored as secrets. You can use one of the following two methods to define and store the JFrog Platform connection details as secrets. - -1. [Storing the connection details using separate environment variables](broken-reference). -2. [Storing the connection details using single Config Token](broken-reference). - -#### Storing the connection details using separate environment variables - -You can set the connection details to your JFrog Platform by using one of the following environment variables combinations: - -1. JF\_URL (no authentication) -2. JF\_URL + JF\_USER + JF\_PASSWORD (basic authentication) -3. JF\_URL + JF\_ACCESS\_TOKEN (authentication using a JFrog Access Token) - -You can use these environment variables in your workflow as follows: - -```yml -- uses: jfrog/setup-jfrog-cli@v3 - env: - # JFrog platform url (for example: https://acme.jfrog.io) - JF_URL: ${{ secrets.JF_URL }} - - # Basic authentication credentials - JF_USER: ${{ secrets.JF_USER }} - JF_PASSWORD: ${{ secrets.JF_PASSWORD }} - or - # JFrog Platform access token - JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} -- run: | - jf rt ping -``` - -| Important: If both Config Token(JF\_ENV\_\*) and separate environment variables(JF\_URL, ...) are provided, the default config will be the Config Token. To make the above separate environment variables as the default config use `jf c use setup-jfrog-cli-server` | -|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| - -#### Storing the connection details using single Config Token - -1. Make sure JFrog CLI is installed on your local machine by running `jf -v`. -2. Configure the details of the JFrog platform by running `jf c add`. -3. Export the details of the JFrog platform you configured, using the server ID you chose. Do this by running `jf c export `. -4. Copy the generated Config Token to the clipboard and save it as a secret on GitHub. - -To use the saved JFrog platform configuration in the workflow, all you need to do it to expose the secret to the workflow. The secret should be exposed as an environment variable with the _JF\_ENV\__ prefix. Here's how you do this: - -```yml -- uses: jfrog/setup-jfrog-cli@v3 - env: - JF_ENV_1: ${{ secrets.JF_SECRET_ENV_1 }} -- run: | - # Ping the server - jf rt ping -``` - -As you can see in the example above, we created a secret named _JF\_SECRET\_ENV\_1_ and exposed it to the workflow as the _JF\_ENV\_1_ environment variable. That's it - the ping command will now ping the configured Artifactory server. - -If you have multiple Config Tokens as secrets, you can use all of them in the workflow as follows: - -```yml -- uses: jfrog/setup-jfrog-cli@v3 - env: - JF_ENV_1: ${{ secrets.JF_SECRET_ENV_1 }} - JF_ENV_2: ${{ secrets.JF_SECRET_ENV_2 }} -- run: | - # Set the JFrog configuration to use by providing the server ID (configured by the 'jf c add' command). - jf c use local-1 - # Ping local-1 Artifactory server - jf rt ping - # Now use the second sever configuration exposed to the Action. - jf c use local-2 - # Ping local-2 Artifactory server - jf rt ping -``` - -| Important: When exposing more than one JFrog configuration to the Action, you should always add the `jf c use` command to specify the server to use. | -|------------------------------------------------------------------------------------------------------------------------------------------------------| - -### Setting the build name and build number when publishing build-info to Artifactory - -The Action automatically sets the following environment variables: _JFROG\_CLI\_BUILD\_NAME_ and _JFROG\_CLI\_BUILD\_NUMBER_ with the workflow name and run number respectively. You therefore don't need to specify the build name and build number on any of the build related JFrog CLI commands. - -In the following example, all downloaded files are registered as dependencies of the build and all uploaded files are registered as the build artifacts. - -```yml -- run: | - jf rt dl artifacts/ - jf rt u aether artifacts/ - jf rt bp -``` - -### Setting JFrog CLI version - -By default, the JFrog CLI version set in [action.yml](https://github.com/jfrog/setup-jfrog-cli/blob/master/action.yml) is used. To set a specific version, add the _version_ input as follows: - -```yml -- uses: jfrog/setup-jfrog-cli@v3 - with: - version: X.Y.Z -``` - -It is also possible to set the latest JFrog CLI version by adding the _version_ input as follows: - -```yml -- uses: jfrog/setup-jfrog-cli@v3 - with: - version: latest -``` - -### Downloading JFrog CLI from Artifactory - -If your agent has no Internet access, you can configure the workflow to download JFrog CLI from a [remote repository](https://www.jfrog.com/confluence/display/JFROG/Remote+Repositories) in your JFrog Artifactory, which is configured to proxy the official download URL. - -Here's how you do this: - -1. Create a remote repository in Artifactory. Name the repository jfrog-cli-remote and set its URL to https://releases.jfrog.io/artifactory/jfrog-cli/ -2. Set _download-repository_ input to jfrog-cli-remote: - - ```yml - - uses: jfrog/setup-jfrog-cli@v3 - env: - # JFrog platform url (for example: https://acme.jfrog.io) - JF_URL: ${{ secrets.JF_URL }} - - # Basic authentication credentials - JF_USER: ${{ secrets.JF_USER }} - JF_PASSWORD: ${{ secrets.JF_PASSWORD }} - - # JFrog platform access token (if JF_USER and JF_PASSWORD are not provided) - # JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} - - # Same can be achieved with a Config Token using JF_ENV_1 environment variable - # JF_ENV_1: ${{ secrets.JF_SECRET_ENV_1 }} - with: - download-repository: jfrog-cli-remote - ``` - -* See instructions for configuring the JFrog connection details under [Storing JFrog connection details as secrets](broken-reference). - -### Set up a FREE JFrog Environment in the Cloud - -Need a FREE JFrog environment in the cloud to use with this GitHub Action? Just run one of the following commands in your terminal. The commands will do the following: - -1. Install JFrog CLI on your machine. -2. Create a FREE JFrog environment in the cloud for you. - -**MacOS and Linux using cUrl** - -``` -curl -fL "https://getcli.jfrog.io?setup" | sh -``` - -**Windows using PowerShell** - -``` -powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup -``` - -### Example projects - -To help you get started, you can use [these](https://github.com/jfrog/project-examples/tree/master/github-action-examples) sample projects on GitHub. - -## Developing the Action code - -### Build the code - -If you'd like to help us develop and enhance this Action, this section is for you. - -To build and run the Action tests, run - -```bash -npm i && npm t -``` - -### Code contributions - -We welcome code contributions through pull requests. - -Please help us enhance and improve this Action. - -#### Pull requests guidelines - -* If the existing tests do not already cover your changes, please add tests. -* Please run `npm run format` for formatting the code before submitting the pull request. - -## License - -This Action is licensed under the [Apache License 2.0](https://github.com/jfrog/setup-jfrog-cli/blob/master/LICENSE). - -## References - -* [JFrog CLI Documentation](https://www.jfrog.com/confluence/display/CLI/JFrog+CLI) -* [GitHub Actions Documentation](https://help.github.com/en/categories/automating-your-workflow-with-github-actions) +The **Setup JFrog CLI** GitHub Action automates the process of downloading, installing, and configuring the JFrog CLI, enabling its use within your GitHub workflow. +For comprehensive documentation, visit the [GitHub Actions Marketplace](https://github.com/marketplace/actions/setup-jfrog-cli). \ No newline at end of file diff --git a/jfrog-applications/ci-and-sdks/ci-integrations/gitlab-templates-for-jfrog.md b/jfrog-applications/ci-and-sdks/ci-integrations/gitlab-templates-for-jfrog.md index 04be35d..bcd577e 100644 --- a/jfrog-applications/ci-and-sdks/ci-integrations/gitlab-templates-for-jfrog.md +++ b/jfrog-applications/ci-and-sdks/ci-integrations/gitlab-templates-for-jfrog.md @@ -13,10 +13,10 @@ The script does the following: ### Installation -1. Ensure you have the connection details for the JFrog Platform. Don't have a JFrog Platform? [Set up](broken-reference) a free JFrog Platform instance in the cloud now -2. [Store](broken-reference) the JFrog Platform connection details on GitLab +1. Ensure you have the connection details for the JFrog Platform. +2. [Store](broken-reference/) the JFrog Platform connection details on GitLab 3. Optionally set the URL of your Artifactory Docker Registry as the value of the **JF\_DOCKER\_REGISTRY** variable -4. [Add](broken-reference) the **setup-jfrog** pipeline script in your GitLab pipeline +4. [Add](broken-reference/) the **setup-jfrog** pipeline script in your GitLab pipeline #### Storing the JFrog Platform Connection Details @@ -79,7 +79,7 @@ job: If your GitLab environment is air-gapped, you would want your pipeline to avoid downloading the **setup-jfrog** script and also JFrog CLI from `https://releases.jfrog.io/artifactory`. Here's how you do this: -As shown in the above [Including the Script](broken-reference) and [Referencing the Script](broken-reference) sections, you have the option of copying the **setup-jfrog** script into your pipeline, and thus avoiding its download. Since the **setup-jfrog** script downloads JFrog CLI from `https://releases.jfrog.io/artifactory`, you should also configure the script to download JFrog CLI from a remote repository in your JFrog Artifactory instance. Follow these steps to have JFrog CLI downloaded from your Artifactory instance: +As shown in the above [Including the Script](broken-reference/) and [Referencing the Script](broken-reference/) sections, you have the option of copying the **setup-jfrog** script into your pipeline, and thus avoiding its download. Since the **setup-jfrog** script downloads JFrog CLI from `https://releases.jfrog.io/artifactory`, you should also configure the script to download JFrog CLI from a remote repository in your JFrog Artifactory instance. Follow these steps to have JFrog CLI downloaded from your Artifactory instance: 1. Create a remote generic repository in Artifactory pointing to `https://releases.jfrog.io/artifactory/` 2. Add the **JF\_RELEASES\_REPO** variable to GitLab with the name of the repository you created @@ -164,24 +164,3 @@ $ jf mvn clean install * Pip * Pipenv * Yarn Berry - - - -### Set Up a FREE JFrog Environment in the Cloud - -Need a FREE JFrog environment in the cloud to use with these templates? Just run one of the following commands in your terminal. The commands will do the following: - -1. Install JFrog CLI on your machine. -2. Create a FREE JFrog environment in the cloud for you. - -**MacOS and Linux using cURL** - -``` -curl -fL "https://getcli.jfrog.io?setup" | sh -``` - -**Windows using PowerShell** - -``` -powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup -``` diff --git a/jfrog-applications/frogbot/frogbot-configuration.md b/jfrog-applications/frogbot/frogbot-configuration.md index 93f8d3b..5c0bf7b 100644 --- a/jfrog-applications/frogbot/frogbot-configuration.md +++ b/jfrog-applications/frogbot/frogbot-configuration.md @@ -30,7 +30,7 @@ Frogbot relies on the project's descriptor files, such as package.json and pom.x - path/to/npm/project-2 ``` -Here's another example. Notice that we specify a custom 'install' command here. +Here's another example. Notice that we specify a custom `install` command here. ```yaml - params: diff --git a/jfrog-applications/frogbot/setup-frogbot-using-azure-pipelines.md b/jfrog-applications/frogbot/setup-frogbot-using-azure-pipelines.md index 5cf69d0..3761a41 100644 --- a/jfrog-applications/frogbot/setup-frogbot-using-azure-pipelines.md +++ b/jfrog-applications/frogbot/setup-frogbot-using-azure-pipelines.md @@ -1,6 +1,6 @@ # Setup Frogbot Using Azure Pipelines -**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using Azure Pipelines for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-pull-requests/#security-note-for-pull-requests-scanning). +**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using Azure Pipelines for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-execution/scan-pull-requests/#security-note-for-pull-requests-scanning). To install Frogbot on Azure Repos repositories, follow these steps. @@ -320,7 +320,7 @@ jobs: # JF_MIN_SEVERITY: "" # [Optional] - # List of comma separated email addresses to receive email notifications about secrets + # List of comma-separated(,) email addresses to receive email notifications about secrets # detected during pull request scanning. The notification is also sent to the email set # in the committer git profile regardless of whether this variable is set or not. # JF_EMAIL_RECEIVERS: "" diff --git a/jfrog-applications/frogbot/setup-frogbot-using-github-actions.md b/jfrog-applications/frogbot/setup-frogbot-using-github-actions.md deleted file mode 100644 index 409c40a..0000000 --- a/jfrog-applications/frogbot/setup-frogbot-using-github-actions.md +++ /dev/null @@ -1,31 +0,0 @@ -# Setup Frogbot Using GitHub Actions - -### Github Prerequisites - -* Go to your repository's **settings** tab and save the JFrog connection details as repository secrets with the following names: - * **JF\_URL** (JFrog Platform URL - Example: `https://acme.jfrog.io`) - * **JF\_ACCESS\_TOKEN** (JFrog access token) - -> You can also use **JF\_XRAY\_URL** and **JF\_ARTIFACTORY\_URL** instead of **JF\_URL**, and **JF\_USER** + **JF\_PASSWORD** instead of **JF\_ACCESS\_TOKEN** - -![](../.gitbook/assets/github-repository-secrets.png) - -* Under **Actions** > **General**, check the **Allow GitHub Actions to create and approve pull requests** check box. - -![](../.gitbook/assets/github-pr-permissions.png) - -* For open-source projects: Create a new [GitHub environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment) called **frogbot** and add people or public teams as reviewers. The chosen reviewers can trigger Frogbot scans on pull requests. - -![](../../../.gitbook/assets/github-environment.png) - -### Frogbot GitHub Action Templates - -1. Begin by cloning the GitHub repository to your local environment. - -2. Switch to the target branch where you'd like the pull requests to be scanned. - -3. Create a file named **frogbot-scan-pull-request.yml**. Fill it with the provided [template](templates/github-actions/frogbot-scan-pull-request.yml), and then push it into the **.github/workflows** directory at the root of your GitHub repository. - -4. Return to the default branch. - -5. Now, create a file named **frogbot-scan-repository.yml**. Again, populate it with the provided [template](templates/github-actions/frogbot-scan-repository.yml) and push it into the **.github/workflows** directory at the root of your GitHub repository. diff --git a/jfrog-applications/frogbot/setup-frogbot-using-jenkins.md b/jfrog-applications/frogbot/setup-frogbot-using-jenkins.md index 32931b4..f675498 100644 --- a/jfrog-applications/frogbot/setup-frogbot-using-jenkins.md +++ b/jfrog-applications/frogbot/setup-frogbot-using-jenkins.md @@ -1,6 +1,6 @@ # Setup Frogbot Using Jenkins -**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using Jenkins for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-pull-requests/#security-note-for-pull-requests-scanning). +**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using Jenkins for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-execution/scan-pull-requests/#security-note-for-pull-requests-scanning). #### 🖥️ Follow these steps to install Frogbot on Jenkins @@ -277,7 +277,7 @@ // JF_GIT_EMAIL_AUTHOR= "" // [Optional] - // List of comma separated email addresses to receive email notifications about secrets + // List of comma-separated(,) email addresses to receive email notifications about secrets // detected during pull request scanning. The notification is also sent to the email set // in the committer git profile regardless of whether this variable is set or not. // JF_EMAIL_RECEIVERS= "" diff --git a/jfrog-applications/frogbot/setup-frogbot-using-jfrog-pipelines.md b/jfrog-applications/frogbot/setup-frogbot-using-jfrog-pipelines.md index 787c20c..4c020aa 100644 --- a/jfrog-applications/frogbot/setup-frogbot-using-jfrog-pipelines.md +++ b/jfrog-applications/frogbot/setup-frogbot-using-jfrog-pipelines.md @@ -1,6 +1,6 @@ # Setup Frogbot Using JFrog Pipelines -**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using JFrog Pipelines for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-pull-requests/#security-note-for-pull-requests-scanning). +**Important Notice**: For Scanning Pull Requests, it is advisable to refrain from setting up Frogbot using JFrog Pipelines for open source projects. For further details, please refer to the [👮 Security Note for Pull Requests Scanning](../jfrog-applications/frogbot/scan-execution/scan-pull-requests/#security-note-for-pull-requests-scanning). * Make sure you have the connection details of your JFrog Platform. * Inside JFrog Pipelines, save the JFrog connection details as a [JFrog Platform Access Token Integration](https://www.jfrog.com/confluence/display/JFROG/JFrog+Platform+Access+Token+Integration) named **jfrogPlatform**. diff --git a/jfrog-applications/frogbot/setup-frogbot.md b/jfrog-applications/frogbot/setup-frogbot.md index ef129cd..7c76344 100644 --- a/jfrog-applications/frogbot/setup-frogbot.md +++ b/jfrog-applications/frogbot/setup-frogbot.md @@ -1,51 +1,22 @@ -# Setup Frogbot +# Setup #### What's needed for the setup? * **JFrog Platform** server. (If you don't have a JFrog Platform, you can set up one for free) - * **CI server** to run the scan tasks. #### Select your preferred CI server: -- [GitHub Actions](./setup-frogbot-using-github-actions.md) -- [Jenkins](./setup-frogbot-using-jenkins.md) -- [JFrog Pipelines](./setup-frogbot-using-jfrog-pipelines.md) -- [GitLab CI](./setup-frogbot-using-gitlab-ci.md) -- [Azure Pipelines](./setup-frogbot-using-azure-pipelines.md) - -
- -Optionally - set up a FREE JFrog Platform in the Cloud - -Frogbot requires a JFrog environment to scan your projects. If you don't have an environment, we can set up a free environment in the cloud for you. Just run one of the following commands in your terminal to set up an environment in less than a minute. - -The commands will do the following: - -1. Install [JFrog CLI](https://www.jfrog.com/confluence/display/CLI/JFrog+CLI) on your machine. -2. Create a FREE JFrog environment in the cloud for you. - -**For macOS and Linux, use curl** - -``` -curl -fL "https://getcli.jfrog.io?setup" | sh -``` - -**For Windows, use PowerShell** - -``` -powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup -``` - -After the setup is complete, you'll receive an email with your JFrog environment connection details, which can be stored as secrets in Git. - -
+* [GitHub Actions](../jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/) +* [Jenkins](setup-frogbot-using-jenkins.md) +* [JFrog Pipelines](setup-frogbot-using-jfrog-pipelines.md) +* [GitLab CI](../jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/) +* [Azure Pipelines](setup-frogbot-using-azure-pipelines.md)
Advanced - Customize advanced settings with frogbot-config.yml -* [Creating the frogbot-config.yml file](./frogbot-configuration.md) +* [Creating the frogbot-config.yml file](frogbot-configuration.md)
- diff --git a/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-pull-request.yml b/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-pull-request.yml index eae619c..df77d39 100644 --- a/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-pull-request.yml +++ b/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-pull-request.yml @@ -5,6 +5,8 @@ on: permissions: pull-requests: write contents: read + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write jobs: scan-pull-request: runs-on: ubuntu-latest @@ -16,7 +18,7 @@ jobs: env: # [Mandatory] # JFrog platform URL - JF_URL: ${{ secrets.JF_URL }} + JF_URL: ${{ vars.JF_URL }} # [Mandatory if JF_USER and JF_PASSWORD are not provided] # JFrog access token with 'read' permissions on Xray service @@ -128,7 +130,7 @@ jobs: # JF_MIN_SEVERITY: "" # [Optional] - # List of comma separated email addresses to receive email notifications about secrets + # List of comma-separated(,) email addresses to receive email notifications about secrets # detected during pull request scanning. The notification is also sent to the email set # in the committer git profile regardless of whether this variable is set or not. # JF_EMAIL_RECEIVERS: "" @@ -146,3 +148,8 @@ jobs: # [Optional] # Add a title to pull request comments generated by Frogbot. # JF_PR_COMMENT_TITLE: "" + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" diff --git a/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-repository.yml b/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-repository.yml index 7d89f4a..1291bfc 100644 --- a/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-repository.yml +++ b/jfrog-applications/frogbot/templates/github-actions/frogbot-scan-repository.yml @@ -8,6 +8,8 @@ permissions: contents: write pull-requests: write security-events: write + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write jobs: scan-repository: runs-on: ubuntu-latest @@ -20,7 +22,7 @@ jobs: env: # [Mandatory] # JFrog platform URL - JF_URL: ${{ secrets.JF_URL }} + JF_URL: ${{ vars.JF_URL }} # [Mandatory if JF_USER and JF_PASSWORD are not provided] # JFrog access token with 'read' permissions on Xray service @@ -140,3 +142,8 @@ jobs: # [Optional] # Add a title to pull request comments generated by Frogbot. # JF_PR_COMMENT_TITLE: "" + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" \ No newline at end of file diff --git a/jfrog-applications/ide/jetbrains-ides/connect-the-jfrog-plugin-to-the-jfrog-platform.md b/jfrog-applications/ide/jetbrains-ides/connect-the-jfrog-plugin-to-the-jfrog-platform.md index fff0e98..7ea0b8d 100644 --- a/jfrog-applications/ide/jetbrains-ides/connect-the-jfrog-plugin-to-the-jfrog-platform.md +++ b/jfrog-applications/ide/jetbrains-ides/connect-the-jfrog-plugin-to-the-jfrog-platform.md @@ -2,30 +2,6 @@
-Optionally set up a free JFrog Environment in the Cloud - -Need a free JFrog environment in the Cloud, so that JFrog IntelliJ IDEA Plugin can connect to it? Just run one of the following commands in your terminal. The commands will do the following: - -1. Install JFrog CLI on your machine. -2. Create a FREE JFrog environment in the Cloud for you. -3. Configure IntelliJ IDEA to connect to your new environment. - -**MacOS and Linux using cURL** - -```bash -curl -fL https://getcli.jfrog.io?setup | sh -``` - -**Windows using PowerShell** - -```powershell -powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup -``` - -
- -
- Connect the JFrog Plugin to an existing JFrog Environment You can connect the plugin to your JFrog environment using one of the following methods: @@ -34,13 +10,12 @@ You can connect the plugin to your JFrog environment using one of the following Once the plugin is successfully installed, connect the plugin to your instance of the JFrog Platform: -1. If your JFrog Platform instance is behind an HTTP proxy, configure the proxy settings as described [here](https://www.jetbrains.com/help/idea/settings-http-proxy.html). - Manual proxy configuration is supported since version 1.3.0 of the JFrog IntelliJ IDEA Plugin. Auto-detect proxy settings is supported since version 1.7.0. +1. If your JFrog Platform instance is behind an HTTP proxy, configure the proxy settings as described [here](https://www.jetbrains.com/help/idea/settings-http-proxy.html). Manual proxy configuration is supported since version 1.3.0 of the JFrog IntelliJ IDEA Plugin. Auto-detect proxy settings is supported since version 1.7.0. 2. Under **Settings (Preferences)** | **Other Settings**, click **JFrog Global Configuration**. 3. Set your JFrog Platform URL and login credentials. 4. Test your connection to Xray using the Test Connection button. - -![](../../.gitbook/assets/connect-idea-to-jfrog.png) + + **Using Environment Variables** @@ -51,12 +26,12 @@ The plugin also supports connecting to your JFrog environment using environment You may provide basic auth credentials or access token as follows: -> **_NOTE:_** For security reasons, it is recommended to unset the environment variables after launching the IDE. +_**NOTE:**_ For security reasons, it is recommended to unset the environment variables after launching the IDE. -- `JFROG_IDE_PLATFORM_URL` - JFrog Platform URL -- `JFROG_IDE_USERNAME` - JFrog Platform username -- `JFROG_IDE_PASSWORD` - JFrog Platform password -- `JFROG_IDE_ACCESS_TOKEN` - JFrog Platform access token +* `JFROG_IDE_PLATFORM_URL` - JFrog Platform URL +* `JFROG_IDE_USERNAME` - JFrog Platform username +* `JFROG_IDE_PASSWORD` - JFrog Platform password +* `JFROG_IDE_ACCESS_TOKEN` - JFrog Platform access token
diff --git a/jfrog-applications/ide/jetbrains-ides/plugin-configuration.md b/jfrog-applications/ide/jetbrains-ides/plugin-configuration.md index d4af831..e3e53a0 100644 --- a/jfrog-applications/ide/jetbrains-ides/plugin-configuration.md +++ b/jfrog-applications/ide/jetbrains-ides/plugin-configuration.md @@ -14,15 +14,15 @@ By default, the JFrog IDEA Plugin downloads the resources it requires from ![ExternalResourcesThroughArtifactoryPart1](../../.gitbook/assets/externalResourcesThroughArtifactoryPart1.png) - - Under the 'Advanced' tab: - - Uncheck the 'Store Artifacts Locally' option + - Under the `Advanced` tab: + - Uncheck the `Store Artifacts Locally` option ![ExternalResourcesThroughArtifactoryPart2](../../.gitbook/assets/externalResourcesThroughArtifactoryPart2.png) diff --git a/jfrog-applications/ide/visual-studio-code/connect-vs-code-to-the-jfrog-platform.md b/jfrog-applications/ide/visual-studio-code/connect-vs-code-to-the-jfrog-platform.md index b2ee5ce..73b8d5f 100644 --- a/jfrog-applications/ide/visual-studio-code/connect-vs-code-to-the-jfrog-platform.md +++ b/jfrog-applications/ide/visual-studio-code/connect-vs-code-to-the-jfrog-platform.md @@ -1,31 +1,5 @@ # Connect VS Code to the JFrog Platform -
- -If you don't have a JFrog Platform instance, create a free instance in the cloud by running one of the following commands in your terminal. - -**MacOS and Linux using cUrl** - -``` -curl -fL "https://getcli.jfrog.io?setup" | sh -``` - -**Windows using PowerShell** - -``` -powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup -``` - -The commands will do the following: - -1. Install JFrog CLI on your machine. -2. Create a FREE JFrog environment in the cloud for you. -3. Configure VS Code to connect to your new environment. - -
- -\\ - Once the JFrog Extension is installed in VS Code, click on the JFrog tab: ![jfrogTab](../../.gitbook/assets/vscode/jfrogTab.png) @@ -36,7 +10,7 @@ This will open the Sign in page: Fill in your connection details and click on the `Sign In` button to start using the extension -**Note**: If you would like to use custom URLs for Artifactory or Xray, click on 'Advanced'. +**Note**: If you would like to use custom URLs for Artifactory or Xray, click on `Advanced`. You can also choose other option to authenticate with your JFrog Platform instance: diff --git a/jfrog-applications/ide/visual-studio-code/extension-settings.md b/jfrog-applications/ide/visual-studio-code/extension-settings.md index d3cef6d..1365fd5 100644 --- a/jfrog-applications/ide/visual-studio-code/extension-settings.md +++ b/jfrog-applications/ide/visual-studio-code/extension-settings.md @@ -13,8 +13,8 @@ By default, paths containing the words `.git`, `test`, `venv` and `node_modules` If your JFrog environment is behind an HTTP/S proxy, follow these steps to configure the proxy server: 1. Go to Preferences --> Settings --> Application --> Proxy -2. Set the proxy URL under 'Proxy'. -3. Make sure 'Proxy Support' is 'override' or 'on'. +2. Set the proxy URL under `Proxy`. +3. Make sure 'Proxy Support' is `override` or `on`. * Alternatively, you can use the HTTP\_PROXY and HTTPS\_PROXY environment variables. @@ -26,14 +26,14 @@ By default, the JFrog VS Code extension downloads the resources it requires from 1. Login to the JFrog Platform UI, with a user who has admin permissions. 2. Create a Remote Repository with the following properties set: - * Under the 'Basic' tab: + * Under the `Basic` tab: * Package Type: Generic * Repository Key: jfrog-releases-repository * URL: ![ExternalResourcesThroughArtifactoryPart1](../../.gitbook/assets/externalResourcesThroughArtifactoryPart1.png) - * Under the 'Advanced' tab: + * Under the `Advanced` tab: * Uncheck the 'Store Artifacts Locally' option ![ExternalResourcesThroughArtifactoryPart2](../../.gitbook/assets/externalResourcesThroughArtifactoryPart2.png) @@ -82,4 +82,4 @@ settings.json: ### Troubleshooting -Change the log level to 'debug', 'info', 'warn', or 'err' in the [Extension Settings](extension-settings.md). +Change the log level to `debug`, `info`, `warn`, or `err` in the [Extension Settings](extension-settings.md). diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-execution/README.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/README.md new file mode 100644 index 0000000..f26f45e --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/README.md @@ -0,0 +1,2 @@ +# Scan Execution + diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/README.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/README.md similarity index 100% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/README.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/README.md diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/pull-request-scan-results.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/pull-request-scan-results.md similarity index 78% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/pull-request-scan-results.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/pull-request-scan-results.md index 4f855a8..f250e5b 100644 --- a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/pull-request-scan-results.md +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/pull-request-scan-results.md @@ -20,11 +20,11 @@ If new vulnerabilities are found, Frogbot adds them as a comment on the pull req **VULNERABLE DEPENDENCIES** -| SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS | -| :---------------------------------------------------------------------------------------------------------------------------------: | :-----------------: | :-----------------: | :-----------------: | :-----------------------: | -|


Critical

| Not Applicable | minimist:1.2.5 | minimist:1.2.5 |

[0.2.4]
[1.2.6]

| -|


High

| Applicable | protobufjs:6.11.2 | protobufjs:6.11.2 | \[6.11.3] | -|


High

| Not Applicable | lodash:4.17.19 | lodash:4.17.19 | \[4.17.21] | +| SEVERITY | CONTEXTUAL ANALYSIS | DIRECT DEPENDENCIES | IMPACTED DEPENDENCY | FIXED VERSIONS | +|:-----------------------------------------------------------------------------------------------------------------------------------:|:-------------------:|:-------------------:|:-------------------:|:-------------------------:| +|


Critical

| Not Applicable | minimist:1.2.5 | minimist:1.2.5 |

[0.2.4]
[1.2.6]

| +|


High

| Applicable | protobufjs:6.11.2 | protobufjs:6.11.2 | \[6.11.3] | +|


High

| Not Applicable | lodash:4.17.19 | lodash:4.17.19 | \[4.17.21] | **Vulnerability Contextual Analysis** diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-azure-repos-pull-request.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-azure-repos-pull-request.md similarity index 100% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-azure-repos-pull-request.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-azure-repos-pull-request.md diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-bitbucket-server-pull-request.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-bitbucket-server-pull-request.md similarity index 72% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-bitbucket-server-pull-request.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-bitbucket-server-pull-request.md index 537b4d2..9f7e52f 100644 --- a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-bitbucket-server-pull-request.md +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-bitbucket-server-pull-request.md @@ -2,7 +2,7 @@ After you create a new pull request, Frogbot will automatically scan it. -_**NOTE:**_ The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. +_**NOTE:**_ The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. The Frogbot scan on Bitbucket Server workflow: diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-github-pull-request.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-github-pull-request.md similarity index 81% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-github-pull-request.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-github-pull-request.md index 09ba8df..88d34d8 100644 --- a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-github-pull-request.md +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-github-pull-request.md @@ -1,8 +1,8 @@ -# Scan Github Pull Request +# Scan GitHub Pull Request After you create a new pull request, the maintainer of the Git repository can trigger Frogbot to scan the pull request from the pull request UI. -_**NOTE:**_ The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. +_**NOTE:**_ The scan output will include only new vulnerabilities added by the pull request. Vulnerabilities that aren't new, and existed in the code before the pull request was created, will not be included in the report. In order to include all the vulnerabilities in the report, including older ones that weren't added by this PR, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. The Frogbot GitHub scan workflow is: diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-gitlab-pull-request.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-gitlab-pull-request.md similarity index 79% rename from jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-gitlab-pull-request.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-gitlab-pull-request.md index 798bdfb..1ff2c24 100644 --- a/jfrog-applications/jfrog-applications/frogbot/scan-pull-requests/scan-gitlab-pull-request.md +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-pull-requests/scan-gitlab-pull-request.md @@ -2,7 +2,7 @@ After you create a new merge request, the maintainer of the Git repository can trigger Frogbot to scan the merge request from the merge request UI. -_**NOTE:**_ The scan output will include only new vulnerabilities added by the merge request. Vulnerabilities that aren't new, and existed in the code before the merge request was created, will not be included in the report. In order to include all of the vulnerabilities in the report, including older ones that weren't added by this merge request, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. +_**NOTE:**_ The scan output will include only new vulnerabilities added by the merge request. Vulnerabilities that aren't new, and existed in the code before the merge request was created, will not be included in the report. In order to include all the vulnerabilities in the report, including older ones that weren't added by this merge request, use the includeAllVulnerabilities parameter in the frogbot-config.yml file. The Frogbot GitLab flow is as follows: diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-repositories/README.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/README.md similarity index 87% rename from jfrog-applications/jfrog-applications/frogbot/scan-repositories/README.md rename to jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/README.md index 576a4fc..b226cc3 100644 --- a/jfrog-applications/jfrog-applications/frogbot/scan-repositories/README.md +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/README.md @@ -2,8 +2,6 @@ Frogbot scans your Git repositories periodically and automatically creates pull requests for upgrading vulnerable dependencies to a version with a fix. -![](../../../.gitbook/assets/fix-pr.png) +![](../../../../.gitbook/assets/fix-pr.png) _**NOTE:**_ The pull request fix is presently unavailable for older NuGet projects that use the package.config file instead of the PackageReference syntax. - -#### diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/view-security-alerts-on-github.md b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/view-security-alerts-on-github.md new file mode 100644 index 0000000..5fb828a --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/scan-execution/scan-repositories/view-security-alerts-on-github.md @@ -0,0 +1,29 @@ +# View Security Alerts on GitHub + +For GitHub repositories, issues that are found during Frogbot's repository scans are also added to the [Security Alerts](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository) view in the UI. + +![](../../../../.gitbook/assets/github-code-scanning.png) + +The following alert types are supported: + +**1. CVEs on vulnerable dependencies** + +![](../../../../.gitbook/assets/github-code-scanning-content.png) + +**2. Secrets that are exposed in the code** + +![](../../../../.gitbook/assets/github-code-scanning-secrets-content.png) + +**3. Infrastructure as Code (Iac) issues on Terraform packages** + +![](../../../../.gitbook/assets/github-code-scanning-iac-content.png) + +**4. Static Application Security Testing (Sast) vulnerabilities** + +![](../../../../.gitbook/assets/github-code-scanning-sast-content.png) + +**5. Validate Allowed Licenses** + +When Frogbot scans the repository periodically, it checks the licenses of any project dependencies. If Frogbot identifies licenses that are not listed in a predefined set of approved licenses, it adds an alert. The list of allowed licenses is set up as a variable within the Frogbot workflow. + +![](../../../../.gitbook/assets/github-code-scanning-license-violation-content.png) diff --git a/jfrog-applications/jfrog-applications/frogbot/scan-repositories/view-security-alerts-on-github.md b/jfrog-applications/jfrog-applications/frogbot/scan-repositories/view-security-alerts-on-github.md deleted file mode 100644 index 115597f..0000000 --- a/jfrog-applications/jfrog-applications/frogbot/scan-repositories/view-security-alerts-on-github.md +++ /dev/null @@ -1,29 +0,0 @@ -# View Security Alerts on Github - -For GitHub repositories, issues that are found during Frogbot's periodic scans are also added to the [Security Alerts](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository) view in the UI. - -![](../../../.gitbook/assets/github-code-scanning.png) - -The following alert types are supported: - -**1. CVEs on vulnerable dependencies** - -![](../../../.gitbook/assets/github-code-scanning-content.png) - -**2. Secrets that are exposed in the code** - -![](../../../.gitbook/assets/github-code-scanning-secrets-content.png) - -**3. Infrastructure as Code (Iac) issues on Terraform packages** - -![](../../../.gitbook/assets/github-code-scanning-iac-content.png) - -**4. Static Application Security Testing (Sast) vulnerabilities** - -![](../../../.gitbook/assets/github-code-scanning-sast-content.png) - -**5. Validate Allowed Licenses** - -When Frogbot scans the repository periodically, it checks the licenses of any project dependencies. If Frogbot identifies licenses that are not listed in a predefined set of approved licenses, it adds an alert. The list of allowed licenses is set up as a variable within the Frogbot workflow. - -![](../../../.gitbook/assets/github-code-scanning-license-violation-content.png) diff --git a/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/README.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/README.md new file mode 100644 index 0000000..11fc275 --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/README.md @@ -0,0 +1,202 @@ +--- +description: Install Frogbot on GitHub using GitHub Actions +--- + +# Setup Frogbot Using GitHub Actions + +## Prepare GitHub to work with Frogbot + +Perform the following steps to allow GitHub and Frogbot to work together: + +### Step 1: Provide connection details + +
+ +Set Frogbot's connection details as GitHub secrets + +Go to your repository's **settings** tab and save the JFrog connection details as repository secrets with the following names: + +1. **JF\_URL** (JFrog Platform URL)\ + Example: `https://acme.jfrog.io`\ + You can also use **JF\_XRAY\_URL** and **JF\_ARTIFACTORY\_URL** instead of **JF\_URL.** +2. **JF\_ACCESS\_TOKEN** (JFrog access token)\ + You can also use **JF\_USER** + **JF\_PASSWORD** instead of **JF\_ACCESS\_TOKEN**.\ + Instead of using **JF\_ACCESS\_TOKEN** and providing an access token as a GitHub secret, you can utilize the [GitHub OpenID Connect (OIDC)](oidc-authentication.md) authentication protocol. +3. **JF\_GIT\_TOKEN** (GitHub token)\ + You can utilize [$\{{secrets.GITHUB\_TOKEN\}}](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) for **JF\_GIT\_TOKEN**, which is an automatically generated token by GitHub. However, this option comes with a limitation: a workflow, such as Frogbot itself, cannot trigger another workflow. Consequently, if you have additional workflows intended to activate upon the creation of a new pull request, they might not be initiated. To resolve this issue, you can generate a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) and use it as JF\_GIT\_TOKEN. + + + +
+ +### Step 2: Allow Frogbot to open Pull Requests + +
+ +Allow Pull Requests + +Under **Actions** > **General**, check the **Allow GitHub Actions to create and approve pull requests** check box. + + + +
+ +### Step 3: Create execution Environment (open source projects only) + +
+ +Create a dedicated execution environment for Frogbot + +Create a new [GitHub environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment) called **frogbot** and add people or public teams as reviewers. \ +The chosen reviewers can trigger Frogbot scans on pull requests. + +![](<../../../../.gitbook/assets/image (1).png>) + +
+ +## Create the required GitHub Actions templates + +### Step 1: Navigate to the project you wish to scan + +Clone the GitHub repository you wish to scan to your local environment: + +```shell-session +> git clone +> cd +``` + +Switch to the branch you'd like to scan with Frogbot: + +```shell-session +> git checkout +``` + +### Step 2: Set up Repository Scan + +In the branch you'd like to scan, create a file named `frogbot-scan-repository.yml`. Fill it with the provided [template](./#basic-frogbot-scan-repository.yml-template) and push it into the `.github/workflows` directory at the root of your GitHub repository.\ +You can see more advanced options in the [full scan repository template](scan-git-repository-full-template.md). + +
+ +frogbot-scan-repository.yml template + +```yaml +name: "Frogbot Scan Repository" +on: + workflow_dispatch: + schedule: + # The repository will be scanned once a day at 00:00 GMT. + - cron: "0 0 * * *" +permissions: + contents: write + pull-requests: write + security-events: write + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write +jobs: + scan-repository: + runs-on: ubuntu-latest + strategy: + matrix: + # The repository scanning will be triggered periodically on the following branches. + branch: ["dev"] + steps: + - uses: jfrog/frogbot@v2 + env: + # [Mandatory] + # JFrog platform URL + JF_URL: ${{ secrets.JF_URL }} + + # [Mandatory if JF_USER and JF_PASSWORD are not provided] + # JFrog access token with 'read' permissions on Xray service + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD + # JF_USER: ${{ secrets.JF_USER }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog password. Must be provided with JF_USER + # JF_PASSWORD: ${{ secrets.JF_PASSWORD }} + + # [Mandatory] + # The GitHub token is automatically generated for the job + JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # [Mandatory] + # The name of the branch on which Frogbot will perform the scan + JF_GIT_BASE_BRANCH: ${{ matrix.branch }} + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" +``` + +
+ +### Step 3: Set up Pull Request Scan + +Create a file named `frogbot-scan-pull-request.yml`. Fill it with the provided [template](./#basic-frogbot-scan-pull-request.yml-template), and then push it into the `.github/workflows` directory at the root of your GitHub repository.\ +You can see more advanced options in the [full scan pull request template](scan-pull-request-full-template.md). + +
+ +frogbot-scan-pull-request.yml template + +{% code fullWidth="true" %} +```yaml +name: "Frogbot Scan Repository" +on: + workflow_dispatch: + schedule: + # The repository will be scanned once a day at 00:00 GMT. + - cron: "0 0 * * *" +permissions: + contents: write + pull-requests: write + security-events: write + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write +jobs: + scan-repository: + runs-on: ubuntu-latest + strategy: + matrix: + # The repository scanning will be triggered periodically on the following branches. + branch: ["dev"] + steps: + - uses: jfrog/frogbot@v2 + env: + # [Mandatory] + # JFrog platform URL + JF_URL: ${{ secrets.JF_URL }} + + # [Mandatory if JF_USER and JF_PASSWORD are not provided] + # JFrog access token with 'read' permissions on Xray service + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD + # JF_USER: ${{ secrets.JF_USER }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog password. Must be provided with JF_USER + # JF_PASSWORD: ${{ secrets.JF_PASSWORD }} + + # [Mandatory] + # The GitHub token is automatically generated for the job + JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # [Mandatory] + # The name of the branch on which Frogbot will perform the scan + JF_GIT_BASE_BRANCH: ${{ matrix.branch }} + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" +``` +{% endcode %} + +
diff --git a/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/oidc-authentication.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/oidc-authentication.md new file mode 100644 index 0000000..0620780 --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/oidc-authentication.md @@ -0,0 +1,66 @@ +--- +description: Authenticating using OpenID Connect (OIDC) +--- + +# OIDC Authentication + +## **General** + +The sensitive connection details, such as the access token used by JFrog Frogbot, can be automatically generated by the action instead of storing it as a secret in GitHub. This is made possible by leveraging the OpenID-Connect (OIDC) protocol. This protocol can authenticate the workflow issuer and supply a valid access token. Learn more about this integration in [this](https://jfrog.com/blog/secure-access-development-jfrog-github-oidc) blog post. To utilize the OIDC protocol, follow these steps: + +## **JFrog Platform configuration** + +1. **Configure an OIDC Integration**: This phase sets an integration between GitHub Actions to the JFrog platform. + 1. Navigate to the Administration tab In the JFrog Platform UI + 2. Click `General` | `Manage Integrations` + 3. Click `New Integration` | `OpenID Connect`:\ + ![](../../../../.gitbook/assets/oidc-new-integration.png) + 4. Configure the OIDC integration:\ + ![](../../../../.gitbook/assets/oidc-configure-integration.png) + +{% hint style="info" %} +The 'Provider Name' value should be used as the 'oidc-provider-name' input in Workflow Configuration step 2 below. + +The 'Audience' field does NOT represent the 'aud' claim that can be added to identity-mapping configured in the 'Claims JSON' (shown below). Only claims that are included in the 'Claims Json' created during step 2 will be validated. +{% endhint %} + +2. **Configure an identity mapping**: This phase sets an integration between a particular GitHub repository to the JFrog platform. + + An identity mapping is a configuration object utilized by the JFrog Platform to associate incoming OIDC claims with particular selected fields. These fields might include `repository`, `actor`, `workflow`, and others. To configure the identity mapping, click on the identity mapping created in section 1 and then click on `Add Identity Mapping`. In the 'priority' field insert the value '1' and fill in the rest of the required fields:\ + ![](../../../../.gitbook/assets/oidc-identity-mapping.png) + + You have the flexibility to define any valid list of claims required for request authentication. You can check a list of the possible claims [here](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token). Example Claims JSON: + + ```json + { + "repository": "repository-owner/my-repository" + } + ``` + +## Workflow configuration + +1. **Set required permissions**: In the course of the protocol's execution, it's imperative to acquire a JSON Web Token (JWT) from GitHub's OIDC provider. To request this token, it's essential to configure the specified permission in the workflow file: + + ```yml + permissions: + id-token: write + ``` +2. **Pass the 'oidc-provider-name' input to the Action (Required)**: The 'oidc-provider-name' parameter designates the OIDC configuration whose one of its identity mapping should align with the generated JWT claims. This input needs to align with the 'Provider Name' value established within the OIDC configuration in the JFrog Platform. +3. **Pass the 'oidc-audience' input to the Action (Optional)**: The 'oidc-audience' input defines the intended recipients of an ID token (JWT), ensuring access is restricted to authorized recipients for the JFrog Platform. By default, it contains the URL of the GitHub repository owner. It enforces a condition, allowing only workflows within the designated repository/organization to request an access token. Read more about it [here](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect#customizing-the-audience-value). + +## Example for OpenID Connect Usage + +``` +- uses: jfrog/frogbot@v2 + env: + JF_URL: ${{ vars.JF_URL }} + JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + oidc-provider-name: frogbot-integration +``` + +## **Troubleshooting** + +### Scan failures due to token expiration + +When using OIDC integration, you might encounter failures in Xray scans or JFrog Advanced Security scans due to token expiration. If this occurs, try extending the 'Token Expiration Time' in the 'Identity Mapping Configuration' phase to ensure the token remains valid until all scanners are triggered, which may vary depending on the project's size. diff --git a/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-git-repository-full-template.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-git-repository-full-template.md new file mode 100644 index 0000000..c009623 --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-git-repository-full-template.md @@ -0,0 +1,155 @@ +# Scan Git Repository Full Template + +Here you can find the full template for Frogbot repository scan workflow: + +```yaml +name: "Frogbot Scan Repository" +on: + workflow_dispatch: + schedule: + # The repository will be scanned once a day at 00:00 GMT. + - cron: "0 0 * * *" +permissions: + contents: write + pull-requests: write + security-events: write + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write +jobs: + scan-repository: + runs-on: ubuntu-latest + strategy: + matrix: + # The repository scanning will be triggered periodically on the following branches. + branch: ["dev"] + steps: + - uses: jfrog/frogbot@v2 + env: + # [Mandatory] + # JFrog platform URL + JF_URL: ${{ secrets.JF_URL }} + + # [Mandatory if JF_USER and JF_PASSWORD are not provided] + # JFrog access token with 'read' permissions on Xray service + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD + # JF_USER: ${{ secrets.JF_USER }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog password. Must be provided with JF_USER + # JF_PASSWORD: ${{ secrets.JF_PASSWORD }} + + # [Mandatory] + # The GitHub token is automatically generated for the job + JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # [Mandatory] + # The name of the branch on which Frogbot will perform the scan + JF_GIT_BASE_BRANCH: ${{ matrix.branch }} + + # [Optional, default: https://api.github.com] + # API endpoint to GitHub + # JF_GIT_API_ENDPOINT: https://github.example.com + + # [Optional] + # By default, the Frogbot workflows download the Frogbot executable as well as other tools + # needed from https://releases.jfrog.io + # If the machine that runs Frogbot has no access to the internet, follow these steps to allow the + # executable to be downloaded from an Artifactory instance, which the machine has access to: + # + # 1. Login to the Artifactory UI, with a user who has admin credentials. + # 2. Create a Remote Repository with the following properties set. + # Under the 'Basic' tab: + # Package Type: Generic + # URL: https://releases.jfrog.io + # Under the 'Advanced' tab: + # Uncheck the 'Store Artifacts Locally' option + # 3. Set the value of the 'JF_RELEASES_REPO' variable with the Repository Key you created. + # JF_RELEASES_REPO: "" + + ########################################################################## + ## If your project uses a 'frogbot-config.yml' file, you can define ## + ## the following variables inside the file, instead of here. ## + ########################################################################## + + # [Optional, default: "."] + # Relative path to the root of the project in the Git repository. If left empty (without providing "." yourself as default), a recursive scan is triggered from the root directory of the project. + # JF_WORKING_DIR: path/to/project/dir + + # [Default: "*git*;*node_modules*;*target*;*venv*;*test*"] + # List of exclusion patterns (utilizing wildcards) for excluding paths in the source code of the Git repository during SCA scans. + # JF_PATH_EXCLUSIONS: "*git*;*node_modules*;*target*;*venv*;*test*" + + # [Optional] + # Xray Watches. Learn more about them here: https://www.jfrog.com/confluence/display/JFROG/Configuring+Xray+Watches + # JF_WATCHES: ,... + + # [Optional] + # JFrog project. Learn more about it here: https://www.jfrog.com/confluence/display/JFROG/Projects + # JF_PROJECT: + + # [Optional, default: "TRUE"] + # Fails the Frogbot task if any security issue is found. + # JF_FAIL: "FALSE" + + # [Optional] + # Frogbot will download the project dependencies, if they're not cached locally. To download the + # dependencies from a virtual repository in Artifactory, set the name of the repository. There's no + # need to set this value, if it is set in the frogbot-config.yml file. + # JF_DEPS_REPO: "" + + # [Optional] + # Template for the branch name generated by Frogbot when creating pull requests with fixes. + # The template must include {BRANCH_NAME_HASH}, to ensure that the generated branch name is unique. + # The template can optionally include the {IMPACTED_PACKAGE} and {FIX_VERSION} variables. + # JF_BRANCH_NAME_TEMPLATE: "frogbot-{IMPACTED_PACKAGE}-{BRANCH_NAME_HASH}" + + # [Optional] + # Template for the commit message generated by Frogbot when creating pull requests with fixes + # The template can optionally include the {IMPACTED_PACKAGE} and {FIX_VERSION} variables. + # JF_COMMIT_MESSAGE_TEMPLATE: "Upgrade {IMPACTED_PACKAGE} to {FIX_VERSION}" + + # [Optional] + # Template for the pull request title generated by Frogbot when creating pull requests with fixes. + # The template can optionally include the {IMPACTED_PACKAGE} and {FIX_VERSION} variables. + # JF_PULL_REQUEST_TITLE_TEMPLATE: "[🐸 Frogbot] Upgrade {IMPACTED_PACKAGE} to {FIX_VERSION}" + + # [Optional, Default: "FALSE"] + # If TRUE, Frogbot creates a single pull request with all the fixes. + # If FALSE, Frogbot creates a separate pull request for each fix. + # JF_GIT_AGGREGATE_FIXES: "FALSE" + + # [Optional, Default: "FALSE"] + # Handle vulnerabilities with fix versions only + # JF_FIXABLE_ONLY: "TRUE" + + # [Optional] + # Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests + # The following values are accepted: Low, Medium, High or Critical + # JF_MIN_SEVERITY: "" + + # [Optional, Default: eco-system+frogbot@jfrog.com] + # Set the email of the commit author + # JF_GIT_EMAIL_AUTHOR: "" + + # [Optional] + # Set the list of allowed licenses + # The full list of licenses can be found in: + # https://github.com/jfrog/frogbot/blob/master/docs/licenses.md + # JF_ALLOWED_LICENSES: "MIT, Apache-2.0" + + # [Optional] + # Avoid adding extra info to pull request comments. that isn't related to the scan findings. + # JF_AVOID_EXTRA_MESSAGES: "TRUE" + + # [Optional] + # Add a title to pull request comments generated by Frogbot. + # JF_PR_COMMENT_TITLE: "" + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" +``` diff --git a/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-pull-request-full-template.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-pull-request-full-template.md new file mode 100644 index 0000000..d6669b1 --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-github-actions/scan-pull-request-full-template.md @@ -0,0 +1,161 @@ +# Scan Pull Request Full Template + +Here you can find the full template for Frogbot pull request scan workflow: + +```yaml +name: "Frogbot Scan Pull Request" +on: + pull_request_target: + types: [opened, synchronize] +permissions: + pull-requests: write + contents: read + # [Mandatory If using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # id-token: write +jobs: + scan-pull-request: + runs-on: ubuntu-latest + # A pull request needs to be approved before Frogbot scans it. Any GitHub user who is associated with the + # "frogbot" GitHub environment can approve the pull request to be scanned. + environment: frogbot + steps: + - uses: jfrog/frogbot@v2 + env: + # [Mandatory] + # JFrog platform URL + JF_URL: ${{ secrets.JF_URL }} + + # [Mandatory if JF_USER and JF_PASSWORD are not provided] + # JFrog access token with 'read' permissions on Xray service + JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog username with 'read' permissions for Xray. Must be provided with JF_PASSWORD + # JF_USER: ${{ secrets.JF_USER }} + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog password. Must be provided with JF_USER + # JF_PASSWORD: ${{ secrets.JF_PASSWORD }} + + # [Mandatory] + # The GitHub token is automatically generated for the job + JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # [Optional, default: https://api.github.com] + # API endpoint to GitHub + # JF_GIT_API_ENDPOINT: https://github.example.com + + # [Optional] + # By default, the Frogbot workflows download the Frogbot executable as well as other tools + # needed from https://releases.jfrog.io + # If the machine that runs Frogbot has no access to the internet, follow these steps to allow the + # executable to be downloaded from an Artifactory instance, which the machine has access to: + # + # 1. Login to the Artifactory UI, with a user who has admin credentials. + # 2. Create a Remote Repository with the following properties set. + # Under the 'Basic' tab: + # Package Type: Generic + # URL: https://releases.jfrog.io + # Under the 'Advanced' tab: + # Uncheck the 'Store Artifacts Locally' option + # 3. Set the value of the 'JF_RELEASES_REPO' variable with the Repository Key you created. + # JF_RELEASES_REPO: "" + + # [Optional] + # Configure the SMTP server to enable Frogbot to send emails with detected secrets in pull request scans. + # SMTP server URL including should the relevant port: (Example: smtp.server.com:8080) + # JF_SMTP_SERVER: "" + + # [Mandatory if JF_SMTP_SERVER is set] + # The username required for authenticating with the SMTP server. + # JF_SMTP_USER: "" + + # [Mandatory if JF_SMTP_SERVER is set] + # The password associated with the username required for authentication with the SMTP server. + # JF_SMTP_PASSWORD: "" + + ########################################################################## + ## If your project uses a 'frogbot-config.yml' file, you can define ## + ## the following variables inside the file, instead of here. ## + ########################################################################## + + # [Mandatory if the two conditions below are met] + # 1. The project uses yarn 2, NuGet or .NET Core to download its dependencies + # 2. The `installCommand` variable isn't set in your frogbot-config.yml file. + # + # The command that installs the project dependencies (e.g "nuget restore") + # JF_INSTALL_DEPS_CMD: "" + + # [Optional, default: "."] + # Relative path to the root of the project in the Git repository. If left empty (without providing "." yourself as default), a recursive scan is triggered from the root directory of the project. + # JF_WORKING_DIR: path/to/project/dir + + # [Default: "*git*;*node_modules*;*target*;*venv*;*test*"] + # List of exclusion patterns (utilizing wildcards) for excluding paths in the source code of the Git repository during SCA scans. + # JF_PATH_EXCLUSIONS: "*git*;*node_modules*;*target*;*venv*;*test*" + + # [Optional] + # Xray Watches. Learn more about them here: https://www.jfrog.com/confluence/display/JFROG/Configuring+Xray+Watches + # JF_WATCHES: ,... + + # [Optional] + # JFrog project. Learn more about it here: https://www.jfrog.com/confluence/display/JFROG/Projects + # JF_PROJECT: + + # [Optional, default: "FALSE"] + # Displays all existing vulnerabilities, including the ones that were added by the pull request. + # JF_INCLUDE_ALL_VULNERABILITIES: "TRUE" + + # [Optional, default: "FALSE"] + # When adding new comments on pull requests, keep old comments that were added by previous scans. + # JF_AVOID_PREVIOUS_PR_COMMENTS_DELETION: "TRUE" + + # [Optional, default: "TRUE"] + # Fails the Frogbot task if any security issue is found. + # JF_FAIL: "FALSE" + + # [Optional] + # Frogbot will download the project dependencies if they're not cached locally. To download the + # dependencies from a virtual repository in Artifactory, set the name of the repository. There's no + # need to set this value, if it is set in the frogbot-config.yml file. + # JF_DEPS_REPO: "" + + # [Optional, Default: "FALSE"] + # If TRUE, Frogbot creates a single pull request with all the fixes. + # If false, Frogbot creates a separate pull request for each fix. + # JF_GIT_AGGREGATE_FIXES: "FALSE" + + # [Optional, Default: "FALSE"] + # Handle vulnerabilities with fix versions only + # JF_FIXABLE_ONLY: "TRUE" + + # [Optional] + # Set the minimum severity for vulnerabilities that should be fixed and commented on in pull requests + # The following values are accepted: Low, Medium, High or Critical + # JF_MIN_SEVERITY: "" + + # [Optional] + # List of comma-separated(,) email addresses to receive email notifications about secrets + # detected during pull request scanning. The notification is also sent to the email set + # in the committer git profile regardless of whether this variable is set or not. + # JF_EMAIL_RECEIVERS: "" + + # [Optional] + # Set the list of allowed licenses + # The full list of licenses can be found in: + # https://github.com/jfrog/frogbot/blob/master/docs/licenses.md + # JF_ALLOWED_LICENSES: "MIT, Apache-2.0" + + # [Optional] + # Avoid adding extra info to pull request comments. that isn't related to the scan findings. + # JF_AVOID_EXTRA_MESSAGES: "TRUE" + + # [Optional] + # Add a title to pull request comments generated by Frogbot. + # JF_PR_COMMENT_TITLE: "" + + # [Mandatory if using OIDC authentication protocol instead of JF_ACCESS_TOKEN] + # Insert to oidc-provider-name the 'Provider Name' defined in the OIDC integration configured in the JPD + # with: + # oidc-provider-name: "" +``` diff --git a/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/README.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/README.md new file mode 100644 index 0000000..9d932fa --- /dev/null +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/README.md @@ -0,0 +1,91 @@ +--- +description: Install Frogbot on GitLab repositories using GitLab CI +--- + +# Setup Frogbot Using GitLab CI + +## Prepare GitLab to work with Frogbot + +1. Make sure you have the connection details of your JFrog environment. +2. Go to your GitLab repository settings page and save the JFrog connection details as repository secrets with the following names - **JF\_URL**, **JF\_USER**, and **JF\_PASSWORD.** + +> _**NOTE:**_ +> +> * You can use **JF\_XRAY\_URL** and **JF\_ARTIFACTORY\_URL** instead of **JF\_URL**. +> * You can use **JF\_ACCESS\_TOKEN** instead of **JF\_USER** and **JF\_PASSWORD**. +> * Ensure not set these tokens as **protected** in Gitlab. + +3. Add a job named **frogbot-scan** to your `.gitlab-ci.yml` file in your GitLab repository. Use the following for execution: + +
+ +Frogbot template to scan Repository and Pull Request + +```yml +frogbot-scan: + rules: + - if: $CI_PIPELINE_SOURCE == 'merge_request_event' + when: manual + variables: + FROGBOT_CMD: "scan-pull-request" + JF_GIT_BASE_BRANCH: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME + # Repository scanning is triggered by any push to the default branch. + # If you'd like a different branch to be scanned, replace $CI_DEFAULT_BRANCH in the line below with the name of the branch, wrapped with quotes ("). + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_PIPELINE_SOURCE == "schedule" + variables: + FROGBOT_CMD: "scan-repository" + JF_GIT_BASE_BRANCH: $CI_COMMIT_BRANCH + variables: + # [Mandatory] + # JFrog platform URL (This functionality requires version 3.29.0 or above of Xray) + JF_URL: $JF_URL + + # [Mandatory if JF_USER and JF_PASSWORD are not provided] + # JFrog access token with 'read' permissions for Xray + JF_ACCESS_TOKEN: $JF_ACCESS_TOKEN + + # [Mandatory if JF_ACCESS_TOKEN is not provided] + # JFrog user and password with 'read' permissions for Xray + # JF_USER: $JF_USER + # JF_PASSWORD: $JF_PASSWORD + + # [Mandatory] + # GitLab access token. Ensure the token has the following permissions, depedending on your GiLab deployment type: + # Self hosted: api, read_api, read_user, read_repository. + # Cloud: api, read_api, read_repository + JF_GIT_TOKEN: $USER_TOKEN + + # Predefined GitLab variables. There's no need to set them. + JF_GIT_PROVIDER: gitlab + JF_GIT_OWNER: $CI_PROJECT_NAMESPACE + JF_GIT_REPO: $CI_PROJECT_NAME + JF_GIT_PULL_REQUEST_ID: $CI_MERGE_REQUEST_IID + + # [Mandatory if the two conditions below are met] + # 1. The project uses yarn 2, NuGet, or .NET to download its dependencies + # 2. The `installCommand` variable isn't set in your frogbot-config.yml file. + # + # The command that installs the project dependencies (e.g "nuget restore") + JF_INSTALL_DEPS_CMD: "" + + script: + # For Linux / MacOS runner: + - | + getFrogbotScriptPath=$(if [ -z "$JF_RELEASES_REPO" ]; then echo "https://releases.jfrog.io"; else echo "${JF_URL}/artifactory/${JF_RELEASES_REPO}"; fi) + curl -fLg "$getFrogbotScriptPath/artifactory/frogbot/v2/[RELEASE]/getFrogbot.sh" | sh + ./frogbot ${FROGBOT_CMD} + + # For Windows runner: + # + # - $getFrogbotScriptPath = $(if ([string]::IsNullOrEmpty($env:JF_RELEASES_REPO)) { "https://releases.jfrog.io" } else { "$($env:JF_URL)/artifactory/$($env:JF_RELEASES_REPO)" }) + # - Invoke-WebRequest -Uri "$getFrogbotScriptPath/artifactory/frogbot/v2/[RELEASE]/getFrogbot.sh" -UseBasicParsing | ForEach-Object { & $_.Content } + # - .\frogbot ${FROGBOT_CMD} +``` + +
+ +{% hint style="info" %} +In the `gitlab-ci.yml` file, Make sure that either **JF\_USER** and **JF\_PASSWORD** or **JF\_ACCESS\_TOKEN** are set, **but not both**. + +For more advanced configuration, use [GitLab full template](gitlab-full-template.md) to see all available options. +{% endhint %} diff --git a/jfrog-applications/frogbot/setup-frogbot-using-gitlab-ci.md b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/gitlab-full-template.md similarity index 90% rename from jfrog-applications/frogbot/setup-frogbot-using-gitlab-ci.md rename to jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/gitlab-full-template.md index 11cc15f..eb60253 100644 --- a/jfrog-applications/frogbot/setup-frogbot-using-gitlab-ci.md +++ b/jfrog-applications/jfrog-applications/frogbot/setup-frogbot/setup-frogbot-using-gitlab-ci/gitlab-full-template.md @@ -1,22 +1,8 @@ -# Setup Frogbot Using GitLab CI +# GitLab Full Template -To install Frogbot on GitLab repositories using GitLab CI: +Here you can find the full template for Frogbot: -1. Make sure you have the connection details of your JFrog environment. -2. Go to your GitLab repository settings page and save the JFrog connection details as repository secrets with the following names - **JF\_URL**, **JF\_USER**, and **JF\_PASSWORD** - -> _**NOTE:**_ -> * You can use **JF\_XRAY\_URL** and **JF\_ARTIFACTORY\_URL** instead of **JF\_URL**. -> * You can use **JF\_ACCESS\_TOKEN** instead of **JF\_USER** and **JF\_PASSWORD**. -> * Ensure not set these tokens as **protected** in Gitlab. - -3. Add a job named **frogbot-scan** to your **.gitlab-ci.yml** file in your GitLab repository using the code block below. - -**Important** - -* Make sure that either **JF\_USER** and **JF\_PASSWORD** or **JF\_ACCESS\_TOKEN** are set, **but not both**. - -```yml +```yaml frogbot-scan: rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' @@ -178,7 +164,7 @@ frogbot-scan: # JF_GIT_EMAIL_AUTHOR: "" # [Optional] - # List of comma separated email addresses to receive email notifications about secrets + # List of comma-separated(,) email addresses to receive email notifications about secrets # detected during pull request scanning. The notification is also sent to the email set # in the committer git profile regardless of whether this variable is set or not. # JF_EMAIL_RECEIVERS: "" diff --git a/jfrog-applications/jfrog-applications/frogbot/supported-technologies.md b/jfrog-applications/jfrog-applications/frogbot/supported-technologies.md index bf67427..d3a74a7 100644 --- a/jfrog-applications/jfrog-applications/frogbot/supported-technologies.md +++ b/jfrog-applications/jfrog-applications/frogbot/supported-technologies.md @@ -1,3 +1,3 @@ # Supported Technologies -
FeatureGoMavennpmYarn v1-v3PipPipenvPoetry.NET CLINuGetTerraformGradlePnpm
SCA
Contextual AnalysisComing SoonComing SoonComing Soon
Secrets Detection
SASTBetaRoadmapRoadmap
Infrastructure as Code (IaC)
PR Scan
Monitor Scan
Autofix with new PR for direct dep.
License Violations
+
FeatureGoMavennpmYarn v1-v3PipPipenvPoetry.NET CLINuGetTerraformGradlePnpm
SCA
Contextual AnalysisComing SoonComing Soon
Secrets Detection
SASTRoadmapRoadmap
Infrastructure as Code (IaC)
PR Scan
Monitor Scan
Autofix with new PR for direct dep.
License Violations
diff --git a/jfrog-applications/jfrog-applications/ide/visual-studio-code/supported-technologies.md b/jfrog-applications/jfrog-applications/ide/visual-studio-code/supported-technologies.md index 916afa6..c49c271 100644 --- a/jfrog-applications/jfrog-applications/ide/visual-studio-code/supported-technologies.md +++ b/jfrog-applications/jfrog-applications/ide/visual-studio-code/supported-technologies.md @@ -14,4 +14,4 @@ layout: # Supported Technologies -
FeatureGoMavennpmpnpmYarnPipPipenvPoetry.NET CLINuGetTerraform
SCA
Contextual Analysis
Secrets Detection
SAST
Exclude dev dependencies
Infrastructure as Code (IaC)
Autofix for direct dep.
License Violations
+
FeatureGoMavennpmpnpmYarnPipPipenvPoetry.NET CLINuGetTerraform
SCA
Contextual Analysis
Secrets Detection
SAST
Exclude dev dependencies
Infrastructure as Code (IaC)
Autofix for direct dep.
License Violations
diff --git a/jfrog-applications/jfrog-applications/jfrog-cli/cli-for-jfrog-security/count-contributing-developers.md b/jfrog-applications/jfrog-applications/jfrog-cli/cli-for-jfrog-security/count-contributing-developers.md new file mode 100644 index 0000000..182ea6c --- /dev/null +++ b/jfrog-applications/jfrog-applications/jfrog-cli/cli-for-jfrog-security/count-contributing-developers.md @@ -0,0 +1,221 @@ +# Count Contributing Developers + +{% hint style="info" %} +This feature is supported in JFrog CLI version 2.60.0 +{% endhint %} + +The `git count-contributors` command allows JFrog users to easily determine the number of Git developers contributing to their code. The counts indicate the number of contributing developers to the **default branch**. + +The command counts the contributing developers for all commits performed within a specified time range. The results are based on email addresses, thus giving you a specific number of unique developers. + +We provide several options to obtain the developer count: + +* **A single repository**: Analyze a single Git repository by providing the repository name. +* **Across a project/group**: Analyze multiple repositories organized under a project/group by providing the owner command option. +* **Across multiple Git servers**: Analyze repositories across various Git servers by providing a YAML file as an input file with the required parameters outlined below. + +This information can be helpful when purchasing an Advanced Security subscription, as the number of developers is often a key factor in pricing. + +Supported Git providers: + +* GitHub +* GitLab +* Bitbucket + +{% hint style="info" %} +The CLI outputs may include an estimation of the contributing developers based on the input provided by the user. They may be based on third-party resources and databases and JFrog does not guarantee that the CLI outputs are accurate and/or complete. The CLI outputs are not legal advice and you are solely responsible for your use of it. CLI outputs are provided "as is" and any representation or warranty of or concerning any third-party technology is strictly between the user and the third-party owner or distributor of the third-party technology. +{% endhint %} + +### Usage + +The `git count-contributors` command can be run from the JFrog CLI with the following syntax: + +``` +git count-contributors [command options] +``` + +| Command Option | Description | +| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| --scm-type |

(optional) The type of SCM to use for the analysis.

Supported Values: github, gitlab, bitbucket Example: --scm-type=github

| +| --scm-api-url |

(optional) The base URL of the SCM system's API endpoint.

Format: The full URL, including the protocol Example: --scm-api-url=https://api.github.com

| +| --token | (optional) The authentication token required to access the SCM system's API. In the absence of a flag, tokens should be passed in the JF\_GIT\_TOKEN environment variable, or the corresponding environment variables 'JFROG\_CLI\_GITLAB\_TOKEN, JFROG\_CLI\_GITHUB\_TOKEN or JFROG\_CLI\_BITBUCKET\_TOKEN' Example: `--token:your_access_token` | +| --owner | (optional) The owner or organization of the repositories to be analyzed. Format: Depending on the Git provider. On GitHub and GitLab, the owner is typically an individual or an organization, On Bitbucket, the owner can also be a project. In the case of a private instance on Bitbucket, the individual or organization name should be prefixed with '\~'. When using this option without a specific repository name, all repositories will be analyzed at the group/project level. Example: `owner=your-organization` | +| --months | (optional) The number of months to analyze for developer activity. Default: `1` Example: `--months=6` | +| --detailed-summary | (optional) Generates a more detailed summary of the contributors. Default: `false` Example: `--detailed-summary=true` | +| --repo-name | (optional) List of semicolon-separated(;) repositories names to analyze, If not provided all repositories related to the provided owner will be analyzed. Example: --repo-name=repo1;repo2 | +| --input-file | (optional) The path to an input file in YAML format that contains multiple git providers. Example: `--input-file="/Users/path/to/file/input.yaml"` | +| --verbose |

(optional)

Enables verbose output, providing more detailed information.

| + +#### Example Commands + +**Single Repository** + +```javascript +git cc --scm-type=github --scm-api-url=https://api.github.com --token= --owner=jfrog --months=4 --detailed-summary=false --repo-name=cli-core +``` + +Required Parameters: + +* \--scm-type +* \--scm-api-url +* \--token +* \--repo-name + +**Group/Project** + +```javascript +git cc --scm-type=gitlab --scm-api-url=https://git.vdoo.io --token= --owner=vdoo --months=3 --detailed-summary +``` + +Required Parameters: + +* \--scm-type +* \--scm-api-url +* \--token +* \--owner + +**Multiple Git Servers- YAML File** + +```javascript +git-servers-list: + - scm-type: bitbucket + scm-api-url: "https://api.bitbucket.url" + token: "token" + owner: "owner" + repositories: + - "repo1" + - "repo2" + - scm-type: gitlab + scm-api-url: "https://api.github.com" + token: "token" + owner: "owner" +``` + +Sample Output: + +
{
+  "total_unique_contributors": 4,	-	        The number of unique developers (dedup)
+  "total_commits": 4,				-	The number of commits examined on the default branch (total)
+  "scanned_repos": [				-	The repositories that were scanned
+    "test-go",
+    "test-cli-core"
+  ],
+  "report_date": "2024-07-22T12:08:04+03:00",	-	The report date
+  "number_of_months": "5",			-	The time range specified
+  "unique_contributors_list": [			-	The evidence of the last seen developer
+    {
+      "email": "dev1@users.noreply.github.com",
+      "name": "`Developer 1",
+      "last_commit": {
+        "repo": "test-cli-core",
+        "date": "2024-02-22T14:21:55Z",
+        "hash": "3463b55aa453fb5dd3d5e7c6ebf45a3e33710e72"
+      }
+    },
+    {
+      "email": "dev2@users.noreply.github.com",
+      "name": "Developer 2",
+      "last_commit": {
+        "repo": "test-go",
+        "date": "2024-03-24T07:56:17Z",
+        "hash": "8b102603458044b434689fc3832e12d30af12d15"
+      }
+    },
+    {
+      "email": "dev3@jfrog.com",
+      "name": "Developer 3",
+      "last_commit": {
+        "repo": "test-cli-core",
+        "date": "2024-02-25T15:15:19Z",
+        "hash": "de88b95a38242b9984877a8e928ceafedb147843"
+      }
+    }
+  ],
+  "detailed_contributors_list": {		-	With verbose; detailed evidence per user
+    "dev2@users.noreply.github.com": [
+      {
+        "repo_path": "test-go",
+        "last_commit": {
+          "date": "2024-03-24T07:56:17Z",
+          "hash": "8b102603458044b434689fc3832e12d30af12d15"
+        }
+      },
+      {
+        "repo_path": "test-cli-core",
+        "last_commit": {
+          "date": "2024-02-25T12:40:40Z",
+          "hash": "0941c5ce1007501c2793efa0e09b0e9531b8d503"
+        }
+      }
+    ],
+    "dev3@jfrog.com": [
+      {
+        "repo_path": "test-cli-core",
+        "last_commit": {
+          "date": "2024-02-25T15:15:19Z",
+          "hash": "de88b95a38242b9984877a8e928ceafedb147843"
+        }
+      }
+    ],
+    "dev1@users.noreply.github.com": [
+      {
+        "repo_path": "test-cli-core",
+        "last_commit": {
+          "date": "2024-02-22T14:21:55Z",
+          "hash": "3463b55aa453fb5dd3d5e7c6ebf45a3e33710e72"
+        }
+      }
+    ]
+  },
+  "detailed_repos_list": { -	With verbose; detailed evidence per repo
+    "test-go": [
+      {
+        "email": "dev2@users.noreply.github.com",
+        "last_commit": {
+          "date": "2024-03-24T07:56:17Z",
+          "hash": "8b102603458044b434689fc3832e12d30af12d15"
+        }
+      }
+    ],
+    "test-cli-core": [
+      {
+        "email": "dev3@jfrog.com",
+        "last_commit": {
+          "date": "2024-02-25T15:15:19Z",
+          "hash": "de88b95a38242b9984877a8e928ceafedb147843"
+        }
+      },
+      {
+        "email": "dev2@users.noreply.github.com",
+        "last_commit": {
+          "date": "2024-02-25T12:40:40Z",
+          "hash": "0941c5ce1007501c2793efa0e09b0e9531b8d503"
+        }
+      },
+      {
+        "email": "dev1@users.noreply.github.com",
+        "last_commit": {
+          "date": "2024-02-22T14:21:55Z",
+          "hash": "3463b55aa453fb5dd3d5e7c6ebf45a3e33710e72"
+        }
+      }
+    ]
+  }
+}
+
+ +[^1]: + +[^2]: + +[^3]: + +[^4]: + +[^5]: + +[^6]: + +[^7]: + +[^8]: diff --git a/jfrog-applications/jfrog-cli/cli-command-summaries.md b/jfrog-applications/jfrog-cli/cli-command-summaries.md new file mode 100644 index 0000000..69331cf --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-command-summaries.md @@ -0,0 +1,144 @@ +# CLI Command Summaries + +## Overview + +The **Command Summaries** feature enables the recording of JFrog CLI command outputs into the local file system. +This functionality can be used to generate a summary in the context of an entire workflow +(a sequence of JFrog CLI commands) and not only in the scope of a specific command. + +An instance of how **Command Summaries** are utilized can be observed in the [setup-cli GitHub action](https://github.com/jfrog/setup-jfrog-cli/blob/master/README.md#JFrog-Job-Summary). +This action employs the compiled markdown to generate a comprehensive summary of the entire workflow. + +### Currently supported commands: +`jf rt build-publish` + +![rt-upload-summary-example](../.gitbook/assets/build-info-summary.png) + +`jf rt upload` + +![rt-upload-summary-example](../.gitbook/assets/rt-upload-summary.png) + +`jf scan ` + +![jf-scan-example](../.gitbook/assets/jf-scan-summary.png) + + +`jf build-scan ` + +![jf-scan-example](../.gitbook/assets/jf-build-scan-summary.png) + + +## Notes for Developers + +Each command execution that incorporates this feature can save data files into the file system. +These files are then used to create an aggregated summary in Markdown format. + +Saving data to the filesystem is essential because CLI command executes in separate contexts. +Consequently, each command that records new data should also incorporate any existing data into the aggregated markdown. +This is required because the CLI cannot determine when a command will be the last one executed in a sequence of commands. + +### ⚠️ Attention: Files Remain After CLI Execution +The CLI does not automatically remove the files as they are designed to remain beyond a single execution. +As a result, it is your responsibility to you to manage your pipelines and delete files as necessary. +You can clear the entire directory +of `JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR` that you have configured to activate this feature. + + +To use the **Command Summaries**, you'll need to set the `JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR` environment variable. +This variable designates the directory where the data files and markdown files will be stored. + + +### How to Implement? + +If you wish to contribute a new CLI command summary to the existing ones, +you can submit a pull request once you've followed these implementation guidelines: + + +1. Implement the CommandSummaryInterface +2. Record data during runtime + +#### Implement the CommandSummaryInterface + ```go +type CommandSummaryInterface interface { + GenerateMarkdownFromFiles(dataFilePaths []string) (finalMarkdown string, err error) +} + ``` + +#### Record Data During Runtime +```go +// Initialize your implementation +myNewCommandSummary, err := commandsummary.New(&MyCommandStruct{}, "myNewCommandSummary") +if err != nil { + return +} +// Record +return myNewCommandSummary.Record(data) + ``` + +The `GenerateMarkdownFromFiles` function needs to process multiple data files, which are the results of previous command executions, and generate a single markdown string content. As each CLI command has its own context, we need to regenerate the entire markdown with the newly added results each time. + +### Example Implementation + + +```go +// Step 1. Implement the CommandSummaryInterface +type CommandStruct struct{} + +type singleRecordedObject struct { + Name string +} + +func (cs *CommandStruct) GenerateMarkdownFromFiles(dataFilePaths []string) (markdown string, err error) { + // Aggregate all the results into a slice + var recordedObjects []*singleRecordedObject + for _, path := range dataFilePaths { + var singleObject singleRecordedObject + if err = commandsummary.UnmarshalFromFilePath(path, &singleObject); err != nil { + return + } + recordedObjects = append(recordedObjects, &singleObject) + } + + // Create markdown + markdown = results.String() + return +} + +// Step 2. Record data during runtime +func recordCommandSummary(data any) (err error) { + if !commandsummary.ShouldRecordSummary() { + return + } + + commandSummaryImplementation, err := commandsummary.New(&CommandStruct{}, "CommandName") + if err != nil { + return + } + + return commandSummaryImplementation.Record(data) +} + + ``` + +### How Does It Work? + +Each command that implements the `CommandSummaryInterface` will have its own subdirectory inside the `JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR/JFROG_COMMAND_SUMMARY` directory. + +Every subdirectory will house data files, each one corresponding to a command recording, +along with a markdown file that has been created from all the data files. +The function implemented by the user is responsible +for processing all the data files within its respective subdirectory and generating a markdown string. + +``` +JFROG_CLI_COMMAND_SUMMARY_OUTPUT_DIR/JFROG_COMMAND_SUMMARY +│ +└─── Command1 +│ datafile1.txt +│ datafile2.txt +│ markdown.txt +│ +└─── Command2 + datafile1.txt + datafile2.txt + markdown.txt +``` diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/authentication.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/authentication.md index 22f7f3d..61175e9 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/authentication.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/authentication.md @@ -8,9 +8,9 @@ To authenticate yourself using your JFrog login credentials, either configure yo | Command option | Description | |----------------|-----------------------------------------------------------------------| -| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | -| --user | JFrog username | -| --password | JFrog password or API key | +| `--url` | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | +| `--user` | JFrog username | +| `--password` | JFrog password or API key | For enhanced security, when JFrog CLI is configured to use a username and password / API key, it automatically generates an access token to authenticate with Artifactory. The generated access token is valid for one hour only. JFrog CLI automatically refreshed the token before it expires. The **jf c add** command allows disabling this functionality. This feature is currently not supported by commands which use external tools or package managers or work with JFrog Distribution. @@ -18,10 +18,10 @@ For enhanced security, when JFrog CLI is configured to use a username and passwo To authenticate yourself using an Artifactory Access Token, either configure your Access Token once using the **jf c add** command or provide the following option to each command. -| Command option | Description | -|----------------|-----------------------------------------------------------------------| -| --url | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | -| --access-token | JFrog access token | +| Command option | Description | +|------------------|-----------------------------------------------------------------------| +| `--url` | JFrog Artifactory API endpoint URL. It usually ends with /artifactory | +| `--access-token` | JFrog access token | ## Authenticating with RSA Keys diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/build-integration.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/build-integration.md index 259cc07..4db7d4f 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/build-integration.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/build-integration.md @@ -38,19 +38,23 @@ This command is used to collect environment variables and attach them to a build Environment variables are collected using the `build-collect-env` (`bce`) command. +#### Usage + +```jf rt bce ``` + #### Commands Params The following table lists the command arguments and flags: -| | | -|-------------------|---------------------------------------------| -| Command name | rt build-collect-env | -| Abbreviation | rt bce | -| Command options | | -| --project |

[Optional]

JFrog project key.

| -| Command arguments | The command accepts two arguments. | -| Build name | Build name. | -| Build number | Build number. | +| | | +|------------------------|-----------------------------------------| +| Command name | rt build-collect-env | +| Abbreviation | rt bce | +| **Command arguments:** | The command accepts two arguments. | +| Build name | Build name. | +| Build number | Build number. | +| **Command options:** | | +| `--project` |

[Optional]
JFrog project key.

| #### Examples ##### Example 1 @@ -73,22 +77,26 @@ jf rt bce frogger-build 17 The `build-add-git` (bag) command collects the Git revision and URL from the local .git directory and adds it to the build-info. It can also collect the list of tracked project issues (for example, issues stored in JIRA or other bug tracking systems) and add them to the build-info. The issues are collected by reading the git commit messages from the local git log. Each commit message is matched against a pre-configured regular expression, which retrieves the issue ID and issue summary. The information required for collecting the issues is retrieved from a yaml configuration file provided to the command. +#### Usage + +```jf rt bag [command options] [Path To .git]``` + #### Commands Params The following table lists the command arguments and flags: -| | | -|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt build-add-git | -| Abbreviation | rt bag | -| Command options | | -| --config |

[Optional]

Path to a yaml configuration file, used for collecting tracked project issues and adding them to the build-info.

| -| --server-id |

[Optional]

Server ID configured using the 'jf config' command. This is the server to which the build-info will be later published, using the jf rt build-publish command. This option, if provided, overrides the serverID value in this command's yaml configuration. If both values are not provided, the default server, configured by the 'jf config' command, is used.

| -| --project |

[Optional]

JFrog project key.

| -| Command arguments | The command accepts three arguments. | -| Build name | Build name. | -| Build number | Build number. | -| .git path | Optional - Path to a directory containing the .git directory. If not specific, the .git directory is assumed to be in the current directory or in one of the parent directories. | +| | | +|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt build-add-git | +| Abbreviation | rt bag | +| **Command arguments:** | The command accepts three arguments. | +| Build name | Build name. | +| Build number | Build number. | +| .git path | Optional - Path to a directory containing the .git directory. If not specific, the .git directory is assumed to be in the current directory or in one of the parent directories. | +| **Command options:** | | +| `--config` |

[Optional]
Path to a yaml configuration file, used for collecting tracked project issues and adding them to the build-info.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. This is the server to which the build-info will be later published, using the jf rt build-publish command. This option, if provided, overrides the serverID value in this command's yaml configuration. If both values are not provided, the default server, configured by the 'jf config' command, is used.

| +| `--project` |

[Optional]
JFrog project key.

| #### Configuration file properties @@ -136,26 +144,31 @@ The download command, as well as other commands which download dependencies from By default, the command collects the files from the local file system. If you'd like the files to be collected from Artifactory however, add the **--from-rt** option to the command. +#### Usage + +```jf rt bad [command options] ``` +```jf rt bad --spec= [command options] ``` + #### Commands Params -| | | -|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt build-add-dependencies | -| Abbreviation | rt bad | -| Command options |

Warning

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --from-rt |

[Default: false]

Set to true to search the files in Artifactory, rather than on the local file system. The --regexp option is not supported when --from-rt is set to true.

| -| --server-id |

[Optional]

Server ID configured using the config command.

| -| --spec |

[Optional]

Path to a File Spec.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --recursive |

[Default: true]

When false, artifacts inside sub-folders in Artifactory will not be affected.

| -| --regexp |

[Optional: false]

[Default: false] Set to true to use a regular expression instead of wildcards expression to collect files to be added to the build info.This option is not supported when --from-rt is set to true.

| -| --dry-run |

[Default: false]

Set to true to only get a summery of the dependencies that will be added to the build info.

| -| --module |

[Optional]

Optional module name in the build-info for adding the dependency.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards or a regular expression according to the value of the 'regexp' option. | -| Command arguments | The command takes three arguments. | -| Build name | The build name to add the dependencies to | -| Build number | The build number to add the dependencies to | -| Pattern | Specifies the local file system path to dependencies which should be added to the build info. You can specify multiple dependencies by using wildcards or a regular expression as designated by the --regexp command option. If you have specified that you are using regular expressions, then the first one used in the argument must be enclosed in parenthesis. | +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt build-add-dependencies | +| Abbreviation | rt bad | +| **Command arguments:** | The command takes three arguments. | +| Build name | The build name to add the dependencies to | +| Build number | The build number to add the dependencies to | +| Pattern | Specifies the local file system path to dependencies which should be added to the build info. You can specify multiple dependencies by using wildcards or a regular expression as designated by the --regexp command option. If you have specified that you are using regular expressions, then the first one used in the argument must be enclosed in parenthesis. | +| **Command options:** |

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--from-rt` |

[Default: false]
Set to true to search the files in Artifactory, rather than on the local file system. The --regexp option is not supported when --from-rt is set to true.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command.

| +| `--spec` |

[Optional]
Path to a File Spec.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--recursive` |

[Default: true]
When false, artifacts inside sub-folders in Artifactory will not be affected.

| +| `--regexp` |

[Optional: false]
[Default: false] Set to true to use a regular expression instead of wildcards expression to collect files to be added to the build info.This option is not supported when --from-rt is set to true.

| +| `--dry-run` |

[Default: false]
Set to true to only get a summery of the dependencies that will be added to the build info.

| +| `--module` |

[Optional]
Optional module name in the build-info for adding the dependency.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards or a regular expression according to the value of the `regexp` option. | #### Examples ##### Example 1 @@ -187,27 +200,28 @@ jf rt bad my-build-name 7 "path/to/build/dependencies/dir/" --module m1 This command is used to publish build info to Artifactory. To publish the accumulated build-info for a build to Artifactory, use the **build-publish** command. For example, the following command publishes all the build-info collected for build **my-build-name** with build number 18: -``` -jf rt bp my-build-name 18 -``` +### Usage + +```jf rt bp [command options] ``` + ### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt build-publish | -| Abbreviation | rt bp | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --project |

[Optional]

JFrog project key.

| -| --build-url |

[Optional]

Can be used for setting the CI server build URL in the build-info.

| -| --env-include |

[Default: *]

List of patterns in the form of "value1;value2;..." Only environment variables that match those patterns will be included in the build info.

| -| --env-exclude |

[Default: *password*;*secret*;*key*]

List of case insensitive patterns in the form of "value1;value2;..." environment variables match those patterns will be excluded.

| -| --dry-run |

[Default: false]

Set to true to disable communication with Artifactory.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | The command accepts two arguments. | -| Build name | Build name to be published. | -| Build number | Build number to be published. | +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt build-publish | +| Abbreviation | rt bp | +| **Command arguments:** | The command accepts two arguments. | +| Build name | Build name to be published. | +| Build number | Build number to be published. | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--build-url` |

[Optional]
Can be used for setting the CI server build URL in the build-info.

| +| `--env-include` |

[Default: *]
List of semicolon-separated(;) patterns in the form of "value1;value2;..." Only environment variables that match those patterns will be included in the build info.

| +| `--env-exclude` |

[Default: *password*;*secret*;*key*]
List of semicolon-separated(;) case insensitive patterns in the form of "value1;value2;..." environment variables match those patterns will be excluded.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with Artifactory.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| | ### Example @@ -253,16 +267,23 @@ The way to do this is by using the **build-append** command. Running this comman Now, when downloading the artifacts of the "master" build, you'll actually be downloading the artifacts of all of its referenced builds. The examples below demonstrates this, +### Usage + +```jf rt ba ``` + +### Commands Params + | | | |------------------------|-----------------------------------------------------------| | Command name | rt build-append | | Abbreviation | rt ba | -| Command options | This command has no options. | -| Command arguments | The command accepts four arguments. | +| **Command arguments:** | The command accepts four arguments. | | Build name | The current (not yet published) build name. | | Build number | The current (not yet published) build number, | | build name to append | The published build name to append to the current build | | build number to append | The published build number to append to the current build | +| **Command options:** | This command has no options. | + **Requirements** @@ -296,27 +317,31 @@ jf rt download --build aggregating-build/10 This command is used to [promote build](https://jfrog.com/knowledge-base/how-does-build-promotion-work/) in Artifactory. +### Usage + +```jf rt bpr [command options] ``` + ### Commands Params -| | | -|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt build-promote | -| Abbreviation | rt bpr | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --project |

[Optional]

JFrog project key.

| -| --status |

[Optional]

Build promotion status.

| -| --comment |

[Optional]

Build promotion comment.

| -| --source-repo |

[Optional]

Build promotion source repository.

| -| --include-dependencies |

[Default: false]

If set to true, the build dependencies are also promoted.

| -| --copy |

[Default: false]

If set true, the build artifacts and dependencies are copied to the target repository, otherwise they are moved.

| -| --props |

[Optional]

List of properties in the form of "key1=value1;key2=value2,...". to attach to the build artifacts.

| -| --dry-run |

[Default: false]

If true, promotion is only simulated. The build is not promoted.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | The command accepts three arguments. | -| Build name | Build name to be promoted. | -| Build number | Build number to be promoted. | -| Target repository | Build promotion target repository. | +| | | +|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt build-promote | +| Abbreviation | rt bpr | +| **Command arguments:** | The command accepts three arguments. | +| Build name | Build name to be promoted. | +| Build number | Build number to be promoted. | +| Target repository | Build promotion target repository. | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--status` |

[Optional]
Build promotion status.

| +| `--comment` |

[Optional]
Build promotion comment.

| +| `--source-repo` |

[Optional]
Build promotion source repository.

| +| `--include-dependencies` |

[Default: false]
If set to true, the build dependencies are also promoted.

| +| `--copy` |

[Default: false]
If set true, the build artifacts and dependencies are copied to the target repository, otherwise they are moved.

| +| `--props` |

[Optional]
List of semicolon-separated(;) properties in the form of "key1=value1;key2=value2,...". to attach to the build artifacts.

| +| `--dry-run` |

[Default: false]
If true, promotion is only simulated. The build is not promoted.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| | ### Example @@ -330,18 +355,22 @@ jf rt bpr my-build-name 18 target-repository Build-info is accumulated by the CLI according to the commands you apply until you publish the build-info to Artifactory. If, for any reason, you wish to "reset" the build-info and cleanup (i.e. delete) any information accumulated so far, you can use the `build-clean` (`bc`) command. +### Usage + +```jf rt bc ``` + ### Commands Params The following table lists the command arguments and flags: -| | | -|-------------------|------------------------------------| -| Command name | rt build-clean | -| Abbreviation | rt bc | -| Command options | The command has no options. | -| Command arguments | The command accepts two arguments. | -| Build name | Build name. | -| Build number | Build number. | +| | | +|------------------------|------------------------------------| +| Command name | rt build-clean | +| Abbreviation | rt bc | +| **Command arguments:** | The command accepts two arguments. | +| Build name | Build name. | +| Build number | Build number. | +| **Command options:** | The command has no options. | ### Example @@ -356,24 +385,28 @@ jf rt bc my-build-name 18 This command is used to discard builds previously published to Artifactory using the [build-publish](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory#publishing-build-info) command. +### Usage + +```jf rt bdi [command options] ``` + ### Commands Params The following table lists the command arguments and flags: -| | | -|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt build-discard | -| Abbreviation | rt bdi | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --max-days |

[Optional]

The maximum number of days to keep builds in Artifactory.

| -| --max-builds |

[Optional]

The maximum number of builds to store in Artifactory.

| -| --exclude-builds |

[Optional]

List of build numbers in the form of "value1,value2,...", that should not be removed from Artifactory.

| -| --delete-artifacts |

[Default: false]

If set to true, automatically removes build artifacts stored in Artifactory.

| -| --async |

[Default: false]

If set to true, build discard will run asynchronously and will not wait for response.

| -| Command arguments | The command accepts one argument. | -| Build name | Build name. | - +| | | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt build-discard | +| Abbreviation | rt bdi | +| **Command arguments:** | The command accepts one argument. | +| Build name | Build name. | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--max-days` |

[Optional]
The maximum number of days to keep builds in Artifactory.

| +| `--max-builds` |

[Optional]
The maximum number of builds to store in Artifactory.

| +| `--exclude-builds` |

[Optional]
List of comma-separated(,) build numbers in the form of "build1,build2,...", that should not be removed from Artifactory.

| +| `--delete-artifacts` |

[Default: false]
If set to true, automatically removes build artifacts stored in Artifactory.

| +| `--async` |

[Default: false]
If set to true, build discard will run asynchronously and will not wait for response.

| + ### Examples #### Example 1 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md index 352f122..f255c59 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/curl-integration.md @@ -11,9 +11,9 @@ Execute a cUrl command, using the configured Artifactory details. The command ex |--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| | Command name | rt curl | | | Abbreviation | rt cl | | -| Command options | | | -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured server is used.

| | -| Command arguments | | | +| **Command options:** | | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| | +| **Command arguments:** | | | | cUrl arguments and flags |

The same list of arguments and flags passed to cUrl, except for the following changes:

1. The full Artifactory URL should not be passed. Instead, the REST endpoint URI should be sent.
2. The login credentials should not be passed. Instead, the --server-id should be used.

| | Currently only servers configured with username and password / API key are supported. diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md index 425bd93..5bebd86 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/environment-variables.md @@ -3,21 +3,21 @@ Some of the Artifactory commands make use of the following environment variable: -| | | -|----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Variable Name** | **Description** | -| **JFROG\_CLI\_MIN\_CHECKSUM\_DEPLOY\_SIZE\_KB** |

[Default: 10]

Minimum file size in KB for which JFrog CLI performs checksum deploy optimization.

| -| **JFROG\_CLI\_RELEASES\_REPO** |

Configured Artifactory repository name to download the jar needed by the mvn/gradle command.
This environment variable's value format should be <server ID configured by the 'jf c add' command>/<repo name>.
The repository should proxy https://releases.jfrog.io.
This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command, when used for maven or gradle projects.

| -| **JFROG\_CLI\_DEPENDENCIES\_DIR** |

[Default: $JFROG_CLI_HOME_DIR/dependencies]

Defines the directory to which JFrog CLI's internal dependencies are downloaded.

| -| **JFROG\_CLI\_REPORT\_USAGE** |

[Default: true]

Set to false to block JFrog CLI from sending usage statistics to Artifactory.

| -| **JFROG\_CLI\_SERVER\_ID** | Server ID configured using the config command, unless sent as a command argument or option. | -| **JFROG\_CLI\_BUILD\_NAME** | Build name to be used by commands which expect a build name, unless sent as a command argument or option. | -| **JFROG\_CLI\_BUILD\_NUMBER** | Build number to be used by commands which expect a build number, unless sent as a command argument or option. | -| **JFROG\_CLI\_BUILD\_PROJECT** | JFrog project key to be used by commands that expect build name and build number. Determines the project of the published build. | -| **JFROG\_CLI\_BUILD\_URL** | Sets the CI server build URL in the build-info. The "jf rt build-publish" command uses the value of this environment variable unless the --build-url command option is sent. | -| **JFROG\_CLI\_ENV\_EXCLUDE** |

[Default: *password*;*secret*;*key*;*token*]

List of case insensitive patterns in the form of "value1;value2;...". Environment variables match those patterns will be excluded. This environment variable is used by the "jf rt build-publish" command, in case the --env-exclude command option is not sent.

| -| **JFROG\_CLI\_TRANSITIVE\_DOWNLOAD\_EXPERIMENTAL** |

[Default: false]

Used by the "jf rt download" command. Set to true to download artifacts also from remote repositories. This feature is experimental and available on Artifactory version 7.17.0 or higher.

| -| **JFROG\_CLI\_UPLOAD\_EMPTY\_ARCHIVE** |

[Default: false]

Used by the "jf rt upload" command. Set to true if you'd like to upload an empty archive when '--archive' is set but all files were excluded by exclusions pattern.

| +| | | +|----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Variable Name** | **Description** | +| **JFROG\_CLI\_MIN\_CHECKSUM\_DEPLOY\_SIZE\_KB** |

[Default: 10]
Minimum file size in KB for which JFrog CLI performs checksum deploy optimization.

| +| **JFROG\_CLI\_RELEASES\_REPO** |

Configured Artifactory repository name to download the jar needed by the mvn/gradle command.
This environment variable's value format should be server ID configured by the 'jf c add' command.
The repository should proxy https://releases.jfrog.io.
This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command, when used for maven or gradle projects.

| +| **JFROG\_CLI\_DEPENDENCIES\_DIR** |

[Default: $JFROG_CLI_HOME_DIR/dependencies]
Defines the directory to which JFrog CLI's internal dependencies are downloaded.

| +| **JFROG\_CLI\_REPORT\_USAGE** |

[Default: true]
Set to false to block JFrog CLI from sending usage statistics to Artifactory.

| +| **JFROG\_CLI\_SERVER\_ID** | Server ID configured using the 'jf config' command, unless sent as a command argument or option. | +| **JFROG\_CLI\_BUILD\_NAME** | Build name to be used by commands which expect a build name, unless sent as a command argument or option. | +| **JFROG\_CLI\_BUILD\_NUMBER** | Build number to be used by commands which expect a build number, unless sent as a command argument or option. | +| **JFROG\_CLI\_BUILD\_PROJECT** | JFrog project key to be used by commands that expect build name and build number. Determines the project of the published build. | +| **JFROG\_CLI\_BUILD\_URL** | Sets the CI server build URL in the build-info. The "jf rt build-publish" command uses the value of this environment variable unless the --build-url command option is sent. | +| **JFROG\_CLI\_ENV\_EXCLUDE** |

[Default: *password*;*secret*;*key*;*token*]
List of semicolon-separated(;) case insensitive patterns in the form of "value1;value2;...". Environment variables match those patterns will be excluded. This environment variable is used by the "jf rt build-publish" command, in case the --env-exclude command option is not sent.

| +| **JFROG\_CLI\_TRANSITIVE\_DOWNLOAD** |

[Default: false]
Set this option to true to include remote repositories in artifact searches when using the 'rt download' command. The search will target the first five remote repositories within the virtual repository. This feature is available starting from Artifactory version 7.17.0. **NOTE:** Enabling this option may increase the load on Artifactory instances that are proxied by multiple remote repositories..

| +| **JFROG\_CLI\_UPLOAD\_EMPTY\_ARCHIVE** |

[Default: false]
Used by the "jf rt upload" command. Set to true if you'd like to upload an empty archive when '--archive' is set but all files were excluded by exclusions pattern.

| *** diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/generic-files.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/generic-files.md index fa355e1..8021c9b 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/generic-files.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/generic-files.md @@ -4,45 +4,51 @@ This command is used to upload files to Artifactory. +### Usage + +```jf rt u [command options] ``` +```jf rt u --spec= [command options]``` + ### Commands Params -| | | -|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt upload | -| Abbreviation | rt u | -| Command options |

Warning

When using the * or ; characters in the upload command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --archive |

[Optional]

Set to "zip" to pack and deploy the files to Artifactory inside a ZIP archive. Currently, the only packaging format supported is zip.

| -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --target-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon ( ; ) to be attached to the uploaded files. If any key can take several values, then each value is separated by a comma ( , ). For example, "key1=value1;key2=value21,value22;key3=value3".

| -| --deb |

[Optional]

Used for Debian packages only. Specifies the distribution/component/architecture of the package. If the the value for distribution, component or architecture include a slash. the slash should be escaped with a back-slash.

| -| --flat |

[Default: false]

If true, files are uploaded to the exact target path specified and their hierarchy in the source file system is ignored.

If false, files are uploaded to the target path while maintaining their file system hierarchy.

If Using Placeholders are used, the value of this option is ignored.

Note

JFrog CLI v1

In JFrog CLI v1, the default value of the --flat option is true.

| -| --recursive |

[Default: true]

If true, files are also collected from sub-folders of the source directory for upload .

If false, only files specifically in the source directory are uploaded.

| -| --regexp |

[Default: false]

If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as a regular expression.

If false, it will interpret the first argument as a wild-card expression.

The above also applies for the --exclusions option.

If you have specified that you are using regular expressions, then the beginning of the expression must be enclosed in parenthesis. For example: a/b/c/(.*)/file.zip

| -| --ant |

[Default: false]

If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as an ANT pattern.

If false, it will interpret the first argument as a wildcards expression.

The above also applies for the --exclusions option.

| -| --threads |

[Default: 3]

The number of parallel threads that should be used to upload where each thread uploads a single artifact at a time.

| -| --dry-run |

[Default: false]

If true, the command only indicates which artifacts would have been uploaded

If false, the command is fully executed and uploads artifacts as specified

| -| --symlinks |

[Default: false]

If true, the command will preserve the soft links structure in Artifactory. The symlink file representation will contain the symbolic link and checksum properties.

| -| --explode |

[Default: false]

If true, the command will extract an archive containing multiple artifacts after it is deployed to Artifactory, while maintaining the archive's file structure.

| -| --include-dirs |

[Default: false]

If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

| -| --exclusions |

[Optional]

A list of Semicolon-separated exclude patterns. Allows using wildcards, regular expressions or ANT patterns, according to the value of the --regexp and --ant options. Please read the --regexp and --ant options description for more information.

| -| --sync-deletes |

[Optional]

Specific path in Artifactory, under which to sync artifacts after the upload. After the upload, this path will include only the artifacts uploaded during this upload operation. The other files under this path will be deleted.

| -| --quiet |

[Default: false]

If true, the delete confirmation message is skipped.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --retries |

[Default: 3]

Number of upload retries.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.

| -| --detailed-summary |

[Default: false]

Set to true to include a list of the affected files as part of the command output summary.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --min-split |

[Default: 200]

The minimum file size in MiB required to attempt a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.

| -| --split-count |

[Default: 5]

The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 storage.

| -| Command arguments |

The command takes two arguments.

In case the --spec option is used, the commands accept no arguments.

| -| Source path | The first argument specifies the local file system path to artifacts that should be uploaded to Artifactory. You can specify multiple artifacts by using wildcards or a regular expression as designated by the **--regexp** command option. Please read the **--regexp** option description for more information. | -| Target path |

The second argument specifies the target path in Artifactory in the following format: [repository name]/[repository path]

If the target path ends with a slash, the path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be uploaded. If there is no terminal slash, the target path is assumed to be a file to which the uploaded file should be renamed. For example, if you specify the target as "repo-name/a/b", the uploaded file is renamed to "b" in Artifactory.

For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt upload | +| Abbreviation | rt u | +| **Command arguments:** |

The command takes two arguments, source path and target path.

In case the --spec option is used, the commands accept no arguments.

| +| Source path | The first argument specifies the local file system path to artifacts that should be uploaded to Artifactory. You can specify multiple artifacts by using wildcards or a regular expression as designated by the **--regexp** command option. Please read the **--regexp** option description for more information. | +| Target path |

The second argument specifies the target path in Artifactory in the following format: [repository name]/[repository path]

If the target path ends with a slash, the path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be uploaded. If there is no terminal slash, the target path is assumed to be a file to which the uploaded file should be renamed. For example, if you specify the target as "repo-name/a/b", the uploaded file is renamed to "b" in Artifactory.

For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| **Command options:** |


When using the * or ; characters in the upload command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--archive` |

[Optional]
Set to "zip" to pack and deploy the files to Artifactory inside a ZIP archive. Currently, the only packaging format supported is zip.

| +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--target-props` |

[Optional]
List of semicolon-separated(;) Artifactory properties specified as "key=value" pairs to be attached to the uploaded files.(for example: "key1=value1;key2=value21,value22;key3=value3".

| +| `--deb` |

[Optional]
Used for Debian packages only. Specifies the distribution/component/architecture of the package. If the the value for distribution, component or architecture include a slash. the slash should be escaped with a back-slash.

| +| `--flat` |

[Default: false]
If true, files are uploaded to the exact target path specified and their hierarchy in the source file system is ignored.

If false, files are uploaded to the target path while maintaining their file system hierarchy.

If Using Placeholders are used, the value of this option is ignored.

Note

JFrog CLI v1

In JFrog CLI v1, the default value of the --flat option is true.

| +| `--recursive` |

[Default: true]
If true, files are also collected from sub-folders of the source directory for upload .

If false, only files specifically in the source directory are uploaded.

| +| `--regexp` |

[Default: false]
If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as a regular expression.

If false, it will interpret the first argument as a wild-card expression.

The above also applies for the --exclusions option.

If you have specified that you are using regular expressions, then the beginning of the expression must be enclosed in parenthesis. For example: a/b/c/(.*)/file.zip

| +| `--ant` |

[Default: false]
If true, the command will interpret the first argument, which describes the local file-system path of artifacts to upload, as an ANT pattern.

If false, it will interpret the first argument as a wildcards expression.

The above also applies for the --exclusions option.

| +| `--threads` |

[Default: 3]
The number of parallel threads that should be used to upload where each thread uploads a single artifact at a time.

| +| `--dry-run` |

[Default: false]
If true, the command only indicates which artifacts would have been uploaded

If false, the command is fully executed and uploads artifacts as specified

| +| `--symlinks` |

[Default: false]
If true, the command will preserve the soft links structure in Artifactory. The symlink file representation will contain the symbolic link and checksum properties.

| +| `--explode` |

[Default: false]
If true, the command will extract an archive containing multiple artifacts after it is deployed to Artifactory, while maintaining the archive's file structure.

| +| `--include-dirs` |

[Default: false]
If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

| +| `--exclusions` |

[Optional]
A list of semicolon-separated(;) exclude patterns. Allows using wildcards, regular expressions or ANT patterns, according to the value of the --regexp and --ant options. Please read the --regexp and --ant options description for more information.

| +| `--sync-deletes` |

[Optional]
Specific path in Artifactory, under which to sync artifacts after the upload. After the upload, this path will include only the artifacts uploaded during this upload operation. The other files under this path will be deleted.

| +| `--quiet` |

[Default: false]
If true, the delete confirmation message is skipped.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--retries` |

[Default: 3]
Number of upload retries.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| +| `--detailed-summary` |

[Default: false]
Set to true to include a list of the affected files as part of the command output summary.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--chunk-size` |

[Default: 20]
The upload chunk size in MiB that can be concurrently uploaded during a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.

| +| `--min-split` |

[Default: 200]
The minimum file size in MiB required to attempt a multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.

| +| `--split-count` |

[Default: 5]
The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. This option, as well as the functionality of multi-part upload, requires Artifactory with S3 or GCP storage.

| ### Examples #### Example 1 @@ -107,53 +113,61 @@ This command is used to download files from Artifactory. > Download from Remote Repositories:\ > \ -> By default, the command only downloads files that are cached on the current Artifactory instance. It does not download files located on remote Artifactory instances, through remote or virtual repositories. To allow the command to download files from remote Artifactory instances, which are proxied by the use of remote repositories, set the **JFROG\_CLI\_TRANSITIVE\_DOWNLOAD\_EXPERIMENTAL** environment variable to **true**. This functionality requires version 7.17 or above of Artifactory. The remote download functionality is supported only on remote repositories which proxy repositories on remote Artifactory instances. Downloading through a remote repository that proxies non-Artifactory repositories is not supported. +> By default, the command downloads only the files that are cached on the current Artifactory instance. It does not retrieve files from remote Artifactory instances accessed via remote or virtual repositories. To enable the command to download files from remote Artifactory instances (proxied through remote repositories), set the **JFROG_CLI_TRANSITIVE_DOWNLOAD** environment variable to **true**. This feature is available in Artifactory version 7.17 or later. Note that remote downloads are supported only for remote repositories that proxy other Artifactory instances. Downloads from remote repositories that proxy non-Artifactory repositories are not supported.\ +> \ +> **IMPORTANT**: Enabling the **JFROG_CLI_TRANSITIVE_DOWNLOAD** environment variable may increase the load on the remote Artifactory instance. It is advisable to use this setting cautiously. + +### Usage + +```jf rt dl [command options] [Target path]``` +```jf rt dl --spec= [command options]``` ### Commands Params -| | | -|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt download | -| Abbreviation | rt dl | -| Command options |

Warning

When using the * or ; characters in the download command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts with all of the specified properties names and values will be downloaded.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be downloaded.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --flat |

[Default: false]

If true, artifacts are downloaded to the exact target path specified and their hierarchy in the source repository is ignored.

If false, artifacts are downloaded to the target path in the file system while maintaining their hierarchy in the source repository.

If Using Placeholders are used, and you would like the local file system (download path) to be determined by placeholders only, or in other words, avoid concatenating the Artifactory folder hierarchy local, set to false.

| -| --recursive |

[Default: true]

If true, artifacts are also downloaded from sub-paths under the specified path in the source repository.

If false, only artifacts in the specified source path directory are downloaded.

| -| --threads |

[Default: 3]

The number of parallel threads that should be used to download where each thread downloads a single artifact at a time.

| -| --split-count |

[Default: 3]

The number of segments into which each file should be split for download (provided the artifact is over --min-split in size). To download each file in a single thread, set to 0.

| -| --retries |

[Default: 3]

Number of download retries.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.

| -| --min-split |

[Default: 5120]

The minimum size permitted for splitting. Files larger than the specified number will be split into equally sized --split-count segments. Any files smaller than the specified number will be downloaded in a single thread. If set to -1, files are not split.

| -| --dry-run |

[Default: false]

If true, the command only indicates which artifacts would have been downloaded.

If false, the command is fully executed and downloads artifacts as specified.

| -| --explode |

[Default: false]

Set to true to extract an archive after it is downloaded from Artifactory.

Supported compression formats: br, bz2, gz, lz4, sz, xz, zstd.

Supported archive formats: zip, tar (including any compressed variants like tar.gz), rar.

| -| --bypass-archive-inspection |

[Default: false]

Set to true to bypass the archive security inspection before it is unarchived. Used with the 'explode' option.

| -| --validate-symlinks |

[Default: false]

If true, the command will validate that symlinks are pointing to existing and unchanged files, by comparing their sha1. Applicable to files and not directories.

| -| --include-dirs |

[Default: false]

If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --sync-deletes |

[Optional]

Specific path in the local file system, under which to sync dependencies after the download. After the download, this path will include only the dependencies downloaded during this download operation. The other files under this path will be deleted.

| -| --quiet |

[Default: false]

If true, the delete confirmation message is skipped.

| -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --detailed-summary |

[Default: false]

Set to true to include a list of the affected files as part of the command output summary.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --gpg-key |

[Optional]

Path to the public GPG key file located on the file system, used to validate downloaded release bundle files.

| -| Command arguments | | -| Source path | Specifies the source path in Artifactory, from which the artifacts should be downloaded. You can use wildcards to specify multiple artifacts. | -| Target path |

The second argument is optional and specifies the local file system target path.

If the target path ends with a slash, the path is assumed to be a directory. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a directory into which files should be downloaded. If there is no terminal slash, the target path is assumed to be a file to which the downloaded file should be renamed. For example, if you specify the target as "a/b", the downloaded file is renamed to "b".

For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| | | +|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt download | +| Abbreviation | rt dl | +| **Command arguments:** |

The command takes two arguments source path and target path (Optional).

In case the --spec option is used, the commands accept no arguments.

| +| Source path | Specifies the source path in Artifactory, from which the artifacts should be downloaded. You can use wildcards to specify multiple artifacts. | +| Target path |

The second argument is optional and specifies the local file system target path.

If the target path ends with a slash, the path is assumed to be a directory. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a directory into which files should be downloaded. If there is no terminal slash, the target path is assumed to be a file to which the downloaded file should be renamed. For example, if you specify the target as "a/b", the downloaded file is renamed to "b".

For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| **Command options:** |

When using the * or ; characters in the download command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with all of the specified properties names and values will be downloaded.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be downloaded.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--flat` |

[Default: false]
If true, artifacts are downloaded to the exact target path specified and their hierarchy in the source repository is ignored.

If false, artifacts are downloaded to the target path in the file system while maintaining their hierarchy in the source repository.

If Using Placeholders are used, and you would like the local file system (download path) to be determined by placeholders only, or in other words, avoid concatenating the Artifactory folder hierarchy local, set to false.

| +| `--recursive` |

[Default: true]
If true, artifacts are also downloaded from sub-paths under the specified path in the source repository.

If false, only artifacts in the specified source path directory are downloaded.

| +| `--threads` |

[Default: 3]
The number of parallel threads that should be used to download where each thread downloads a single artifact at a time.

| +| `--split-count` |

[Default: 3]
The number of segments into which each file should be split for download (provided the artifact is over --min-split in size). To download each file in a single thread, set to 0.

| +| `--retries` |

[Default: 3]
Number of download retries.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| +| `--min-split` |

[Default: 5120]
The minimum size permitted for splitting. Files larger than the specified number will be split into equally sized --split-count segments. Any files smaller than the specified number will be downloaded in a single thread. If set to -1, files are not split.

| +| `--dry-run` |

[Default: false]
If true, the command only indicates which artifacts would have been downloaded.

If false, the command is fully executed and downloads artifacts as specified.

| +| `--explode` |

[Default: false]
Set to true to extract an archive after it is downloaded from Artifactory.

Supported compression formats: br, bz2, gz, lz4, sz, xz, zstd.

Supported archive formats: zip, tar (including any compressed variants like tar.gz), rar.

| +| `--bypass-archive-inspection` |

[Default: false]
Set to true to bypass the archive security inspection before it is unarchived. Used with the `explode` option.

| +| '--validate-symlinks' |

[Default: false]
If true, the command will validate that symlinks are pointing to existing and unchanged files, by comparing their sha1. Applicable to files and not directories.

| +| `--include-dirs` |

[Default: false]
If true, the source path applies to bottom-chain directories and not only to files. Bottom-chain directories are either empty or do not include other directories that match the source path.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--sync-deletes` |

[Optional]
Specific path in the local file system, under which to sync dependencies after the download. After the download, this path will include only the dependencies downloaded during this download operation. The other files under this path will be deleted.

| +| `--quiet` |

[Default: false]
If true, the delete confirmation message is skipped.

| +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--detailed-summary` |

[Default: false]
Set to true to include a list of the affected files as part of the command output summary.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--gpg-key` |

[Optional]
Path to the public GPG key file located on the file system, used to validate downloaded release bundle files.

| + ### Examples #### Example 1 @@ -192,36 +206,41 @@ jf rt dl "my-local-repo/all-my-frogs/" --sort-by=created --sort-order=desc --li This command is used to copy files in Artifactory +### Usage + +```jf rt cp [command options] ``` +```jf rt cp --spec= [command options]``` + ### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt copy | -| Abbreviation | rt cp | -| Command options |

Warning

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon. (For example, "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be copied.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be copied.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --flat |

[Default: false]

If true, artifacts are copied to the exact target path specified and their hierarchy in the source path is ignored.

If false, artifacts are copied to the target path while maintaining their source path hierarchy.

| -| --recursive |

[Default: true]

If true, artifacts are also copied from sub-paths under the specified source path.

If false, only artifacts in the specified source path directory are copied.

| -| --dry-run |

[Default: false]

If true, the command only indicates which artifacts would have been copied.

If false, the command is fully executed and copies artifacts as specified.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --threads |

[Default: 3]

Number of threads used for copying the items.

| -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --retries |

[Default: 3]

Number for HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.

| -| Command arguments | The command takes two arguments | -| Source path | Specifies the source path in Artifactory, from which the artifacts should be copied, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | -| Target path |

Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: [repository name]/[repository path]

If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. If there is no terminal slash, the target path is assumed to be a file to which the copied file should be renamed. For example, if you specify the target as "repo-name/a/b", the copied file is renamed to "b" in Artifactory.

For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt copy | +| Abbreviation | rt cp | +| **Command arguments:** |

The command takes two arguments source path and target path.

In case the --spec option is used, the commands accept no arguments.

| +| Source path | Specifies the source path in Artifactory, from which the artifacts should be copied, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| Target path |

Specifies the target path in Artifactory, to which the artifacts should be copied, in the following format: [repository name]/[repository path]

By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be copied. If there is no terminal slash, the target path is assumed to be a file to which the copied file should be renamed. For example, if you specify the target as "repo-name/a/b", the copied file is renamed to "b" in Artifactory.

For flexibility in specifying the target path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| **Command options:** |

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs. (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be copied.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be copied.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--flat` |

[Default: false]
If true, artifacts are copied to the exact target path specified and their hierarchy in the source path is ignored.

If false, artifacts are copied to the target path while maintaining their source path hierarchy.

| +| `--recursive` |

[Default: true]
If true, artifacts are also copied from sub-paths under the specified source path.

If false, only artifacts in the specified source path directory are copied.

| +| `--dry-run` |

[Default: false]
If true, the command only indicates which artifacts would have been copied.

If false, the command is fully executed and copies artifacts as specified.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--threads` |

[Default: 3]
Number of threads used for copying the items.

| +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--retries` |

[Default: 3]
Number for HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| ### Examples #### Example 1 @@ -248,40 +267,52 @@ Copy all artifacts located under **/rabbit** in the **source-frog-repo** reposit jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0 ``` +#### Example 4 + +Copy all artifacts located under /rabbit in the **source-frog-repo** repository into the same path in the **target-frog-repo** repository without maintaining the original subdirectory hierarchy. +``` +jf rt cp "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat +``` + ## Moving Files This command is used to move files in Artifactory +### Usage + +```jf rt mv [command options] ``` +```jf rt mv --spec= [command options]``` + ### Commands Params -| | | -|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt move | -| Abbreviation | rt mv | -| Command options |

Warning

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be moved.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be moved.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --flat |

[Default: false]

If true, artifacts are moved to the exact target path specified and their hierarchy in the source path is ignored.

If false, artifacts are moved to the target path while maintaining their source path hierarchy.

| -| --recursive |

[Default: true]

If true, artifacts are also moved from sub-paths under the specified source path.

If false, only artifacts in the specified source path directory are moved.

| -| --dry-run |

[Default: false]

If true, the command only indicates which artifacts would have been moved.

If false, the command is fully executed and downloads artifacts as specified.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --threads |

[Default: 3]

Number of threads used for moving the items.

| -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --retries |

[Default: 3]

Number of HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.

| -| Command arguments | The command takes two arguments | -| Source path | Specifies the source path in Artifactory, from which the artifacts should be moved, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | -| Target path |

Specifies the target path in Artifactory, to which the artifacts should be moved, in the following format: [repository name]/[repository path]

If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be moved. If there is no terminal slash, the target path is assumed to be a file to which the moved file should be renamed. For example, if you specify the target as "repo-name/a/b", the moved file is renamed to "b" in Artifactory.

For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt move | +| Abbreviation | rt mv | +| **Command arguments:** |

The command takes two arguments source path and target path.

In case the --spec option is used, the commands accept no arguments.

| +| Source path | Specifies the source path in Artifactory, from which the artifacts should be moved, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| Target path |

Specifies the target path in Artifactory, to which the artifacts should be moved, in the following format: [repository name]/[repository path]

By default the Target Path maintains the source path hierarchy, see --flat flag for more info. If the pattern ends with a slash, the target path is assumed to be a folder. For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a folder in Artifactory into which files should be moved. If there is no terminal slash, the target path is assumed to be a file to which the moved file should be renamed. For example, if you specify the target as "repo-name/a/b", the moved file is renamed to "b" in Artifactory.

For flexibility in specifying the upload path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the source path that are enclosed in parenthesis. For more details, please refer to Using Placeholders.

| +| **Command options:** |

When using the * or ; characters in the copy command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be moved.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be moved.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--flat` |

[Default: false]
If true, artifacts are moved to the exact target path specified and their hierarchy in the source path is ignored.

If false, artifacts are moved to the target path while maintaining their source path hierarchy.

| +| `--recursive` |

[Default: true]
If true, artifacts are also moved from sub-paths under the specified source path.

If false, only artifacts in the specified source path directory are moved.

| +| `--dry-run` |

[Default: false]
If true, the command only indicates which artifacts would have been moved.

If false, the command is fully executed and downloads artifacts as specified.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--threads` |

[Default: 3]
Number of threads used for moving the items.

| +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--retries` |

[Default: 3]
Number of HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| ### Examples #### Example 1 @@ -308,39 +339,52 @@ Move all artifacts located under **/rabbit** in the **source-frog-repo** reposit jf rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --props=Version=1.0 ``` +#### Example 4 + +Move all artifacts located under /rabbit in the **source-frog-repo** repository into the same path in the **target-frog-repo** repository without maintaining the original subdirectory hierarchy. +``` +jf rt mv "source-frog-repo/rabbit/*" target-frog-repo/rabbit/ --flat +``` + ## Deleting Files This command is used to delete files in Artifactory +### Usage + +```jf rt del [command options] ``` +```jf rt del --spec= [command options]``` + ### Commands Params -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt delete | -| Abbreviation | rt del | -| Command options |

Warning

When using the * or ; characters in the delete command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be deleted.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be deleted.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --recursive |

[Default: true]

If true, artifacts are also deleted from sub-paths under the specified path.

| -| --quiet |

[Default: false]

If true, the delete confirmation message is skipped.

| -| --dry-run |

[Default: false]

If true, the command only indicates which artifacts would have been deleted.

If false, the command is fully executed and deletes artifacts as specified.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --threads |

[Default: 3]

Number of threads used for deleting the items.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --retries |

[Default: 3]

Number of HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.--retry-wait-time

| -| Command arguments | The command takes one argument | -| Delete path | Specifies the path in Artifactory of the files that should be deleted in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt delete | +| Abbreviation | rt del | +| **Command arguments:** |

The command takes one argument which is the delete path.

In case the --spec option is used, the commands accept no arguments.

| +| Delete path | Specifies the path in Artifactory of the files that should be deleted in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| **Command options:** |

When using the * or ; characters in the delete command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be deleted.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be deleted.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--recursive` |

[Default: true]
If true, artifacts are also deleted from sub-paths under the specified path.

| +| `--quiet` |

[Default: false]
If true, the delete confirmation message is skipped.

| +| `--dry-run` |

[Default: false]
If true, the command only indicates which artifacts would have been deleted.

If false, the command is fully executed and deletes artifacts as specified.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--threads` |

[Default: 3]
Number of threads used for deleting the items.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--retries` |

[Default: 3]
Number of HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| + ### Examples #### Example 1 @@ -363,37 +407,43 @@ jf rt del "frog-repo/rabbit/*.zip" This command is used to search and display files in Artifactory. +### Usage + +```jf rt s [command options] ``` +```jf rt s --spec= [command options]``` + + ### Commands Params -| | | -|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt search | -| Abbreviation | rt s | -| Command options |

Warning

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --count |

[Optional]

Set to true to display only the total of files or folders found.

| -| --include-dirs |

[Optional]

Set to true if you'd like to also apply the source path pattern for directories and not only for files

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be returned.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be returned.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --recursive |

[Default: true]

Set to false if you do not wish to search artifacts inside sub-folders in Artifactory.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --transitive |

[Default: false]

Set to true to look for artifacts also in remote repositories. Available on Artifactory version 7.17.0 or higher.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --retries |

[Default: 3]

Number of HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.retry-wait-time

| -| --include |

[Optional]

List of fields in the form of "value1;value2;...".
Only the path and the fields that are specified will be returned. The fields must be part of the 'items' AQL domain. for the full supported items list check AQL documentation

| -| Command arguments | | -| Search path | Specifies the search path in Artifactory, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| | | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt search | +| Abbreviation | rt s | +| **Command arguments:** |

The command takes one argument which is the search path.

In case the --spec option is used, the commands accept no arguments.

| +| Search path | Specifies the search path in Artifactory, in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple artifacts. | +| **Command options:** |

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--count` |

[Optional]
Set to true to display only the total of files or folders found.

| +| `--include-dirs` |

[Default: false]
Set to true if you'd like to also apply the source path pattern for directories and not only for files

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts with these properties names and values will be returned.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be returned.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--recursive` |

[Default: true]
Set to false if you do not wish to search artifacts inside sub-folders in Artifactory.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--transitive` |

[Optional]
Set to true to look for artifacts also in remote repositories. Available on Artifactory version 7.17.0 or higher.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--retries` |

[Default: 3]
Number of HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| +| `--include` |

[Optional]
List of semicolon-separated(;) fields in the form of "value1;value2;...".
Only the path and the fields that are specified will be returned. The fields must be part of the `items` AQL domain. for the full supported items list check AQL documentation

| ### Examples #### Example 1 @@ -424,36 +474,41 @@ jf rt s example-repo-local --include="actual_md5;modified_by;updated;depth" This command is used for setting properties on existing files in Artifactory. +### Usage + +```jf rt sp [command options] ``` +```jf rt sp --spec= [command options]``` + ### Commands Params -| | | -|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt set-props | -| Abbreviation | rt sp | -| Command options |

Warning

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --props |

[Optional]

List of properties in the form of "key1=value1;key2=value2,...". Only files with these properties names and values are affected.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

| -| --recursive |

[Default: true]

When false, artifacts inside sub-folders in Artifactory will not be affected.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle | \[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version. | -| --include-dirs |

[Default: false]

When true, the properties will also be set on folders (and not just files) in Artifactory.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --threads |

[Default: 3]

Number of working threads.

| -| --retries |

[Default: 3]

Number of HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.

| -| Command arguments | The command takes two arguments. | -| Files pattern | Files that match the pattern will be set with the specified properties. | -| Files properties | The list of properties, in the form of key1=value1;key2=value2,..., to be set on the matching artifacts. | +| | | +|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt set-props | +| Abbreviation | rt sp | +| **Command arguments:** |

The command takes two arguments, files pattern and files properties.

In case the --spec option is used, the commands accept no arguments.

| +| Files pattern | Files that match the pattern will be set with the specified properties. | +| Files properties | A list of semicolon-separated(;) key-values in the form of key1=value1;key2=value2,..., to be set on the matching files. | +| **Command options:** |

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--props` |

[Optional]
List of semicolon-separated(;) properties in the form of "key1=value1;key2=value2,...". Only files with these properties names and values are affected.

| +| `--exclude-props` |

[Optional]
A list of Artifactory properties specified as semicolon-separated(;) "key=value" pairs (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

| +| `--recursive` |

[Default: true]
When false, artifacts inside sub-folders in Artifactory will not be affected.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` | \[Optional] If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version. | +| `--include-dirs` |

[Default: false]
When true, the properties will also be set on folders (and not just files) in Artifactory.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--exclusions` | A list of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--threads` |

[Default: 3]
Number of working threads.

| +| `--retries` |

[Default: 3]
Number of HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| ### Examples #### Example 1 @@ -472,42 +527,106 @@ The command will set the property "a" with "1" value and the property "b" with t jf rt sp "a=1;b=2,3" --spec my-spec ``` +#### Example 3 + +Set the properties on all the jar files in the maven-local repository. The command will set the property "version" with "1.0.0" value and the property "release" with "stable" value. + +``` +jf rt sp "maven-local/*.jar" "version=1.0.0;release=stable" +``` + +#### Example 4 + +The command will set the property "environment" with "production" value and the property "team" with "devops" value on all files found by the File Spec prod-spec. + +``` +jf rt sp "environment=production;team=devops" --spec prod-spec +``` + +#### Example 5 + +Set the properties on all the tar.gz files in the devops-local repository. The command will set the property "build" with "102" value and the property "branch" with "main" value. + +``` +jf rt sp "devops-local/*.tar.gz" "build=102;branch=main" +``` + ## Deleting Properties from Files This command is used for deleting properties from existing files in Artifactory. +### Usage + +```jf rt delp [command options] ``` +```jf rt delp --spec= [command options]``` + ### Commands Params -| | | -|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt delete-props | -| Abbreviation | rt delp | -| Command options |

Warning

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| -| --server-id |

[Optional]

Artifactory server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --props |

[Optional]

List of properties in the form of "key1=value1;key2=value2,...". Only files with these properties are affected.

| -| --exclude-props |

[Optional]

A list of Artifactory properties specified as "key=value" pairs separated by a semi-colon (for example, "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

| -| --recursive |

[Default: true]

When false, artifacts inside sub-folders in Artifactory will not be affected.

| -| --build |

[Optional]

If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| -| --bundle |

[Optional]

If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| -| --include-dirs |

[Default: false]

When true, the properties will also be set on folders (and not just files) in Artifactory.

| -| --fail-no-op |

[Default: false]

Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| -| --exclusions | A list of Semicolon-separated exclude patterns. Allows using wildcards. | -| --sort-by |

[Optional]

A list of semicolon-separated fields to sort by. The fields must be part of the 'items' AQL domain. For more information read the AQL documentation

| -| --sort-order |

[Default: asc]

The order by which fields in the 'sort-by' option should be sorted. Accepts 'asc' or 'desc'.

| -| --limit |

[Optional]

The maximum number of items to fetch. Usually used with the 'sort-by' option.

| -| --offset |

[Optional]

The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| -| --archive-entries |

[Optional]

If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --retries |

[Default: 3]

Number of HTTP retry attempts.

| -| --retry-wait-time |

[Default: 0s]

Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds.retry-wait-time

| -| Command arguments | The command takes two arguments. | -| Files pattern | The properties will be deleted from files that match the pattern. | -| Files properties | The list of properties, in the form of key1,key2,..., to be deleted from the matching artifacts. | - -### Example - -Delete the "status" and "phase" properties from all the zip files in the generic-local repository. - -``` -jf rt delp "generic-local/*.zip" "status,phase" +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt delete-props | +| Abbreviation | rt delp | +| **Command arguments:** |

The command takes two arguments, files pattern and properties list.

In case the --spec option is used, the commands accept no arguments.

| +| Files pattern | Specifies the files pattern in the following format: `[repository name]/[repository path].` You can use wildcards to specify multiple repositories and files. | +| Properties list | A comma-separated(,) list of properties, in the form of key1,key2,..., to be deleted from the matching files. | +| **Command options:** |

When using the * or ; characters in the command options or arguments, make sure to wrap the whole options or arguments string in quotes (") to make sure the * or ; characters are not interpreted as literals.

| +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--props` |

[Optional]
List of semicolon-separated(;) properties in the form of "key1=value1;key2=value2,...". Only files with these properties are affected.

| +| `--exclude-props` |

[Optional]
List of semicolon-separated(;) Artifactory properties specified as "key=value" (for example: "key1=value1;key2=value2;key3=value3"). Only artifacts without all of the specified properties names and values will be affected.

| +| `--recursive` |

[Default: true]
When false, artifacts inside sub-folders in Artifactory will not be affected.

| +| `--build` |

[Optional]
If specified, only artifacts of the specified build are matched. The property format is build-name/build-number. If you do not specify the build number, the artifacts are filtered by the latest build number.

| +| `--bundle` |

[Optional]
If specified, only artifacts of the specified bundle are matched. The value format is bundle-name/bundle-version.

| +| `--include-dirs` |

[Default: false]
When true, the properties will also be set on folders (and not just files) in Artifactory.

| +| `--fail-no-op` |

[Default: false]
Set to true if you'd like the command to return exit code 2 in case of no files are affected.

| +| `--exclusions` | List of semicolon-separated(;) exclude patterns. Allows using wildcards. | +| `--sort-by` |

[Optional]
A list of semicolon-separated(;) fields to sort by. The fields must be part of the `items` AQL domain. For more information read the AQL documentation

| +| `--sort-order` |

[Default: asc]
The order by which fields in the 'sort-by' option should be sorted. Accepts `asc` or `desc`.

| +| `--limit` |

[Optional]
The maximum number of items to fetch. Usually used with the 'sort-by' option.

| +| `--offset` |

[Optional]
The offset from which to fetch items (i.e. how many items should be skipped). Usually used with the 'sort-by' option.

| +| `--archive-entries` |

[Optional]
If specified, only archive artifacts containing entries matching this pattern are matched. You can use wildcards to specify multiple artifacts.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--retries` |

[Default: 3]
Number of HTTP retry attempts.

| +| `--retry-wait-time` |

[Default: 0s]
Number of seconds or milliseconds to wait between retries. The numeric value should either end with s for seconds or ms for milliseconds (for example: 10s or 100ms).

| + + +### Examples + +#### Example 1 + +Remove the properties `version` and `release` from all the jar files in the maven-local repository. + +``` +jf rt delp "maven-local/*.jar" "version,release" +``` + +#### Example 2 + +Delete the properties `build` and `branch` from all tar.gz files in the devops-local repo. + +``` +jf rt delp "devops-local/*.tar.gz" "build,branch" +``` + +#### Example 3 + +Remove the properties `status`, `phase` and `stage` from all deb files that start with DEV in the debian-repository. + +``` +jf rt delp "debian-repository/DEV*.deb" "status,phase,stage" +``` + +#### Example 4 + +Delete the `environment` property from `/tests/local/block.rpm` in the centos-repo. + +``` +jf rt delp "centos-repo/tests/local/block.rpm" "environment" +``` + +#### Example 5 + +Remove the properties `component`, `layer` and `level` from files in the docker-hub repository. + +``` +jf rt delp "docker-hub/*" "component,layer,level" ``` diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/git-lfs.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/git-lfs.md index a5176d9..cbeb9de 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/git-lfs.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/git-lfs.md @@ -9,12 +9,12 @@ This command is used to clean up files from a Git LFS repository. This deletes a |-------------------|----------------------------------------------------------------------------------------------------------------------------------------------| | Command name | rt git-lfs-clean | | Abbreviation | rt glc | -| Command options | | -| --refs | \[Default: refs/remotes/\*] List of Git references in the form of "ref1,ref2,..." which should be preserved. | -| --repo | \[Optional] Local Git LFS repository in Artifactory which should be cleaned. If omitted, the repository is detected from the Git repository. | -| --quiet | \[Default: false] Set to true to skip the delete confirmation message. | -| --dry-run | \[Default: false] If true, cleanup is only simulated. No files are actually deleted. | -| Command arguments | If no arguments are passed in, the command assumes the .git repository is located at current directory. | +| **Command options:** | | +| `--refs` | \[Default: refs/remotes/\*] List of Git references in the form of "ref1,ref2,..." which should be preserved. | +| `--repo` | \[Optional] Local Git LFS repository in Artifactory which should be cleaned. If omitted, the repository is detected from the Git repository. | +| `--quiet` | \[Default: false] Set to true to skip the delete confirmation message. | +| `--dry-run` | \[Default: false] If true, cleanup is only simulated. No files are actually deleted. | +| **Command arguments:** | If no arguments are passed in, the command assumes the .git repository is located at current directory. | | path to .git | Path to the directory which includes the .git directory. | ## Examples diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/managing-configuration-entities.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/managing-configuration-entities.md index be8c0a6..9376772 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/managing-configuration-entities.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/managing-configuration-entities.md @@ -19,16 +19,16 @@ The CSV can include additional columns, with different headers, which will be ig ### Commands Params -| | | -|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt users-create | -| Abbreviation | rt uc | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --csv |

[Mandatory]

Path to a CSV file with the users' details. The first row of the file should include the name,password,email headers.

| -| --replace |

[Optional]

Set to true if you'd like existing users or groups to be replaced.

| -| --users-groups |

[Optional]

A list of comma-separated groups for the new users to be associated to.

| -| Command arguments | The command accepts no arguments | +| | | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt users-create | +| Abbreviation | rt uc | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--csv` |

[Mandatory]
Path to a CSV file with the users' details. The first row of the file should include the name,password,email headers.

| +| `--replace` |

[Optional]
Set to true if you'd like existing users or groups to be replaced.

| +| `--users-groups` |

[Optional]
A list of comma-separated(,) groups for the new users to be associated to.

| +| **Command arguments:** | The command accepts no arguments | ### Example @@ -55,15 +55,15 @@ The CSV can include additional columns, with different headers, which will be ig ### Commands Params -| | | -|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt users-delete | -| Abbreviation | rt udel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --csv |

[Optional]

Path to a csv file with the usernames to delete. The first row of the file is the reserved for the cells' headers. It must include the "username" header.

| -| Command arguments | | -| users list | Comma-separated list of usernames to delete. If the --csv command option is used, then this argument becomes optional. | +| | | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt users-delete | +| Abbreviation | rt udel | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--csv` |

[Optional]
Path to a csv file with the usernames to delete. The first row of the file is the reserved for the cells' headers. It must include the "username" header.

| +| **Command arguments:** | | +| users list | comma-separated(,) list of usernames to delete. If the --csv command option is used, then this argument becomes optional. | ### Examples #### Example 1 @@ -88,14 +88,14 @@ This command creates a new users group. ### Commands Params -| | | -|-------------------|-------------------------------------------------------------------------------------| -| Command-name | rt group-create | -| Abbreviation | rt gc | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| Command arguments | | -| group name | The name of the group to create. | +| | | +|-------------------|--------------------------------------------------------------------------------------| +| Command-name | rt group-create | +| Abbreviation | rt gc | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| **Command arguments:** | | +| group name | The name of the group to create. | ### Example @@ -111,15 +111,15 @@ This command adds a list fo existing users to a group. ### Commands Params -| | | -|-------------------|-------------------------------------------------------------------------------------| -| Command-name | rt group-add-users | -| Abbreviation | rt gau | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| Command arguments | | -| group name | The name of the group to add users to. | -| users list | Comma-seperated list of usernames to add to the specified group. | +| | | +|-------------------|--------------------------------------------------------------------------------------| +| Command-name | rt group-add-users | +| Abbreviation | rt gau | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| **Command arguments:** | | +| group name | The name of the group to add users to. | +| users list | Comma-seperated list of usernames to add to the specified group. | ### Example @@ -135,14 +135,14 @@ This command deletes a group. ### Commands Params -| | | -|-------------------|-------------------------------------------------------------------------------------| -| Command-name | rt group-delete | -| Abbreviation | rt gdel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| Command arguments | | -| group name | The name of the group to delete. | +| | | +|-------------------|--------------------------------------------------------------------------------------| +| Command-name | rt group-delete | +| Abbreviation | rt gdel | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| **Command arguments:** | | +| group name | The name of the group to delete. | ### Example @@ -154,7 +154,7 @@ jf rt group-delete "reviewers" ## Managing Repositories -JFrog CLI offers a set of commands for managing Artifactory repositories. You can create, update and delete repositories. To make it easier to manage repositories, the commands which create and update the repositories accept a pre-defined configuration template file. This template file can also include variables. which can be later replaced with values, when creating or updating the repositories. The configuration template file is created using the **jf rt repo-template** command. +JFrog CLI offers a set of commands for managing Artifactory repositories. You can create, update and delete repositories. To make it easier to manage repositories, the commands which create and update the repositories accept a pre-defined configuration template file. This template file can also include variables, which can be later replaced with values, when creating or updating the repositories. The configuration template file is created using the **jf rt repo-template** command. ### Creating or Configuration Template @@ -168,8 +168,8 @@ When using this command to create the template, you can also provide replaceable |-------------------|---------------------------------------------------------------------------------------------------------------| | Command-name | rt repo-template | | Abbreviation | rt rpt | -| Command options | The command has no options. | -| Command arguments | | +| **Command options:** | The command has no options. | +| **Command arguments:** | | | template path | Specifies the local file system path for the template file created by the command. The file should not exist. | #### Example @@ -198,15 +198,15 @@ These two commands create a new repository and updates an existing a repository. #### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt repo-create / rt repo-update | -| Abbreviation | rt rc / rt ru | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| -| Command arguments | | -| template path | Specifies the local file system path for the template file to be used for the repository creation. The template can be created using the "jf rt rpt" command. | +| | | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt repo-create / rt repo-update | +| Abbreviation | rt rc / rt ru | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| +| **Command arguments:** | | +| template path | Specifies the local file system path for the template file to be used for the repository creation. The template can be created using the "jf rt rpt" command. | #### Examples ##### Example 1 @@ -243,10 +243,10 @@ This command permanently deletes a repository, including all of its content. |-------------------|------------------------------------------------------------------------------------------------------------| | Command name | rt repo-delete | | Abbreviation | rt rdel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| Command arguments | | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--quiet` |

[Default: $CI]
Set to true to skip the delete confirmation message.

| +| **Command arguments:** | | | repository key | Specifies the repositories that should be removed. You can use wildcards to specify multiple repositories. | #### Example @@ -259,11 +259,11 @@ jf rt repo-delete generic-local ## Managing Replications -JFrog CLI offers commands creating and deleting replication jobs in Artifactory. To make it easier to create replication jobs, the commands which creates the replication job accepts a pre-defined configuration template file. This template file can also include variables. which can be later replaced with values, when creating the replication job. The configuration template file is created using the **jf rt replication-template** command. +JFrog CLI offers commands creating and deleting replication jobs in Artifactory. To make it easier to create replication jobs, the commands which creates the replication job accepts a pre-defined configuration template file. This template file can also include variables, which can be later replaced with values, when creating the replication job. The configuration template file is created using the **jf rt replication-template** command. ### Creating a Configuration Template -This command creates a configuration template file, which should be used as an argument for the **jf rt replication-create** command. +This command creates a configuration template file, which will be used as an argument for the **jf rt replication-create** command. When using this command to create the template, you can also provide replaceable variable, instead of fixes values. Then, when the template is used to create replication jobs, values can be provided to replace the variables in the template. @@ -273,8 +273,8 @@ When using this command to create the template, you can also provide replaceable |-------------------|---------------------------------------------------------------------------------------------------------------| | Command-name | rt replication-template | | Abbreviation | rt rplt | -| Command options | The command has no options. | -| Command arguments | | +| **Command options:** | The command has no options. | +| **Command arguments:** | | | template path | Specifies the local file system path for the template file created by the command. The file should not exist. | #### Example @@ -287,7 +287,7 @@ Select replication job type (press Tab for options): push Enter source repo key > ${source} Enter target repo key > ${target} Enter target server id (press Tab for options): my-server-id -Enter cron expression for frequency (for example, 0 0 12 * * ? will replicate daily) > 0 0 12 * * ? +Enter cron expression for frequency (for example: 0 0 12 * * ? will replicate daily) > 0 0 12 * * ? You can type ":x" at any time to save and exit. Select the next property > :x [Info] Replication creation config template successfully created at template.json. @@ -302,15 +302,15 @@ This command creates a new replication job for a repository. The command accepts #### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | replication-create | -| Abbreviation | rt rplc | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| -| Command arguments | | -| template path | Specifies the local file system path for the template file to be used for the replication job creation. The template can be created using the "jf rt rplt" command. | +| | | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | replication-create | +| Abbreviation | rt rplc | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| +| **Command arguments:** | | +| template path | Specifies the local file system path for the template file to be used for the replication job creation. The template can be created using the "jf rt rplt" command. | #### Examples ##### Example 1 @@ -335,15 +335,15 @@ This command permanently deletes a replication jobs from a repository. #### Commands Params -| | | -|-------------------|-------------------------------------------------------------------------------------| -| Command name | rt replication-delete | -| Abbreviation | rt rpldel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| Command arguments | | -| repository key | The repository from which the replications will be deleted. | +| | | +|-------------------|--------------------------------------------------------------------------------------| +| Command name | rt replication-delete | +| Abbreviation | rt rpldel | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--quiet` |

[Default: $CI]
Set to true to skip the delete confirmation message.

| +| **Command arguments:** | | +| repository key | The repository from which the replications will be deleted. | #### Example @@ -355,44 +355,46 @@ jf rt rpldel my-repo-name ## Managing Permission Targets -JFrog CLI offers commands creating, updating and deleting permission targets in Artifactory. To make it easier to create and update permission targets, the commands which create and update the permission targets accept a pre-defined configuration template file. This template file can also include variables. which can be later replaced with values, when creating or updating the permission target. The configuration template file is created using the **jf rt permission-target-template** command. +JFrog CLI offers commands creating, updating and deleting permission targets in Artifactory. To make it easier to create and update permission targets, the commands which create and update the permission targets accept a pre-defined configuration template file. This template file can also include variables, which can be later replaced with values, when creating or updating the permission target. The configuration template file is created using the **jf rt permission-target-template** command. ### Creating a Configuration Template -This command creates a configuration template file, which should be used as an argument for the **jf rt permission-target-create** and **jf rt permission-target-update** commands. +This command creates a configuration template file, which will be used as an argument for the **jf rt permission-target-create** and **jf rt permission-target-update** commands. | | | |-------------------|---------------------------------------------------------------------------------------------------------------| | Command-name | rt permission-target-template | | Abbreviation | rt ptt | -| Command options | The command has no options. | -| Command arguments | | +| **Command options:** | The command has no options. | +| **Command arguments:** | | | template path | Specifies the local file system path for the template file created by the command. The file should not exist. | ### Creating / Updating Permission Targets -This command creates a new permission target. The command accepts as an argument a configuration template, which can be created by the **jf rt permission-target-template** command. The template also supports variables, which can be replaced with values, provided when it is used. +These commands create/update a permission target. The commands accept as an argument a configuration template, which should be created by the **jf rt permission-target-template** command beforehand. The template also supports variables, which can be replaced with values, provided when it is used. -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | permission-target-create / permission-target-update | -| Abbreviation | rt ptc / rt ptu | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| -| Command arguments | | -| template path | Specifies the local file system path for the template file to be used for the permission target creation or update. The template can be created using the "jf rt ptt" command. | +| | | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | permission-target-create / permission-target-update | +| Abbreviation | rt ptc / rt ptu | +| **Command arguments:** | | +| template path | Specifies the local file system path for the template file to be used for the permission target creation or update. The template should be created using the "jf rt ptt" command. | +| Command-name | permission-target-create / permission-target-update | +| Abbreviation | rt ptc / rt ptu | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the template. In the template, the variables should be used as follows: ${key1}.

| ### Deleting Permission Targets This command permanently deletes a permission target. -| | | -|------------------------|-------------------------------------------------------------------------------------| -| Command name | rt permission-target-delete | -| Abbreviation | rt ptdel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| Command arguments | | -| permission target name | The permission target that should be removed. | +| | | +|------------------------|--------------------------------------------------------------------------------------| +| Command name | rt permission-target-delete | +| Abbreviation | rt ptdel | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--quiet` |

[Default: $CI]
Set to true to skip the delete confirmation message.

| +| **Command arguments:** | | +| permission target name | The permission target that should be removed. | diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration.md index f42e203..3a867ef 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration.md @@ -9,23 +9,23 @@ JFrog CLI includes integration with Maven, allowing you to resolve dependencies Before using the **jf mvn** command, the project needs to be pre-configured with the Artifactory server and repositories, to be used for building and publishing the project. The **jf mvn-config** command should be used once to add the configuration to the project. The command should run while inside the root directory of the project. The configuration is stored by the command in the **.jfrog** directory at the root directory of the project. -| | | -|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | mvn-config | -| Abbreviation | mvnc | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Server ID for resolution. The server should configured using the 'jf rt c' command.

| -| --server-id-deploy |

[Optional]

Server ID for deployment. The server should be configured using the 'jf rt c' command.

| -| --repo-resolve-releases |

[Optional]

Resolution repository for release dependencies.

| -| --repo-resolve-snapshots |

[Optional]

Resolution repository for snapshot dependencies.

| -| --repo-deploy-releases |

[Optional]

Deployment repository for release artifacts.

| -| --repo-deploy-snapshots |

[Optional]

Deployment repository for snapshot artifacts.

| -| --include-patterns |

[Optional]

Filter deployed artifacts by setting a wildcard pattern that specifies which artifacts to include. You may provide multiple patterns separated by a comma followed by a white-space. For example

artifact-.jar, artifact-.pom

| -| --exclude-patterns |

[Optional]

Filter deployed artifacts by setting a wildcard pattern that specifies which artifacts to exclude. You may provide multiple patterns separated by a comma followed by a white-space. For example

artifact--test.jar, artifact--test.pom

| -| --scan |

[Default: false]

Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| -| --format |

[Default: table]

Should be used with the --scan option. Defines the scan output format. Accepts table or json as values.

| -| Command arguments | The command accepts no arguments | +| | | +|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | mvn-config | +| Abbreviation | mvnc | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Server ID for resolution. The server should configured using the 'jf rt c' command.

| +| `--server-id-deploy` |

[Optional]
Server ID for deployment. The server should be configured using the 'jf rt c' command.

| +| `--repo-resolve-releases` |

[Optional]
Resolution repository for release dependencies.

| +| `--repo-resolve-snapshots` |

[Optional]
Resolution repository for snapshot dependencies.

| +| `--repo-deploy-releases` |

[Optional]
Deployment repository for release artifacts.

| +| `--repo-deploy-snapshots` |

[Optional]
Deployment repository for snapshot artifacts.

| +| `--include-patterns` |

[Optional]
Filter deployed artifacts by setting a wildcard pattern that specifies which artifacts to include. You may provide multiple comma-separated(,) patterns followed by a white-space. For example

artifact-.jar, artifact-.pom

| +| `--exclude-patterns` |

[Optional]
Filter deployed artifacts by setting a wildcard pattern that specifies which artifacts to exclude. You may provide multiple comma-separated(,) followed by a white-space. For example

artifact--test.jar, artifact--test.pom

| +| `--scan` |

[Default: false]
Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| +| `--format` |

[Default: table]
Should be used with the --scan option. Defines the scan output format. Accepts table or json as values.

| +| **Command arguments:** | The command accepts no arguments | ### Running maven @@ -33,27 +33,27 @@ The **mvn** command triggers the maven client, while resolving dependencies and > **Note**: Before running the **mvn** command on a project for the first time, the project should be configured with the **jf mvn-config** command. -> **Note**: If the machine running JFrog CLI has no access to the internet, make sure to read the [Downloading the Maven and Gradle Extractor JARs](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory#downloading-the-maven-and-gradle-extractor-jars) section. +> **Note**: If the machine running JFrog CLI has no access to the internet, make sure to read the [Downloading the Maven and Gradle Extractor JARs](#downloading-the-maven-and-gradle-extractor-jars) section. #### Commands Params The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | mvn | -| Abbreviation | mvn | -| Command options | | -| --threads |

[Default: 3]

Number of threads for uploading build artifacts.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | The command accepts the same arguments and options as the mvn client. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | mvn | +| Abbreviation | mvn | +| **Command options:** | | +| `--threads` |

[Default: 3]
Number of threads for uploading build artifacts.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| **Command arguments:** | The command accepts the same arguments and options as the mvn client. | #### Deploying Maven Artifacts -The deployment to Artifacts is triggered both by the deployment and install phases. To disable artifacts deployment, add\*\* **-Dartifactory.publish.artifacts=false** to the list of goals and options. For example: "**clean install**\*\*-Dartifactory.publish.artifacts=false"\*\* +The deployment to Artifacts is triggered both by the deployment and install phases. To disable artifacts deployment, add **-Dartifactory.publish.artifacts=false** to the list of goals and options. For example: "**jf mvn clean install -Dartifactory.publish.artifacts=false**" #### Example @@ -61,7 +61,7 @@ The deployment to Artifacts is triggered both by the deployment and install phas Run clean and install with maven. ``` -jf mvn clean install -f path/to/pom-file +jf mvn clean install -f /path/to/pom.xml ``` ## Running Gradle Builds @@ -72,25 +72,25 @@ JFrog CLI includes integration with Gradle, allowing you to resolve dependencies Before using the **gradle** command, the project needs to be pre-configured with the Artifactory server and repositories, to be used for building and publishing the project. The **gradle-config** command should be used once to add the configuration to the project. The command should run while inside the root directory of the project. The configuration is stored by the command in the\*\*.jfrog\*\* directory at the root directory of the project. -| | | -|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | gradle-config | -| Abbreviation | gradlec | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Server ID for resolution. The server should configured using the 'jf c add' command.

| -| --server-id-deploy |

[Optional]

Server ID for deployment. The server should be configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| -| --repo-deploy |

[Optional]

Repository for artifacts deployment.

| -| --uses-plugin |

[Default: false]

Set to true if the Gradle Artifactory Plugin is already applied in the build script.

| -| --use-wrapper |

[Default: false]

Set to true if you'd like to use the Gradle wrapper.

| -| --deploy-maven-desc |

[Default: true]

Set to false if you do not wish to deploy Maven descriptors.

| -| --deploy-ivy-desc |

[Default: true]

Set to false if you do not wish to deploy Ivy descriptors.

| -| --ivy-desc-pattern |

[Default: '[organization]/[module]/ivy-[revision].xml'

Set the deployed Ivy descriptor pattern.

| -| --ivy-artifacts-pattern |

[Default: '[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'

Set the deployed Ivy artifacts pattern.

| -| --scan |

[Default: false]

Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| -| --format |

[Default: table]

Should be used with the --scan option. Defines the scan output format. Accepts table or json as values.

| -| Command arguments | The command accepts no arguments | +| | | +|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | gradle-config | +| Abbreviation | gradlec | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--server-id-deploy` |

[Optional]
Server ID for deployment. The server should be configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| `--repo-deploy` |

[Optional]
Repository for artifacts deployment.

| +| `--uses-plugin` |

[Default: false]
Set to true if the Gradle Artifactory Plugin is already applied in the build script.

| +| `--use-wrapper` |

[Default: false]
Set to true if you'd like to use the Gradle wrapper.

| +| `--deploy-maven-desc` |

[Default: true]
Set to false if you do not wish to deploy Maven descriptors.

| +| `--deploy-ivy-desc` |

[Default: true]
Set to false if you do not wish to deploy Ivy descriptors.

| +| `--ivy-desc-pattern` |

[Default: '[organization]/[module]/ivy-[revision].xml'

Set the deployed Ivy descriptor pattern.

| +| `--ivy-artifacts-pattern` |

[Default: '[organization]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'

Set the deployed Ivy artifacts pattern.

| +| `--scan` |

[Default: false]
Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| +| `--format` |

[Default: table]
Should be used with the --scan option. Defines the scan output format. Accepts table or json as values.

| +| **Command arguments:** | The command accepts no arguments | ### Running gradle @@ -98,22 +98,22 @@ The **jf gradle** command triggers the gradle client, while resolving dependenci > **Note**: Before running the **jf gradle** command on a project for the first time, the project should be configured with the **jf gradle-config** command. -> **Note**: If the machine running JFrog CLI has no access to the internet, make sure to read the [Downloading the Maven and Gradle Extractor JARs](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory#downloading-the-maven-and-gradle-extractor-jars) section. +> **Note**: If the machine running JFrog CLI has no access to the internet, make sure to read the [Downloading the Maven and Gradle Extractor JARs](#downloading-the-maven-and-gradle-extractor-jars)section. #### Commands Params The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | gradle | -| Abbreviation | gradle | -| Command options | | -| --threads |

[Default: 3]

Number of threads for uploading build artifacts.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| Command arguments | The command accepts the same arguments and options as the gradle client. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | gradle | +| Abbreviation | gradle | +| **Command options:** | | +| `--threads` |

[Default: 3]
Number of threads for uploading build artifacts.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| **Command arguments:** | The command accepts the same arguments and options as the gradle client. | #### Example @@ -172,18 +172,18 @@ Running **jf docker pull** command allows pulling docker images from Artifactory The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | docker pull | -| Abbreviation | dpl | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --skip-login |

[Default: false]

Set to true if you'd like the command to skip performing docker login.

| -| Command arguments | The same arguments and options supported by the docker client/ | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | docker pull | +| Abbreviation | dpl | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--skip-login` |

[Default: false]
Set to true if you'd like the command to skip performing docker login.

| +| **Command arguments:** | The same arguments and options supported by the docker client/ | #### Example @@ -203,20 +203,20 @@ After building your image using the docker client, the **jf docker push** comman The following table lists the command arguments and flags: -| | | -|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | docker push | -| Abbreviation | dp | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --skip-login |

[Default: false]

Set to true if you'd like the command to skip performing docker login.

| -| --threads |

[Default: 3]

Number of working threads.

| -| --detailed-summary |

[Default: false]

Set true to include a list of the affected files as part of the command output summary.

| -| Command arguments | The same arguments and options supported by the docker client/ | +| | | +|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | docker push | +| Abbreviation | dp | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--skip-login` |

[Default: false]
Set to true if you'd like the command to skip performing docker login.

| +| `--threads` |

[Default: 3]
Number of working threads.

| +| `--detailed-summary` |

[Default: false]
Set true to include a list of the affected files as part of the command output summary.

| +| **Command arguments:** | The same arguments and options supported by the docker client/ | #### Example @@ -236,20 +236,20 @@ You can then publish the build-info collected by the **docker-push** command to The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt podman-pull | -| Abbreviation | rt ppl | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --skip-login |

[Default: false]

Set to true if you'd like the command to skip performing docker login.

| -| Command argument | | -| Image tag | The docker image tag to pull. | -| Source repository | Source repository in Artifactory. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt podman-pull | +| Abbreviation | rt ppl | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--skip-login` |

[Default: false]
Set to true if you'd like the command to skip performing docker login.

| +| Command argument | | +| Image tag | The docker image tag to pull. | +| Source repository | Source repository in Artifactory. | #### Example @@ -269,22 +269,22 @@ You can then publish the build-info collected by the **podman-pull** command to The following table lists the command arguments and flags: -| | | -|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt podman-push | -| Abbreviation | rt pp | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --skip-login |

[Default: false]

Set to true if you'd like the command to skip performing docker login.

| -| --threads |

[Default: 3]

Number of working threads.

| -| --detailed-summary |

[Default: false]

Set to true to include a list of the affected files as part of the command output summary.

| -| Command argument | | -| Image tag | The docker image tag to push. | -| Target repository | Target repository in Artifactory. | +| | | +|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt podman-push | +| Abbreviation | rt pp | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--skip-login` |

[Default: false]
Set to true if you'd like the command to skip performing docker login.

| +| `--threads` |

[Default: 3]
Number of working threads.

| +| `--detailed-summary` |

[Default: false]
Set to true to include a list of the affected files as part of the command output summary.

| +| Command argument | | +| Image tag | The docker image tag to push. | +| Target repository | Target repository in Artifactory. | #### Example @@ -321,21 +321,21 @@ The **build-docker-create** command allows adding a docker image, which is alrea |-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Command-name | rt build-docker-create | | Abbreviation | rt bdc | -| Command options | | -| --image-file |

Path to a file which includes one line in the following format: IMAGE-TAG@sha256:MANIFEST-SHA256. For example:

cat image-file-details
superfrog-docker.jfrog.io/hello-frog@sha256:30f04e684493fb5ccc030969df6de0

| -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --skip-login |

[Default: false]

Set to true if you'd like the command to skip performing docker login.

| -| --threads |

[Default: 3]

Number of working threads.

| +| **Command options:** | | +| `--image-file` |

Path to a file which includes one line in the following format: IMAGE-TAG@sha256:MANIFEST-SHA256. For example:

cat image-file-details
superfrog-docker.jfrog.io/hello-frog@sha256:30f04e684493fb5ccc030969df6de0

| +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--skip-login` |

[Default: false]
Set to true if you'd like the command to skip performing docker login.

| +| `--threads` |

[Default: 3]
Number of working threads.

| | Command argument | | | Target repository | The name of the repository to which the image was pushed. | #### Example -In this example, a Docker image that has already been deployed to Artifactory is incorporated into a locally created, unpublished build-info identified by the build name 'myBuild' and build number '1'. This local build-info can subsequently be published to Artifactory using the command 'jf rt bp myBuild 1'. +In this example, a Docker image that has already been deployed to Artifactory is incorporated into a locally created, unpublished build-info identified by the build name `myBuild` and build number '1'. This local build-info can subsequently be published to Artifactory using the command 'jf rt bp myBuild 1'. ``` jf rt bdc docker-local --image-file image-file-details --build-name myBuild --build-number 1 @@ -354,20 +354,20 @@ Promotion is the action of moving or copying a group of artifacts from one repos The following table lists the command arguments and flags: -| | | -|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | rt docker-promote | -| Abbreviation | rt dpr | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the config command. If not specified, the default configured Artifactory server is used.

| -| --copy |

[Default: false]

If set true, the Docker image is copied to the target repository, otherwise it is moved.

| -| --source-tag |

[Optional]

The tag name to promote.

| -| --target-docker-image |

[Optional]

Docker target image name.

| -| --target-tag |

[Optional]

The target tag to assign the image after promotion.

| -| Command argument | | -| source docker image | The docker image name to promote. | -| source repository | Source repository in Artifactory. | -| target repository | Target repository in Artifactory. | +| | | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | rt docker-promote | +| Abbreviation | rt dpr | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the 'jf config' command. If not specified, the default configured Artifactory server is used.

| +| `--copy` |

[Default: false]
If set true, the Docker image is copied to the target repository, otherwise it is moved.

| +| `--source-tag` |

[Optional]
The tag name to promote.

| +| `--target-docker-image` |

[Optional]
Docker target image name.

| +| `--target-tag` |

[Optional]
The target tag to assign the image after promotion.

| +| Command argument | | +| source docker image | The docker image name to promote. | +| source repository | Source repository in Artifactory. | +| target repository | Target repository in Artifactory. | #### Examples @@ -396,17 +396,17 @@ Artifactory version 5.5.2 and above. Before using the **jf npm install**, **jf npm ci** and **jf npm publish** commands, the project needs to be pre-configured with the Artifactory server and repositories, to be used for building and publishing the project. The **jf npm-config** command should be used once to add the configuration to the project. The command should run while inside the root directory of the project. The configuration is stored by the command in the **.jfrog** directory at the root directory of the project. -| | | -|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | npm-config | -| Abbreviation | npmc | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| -| --server-id-deploy |

[Optional]

Artifactory server ID for deployment. The server should be configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| -| --repo-deploy |

[Optional]

Repository for artifacts deployment.

| -| Command arguments | The command accepts no arguments | +| | | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | npm-config | +| Abbreviation | npmc | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--server-id-deploy` |

[Optional]
Artifactory server ID for deployment. The server should be configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| `--repo-deploy` |

[Optional]
Repository for artifacts deployment.

| +| **Command arguments:** | The command accepts no arguments | ### Installing Npm Packages @@ -418,20 +418,20 @@ Before running the **jf npm install** or **jf npm ci** command on a project for The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | npm | -| Abbreviation | | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --threads |

[Default: 3]

Number of working threads for build-info collection.

| -| Command arguments | The command accepts the same arguments and options as the npm client. | -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| Command arguments | The command accepts the same arguments and options as the npm client. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | npm | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--threads` |

[Default: 3]
Number of working threads for build-info collection.

| +| **Command arguments:** | The command accepts the same arguments and options as the npm client. | +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| **Command arguments:** | The command accepts the same arguments and options as the npm client. | #### Examples ##### Example 1 @@ -470,19 +470,19 @@ Before running the **npm-publish** command on a project for the first time, the The following table lists the command arguments and flags: -| | | -|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | npm publish | -| Abbreviation | | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --detailed-summary |

[Default: false]

Set true to include a list of the affected files as part of the command output summary.

| -| --scan |

[Default: false]

Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| -| --format |

[Default: table]

Should be used with the --scan option. Defines the scan output format. Accepts table or JSON as values.

| -| Command argument | The command accepts the same arguments and options that the **npm pack** command expects. | +| | | +|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | npm publish | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--detailed-summary` |

[Default: false]
Set true to include a list of the affected files as part of the command output summary.

| +| `--scan` |

[Default: false]
Set if you'd like all files to be scanned by Xray on the local file system prior to the upload, and skip the upload if any of the files are found vulnerable.

| +| `--format` |

[Default: table]
Should be used with the --scan option. Defines the scan output format. Accepts table or JSON as values.

| +| Command argument | The command accepts the same arguments and options that the **npm pack** command expects. | #### Example @@ -502,15 +502,15 @@ Yarn version 2.4.0 and above is supported. Before using the **jf yarn** command, the project needs to be pre-configured with the Artifactory server and repositories, to be used for building the project. The **yarn-config** command should be used once to add the configuration to the project. The command should run while inside the root directory of the project. The configuration is stored by the command in the **.jfrog** directory at the root directory of the project. -| | | -|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | yarn-config | -| Abbreviation | yarnc | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| -| Command arguments | The command accepts no arguments | +| | | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | yarn-config | +| Abbreviation | yarnc | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| **Command arguments:** | The command accepts no arguments | ### Installing Npm Packages @@ -522,16 +522,16 @@ The **jf yarn** command executes the yarn client, to fetch the npm dependencies The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | yarn | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --threads |

[Default: 3]

Number of working threads for build-info collection.

| -| Command arguments | The command accepts the same arguments and options as the yarn client. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | yarn | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--threads` |

[Default: 3]
Number of working threads for build-info collection.

| +| **Command arguments:** | The command accepts the same arguments and options as the yarn client. | #### Examples ##### Example 1 @@ -579,16 +579,16 @@ Here's how you set the repositories. #### Commands Params -| | | -|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | go-config | -| Abbreviation | | -| Command options | | -| --global |

[Default false]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| -| --server-id-deploy |

[Optional]

Artifactory server ID for deployment. The server should be configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| -| --repo-deploy |

[Optional]

Repository for artifacts deployment.

| +| | | +|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | go-config | +| Abbreviation | | +| **Command options:** | | +| `--global` |

[Default false]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--server-id-deploy` |

[Optional]
Artifactory server ID for deployment. The server should be configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| `--repo-deploy` |

[Optional]
Repository for artifacts deployment.

| #### Examples ##### Example 1 @@ -617,18 +617,18 @@ The **go** command triggers the go client. The following table lists the command arguments and flags: -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | go | -| Abbreviation | go | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --no-fallback |

[Default: false]

Set to avoid downloading packages from the VCS, if they are missing in Artifactory.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| Command arguments | | -| Go command | The command accepts the same arguments and options as the go client. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | go | +| Abbreviation | go | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--no-fallback` |

[Default false]
Set to avoid downloading packages from the VCS, if they are missing in Artifactory.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| **Command arguments:** | | +| Go command | The command accepts the same arguments and options as the go client. | #### Examples ##### Example 1 @@ -661,18 +661,18 @@ The **jf go-publish** command packs and deploys the Go package to the designated The following table lists the command arguments and flags: -| | | -|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | go-publish | -| Abbreviation | gp | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| --detailed-summary |

[Default: false]

Set true to include a list of the affected files as part of the command output summary.

| -| Command argument | | -| Version | The version of the Go project that is being published | +| | | +|--------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | go-publish | +| Abbreviation | gp | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| `--detailed-summary` |

[Default: false]
Set true to include a list of the affected files as part of the command output summary.

| +| Command argument | | +| Version | The version of the Go project that is being published | #### Examples ##### Example 1 @@ -693,136 +693,194 @@ jf gp v1.2.3 --build-name my-build-name --build-number 1 ## Building Python Packages -JFrog CLI provides full support for building Python packages using the **pip** and **pipenv** and **poetry** package installers. This allows resolving python dependencies from Artifactory, while (for **pip** and **pipenv**) recording the downloaded packages. The downloaded packages are stored as dependencies in the build-info stored in Artifactory. +### Pip, Pipenv and Twine +JFrog CLI provides full support for building Python packages using the **pip** and **pipenv** package managers, and deploying distributions using **twine**. This allows resolving python dependencies from Artifactory, using for **pip** and **pipenv**, while recording the downloaded packages. +After installing and packaging the project, the distributions and wheels can be deployed to Artifactory using **twine**, while recording the uploaded packages. +The downloaded packages are stored as dependencies in the build-info stored in Artifactory, while the uploaded ones are stored as artifacts. -Once the packages are installed, the Python project can be then built and packaged using the pip, pipenv or poetry clients. Once built, the produced artifacts can be uploaded to Artifactory using JFrog CLI's upload command and registered as artifacts in the build-info. - -### Example projects +#### Example projects To help you get started, you can use [the sample projects on GitHub](https://github.com/jfrog/project-examples/tree/master/python-example). -### Setting Python repository +#### Setting Python repository Before you can use JFrog CLI to build your Python projects with Artifactory, you first need to set the repository for the project. Here's how you set the repositories. 1. 'cd' into the root of the Python project. -2. Run the **jf pip-config**, **jf pipenv-config** or **jf poetry-config** commands, depending on whether you're using the pip, pipenv or poetry clients. +2. Run the **jf pip-config** or **jf pipenv-config** commands, depending on whether you're using the **pip** or **pipenv** clients. -#### Commands Params +##### Commands Params -| | | -|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | pip-config / pipenv-config / poetry-config | -| Abbreviation | pipc / pipec / poc | -| Command options | | -| --global |

[Default false]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| +| | | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | pip-config / pipenv-config | +| Abbreviation | pipc / pipec | +| **Command options:** | | +| `--global` |

[Default false]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| `--server-id-deploy` |

[Optional]
Artifactory server ID for deployment. The server should configured using the 'jf c add' command.

| +| `--repo-deploy` |

[Optional]
Repository for artifacts deployment.

| -#### Examples -##### Example 1 +##### Examples +###### Example 1 -Set repositories for this Python project when using the pip client. +Set repositories for this Python project when using the pip client (for pipenv: `jf pipec`). ``` jf pipc ``` -##### Example 2 +###### Example 2 -Set repositories for all Python projects using the pip client on this machine. +Set repositories for all Python projects using the pip client on this machine (for pipenv: `jf pipec --global`). ``` jf pipc --global ``` -##### Example 3 +#### Installing Python packages -Set repositories for this Python project when using the pipenv client. +The **jf pip install** and **jf pipenv install** commands use the **pip** and **pipenv** clients respectively, to install the project dependencies from Artifactory. The **jf pip install** and **jf pipenv install** commands can also record these packages as build dependencies as part of the build-info published to Artifactory. -``` -jf pipec -``` +> **Note**: Before running the **pip install** and **pipenv install** commands on a project for the first time, the project should be configured using the **jf pip-config** or **jf pipenv-config** commands respectively. -##### Example 4 +**Recording all dependencies** -Set repositories for all Python projects using the poetry client on this machine. +JFrog CLI records the installed packages as build-info dependencies. The recorded dependencies are packages installed during the **jf pip install** and **jf pipenv install** command execution. When running the command inside a Python environment, which already has some of the packages installed, the installed packages will not be included as part of the build-info, because they were not originally installed by JFrog CLI. A warning message will be added to the log in this case. -``` -jf poc --global -``` +**How to include all packages in the build-info?** -##### Example 5 +The details of all the installed packages are always cached by the **jf pip install** and **jf pipenv install** command in the **.jfrog/projects/deps.cache.json** file, located under the root of the project. JFrog CLI uses this cache for including previously installed packages in the build-info.\ +If the Python environment had some packages installed prior to the first execution of the `install` command, those previously installed packages will be missing from the cache and therefore will not be included in the build-info. -Set repositories for this Python project when using the poetry client. +Running the `install` command with both the **no-cache-dir** and **force-reinstall** pip options, should re-download and install these packages, and they will therefore be included in the build-info and added to the cache. It is also recommended to run the command from inside a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/). + +##### Commands Params + +| | | +|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | pip / pipenv | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| Command argument | The command accepts the same arguments and options as the pip / pipenv clients. | + +##### Examples +###### Example 1 + +The following command triggers pip install, while recording the build dependencies as part of build name **my-build** and build number **1** . ``` -jf poc +jf pip install . --build-name my-build --build-number 1 ``` -##### Example 6 +###### Example 2 -Set repositories for all Python projects using the pipenv client on this machine. +The following command triggers pipenv install, while recording the build dependencies as part of build name **my-build** and build number **1** . ``` -jf pipec --global +jf pipenv install . --build-name my-build --build-number 1 ``` -### Installing Python packages +#### Publishing Python packages using Twine +The **jf twine upload** command uses the **twine**, to publish the project distributions to Artifactory. The **jf twine upload** command can also record these packages as build artifacts as part of the build-info published to Artifactory. -The **jf pip install**, **jf pipenv install** and **jf poetry install** commands use the **pip**, **pipenv** and **poetry** clients respectively, to install the project dependencies from Artifactory. The **jf pip install** and **jf pipenv install** commands can also record these packages as build dependencies as part of the build-info published to Artifactory. +> **Note**: Before running the **twine upload** command on a project for the first time, the project should be configured using the **jf pip-config** or **jf pipenv-config** commands, with deployer configuration. -> **Note**: Before running the **pip install**, **pipenv install** and **poetry install** commands on a project for the first time, the project should be configured using the **jf pip-config** ,**jf pipenv-config** or **jf poetry-config** commands respectively. +##### Commands Params -**Recording all dependencies** - currently available for pip and pipenv. +| | | +|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | twine | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| Command argument | The command accepts the arguments and options supported by twine client, except for repository configuration and authentication options. | -JFrog CLI records the installed packages as build-info dependencies. The recorded dependencies are packages installed during the **jf pip install** and **jf pipenv install** command execution. When running the command inside a Python environment, which already has some of the packages installed, the installed packages will not be included as part of the build-info, because they were not originally installed by JFrog CLI. A warning message will be added to the log in this case. +##### Examples +###### Example 1 -**How to include all packages in the build-info?** +The following command triggers twine upload, while recording the build artifacts as part of build name **my-build** and build number **1** . -The details of all the installed packages are always cached by the **jf pip install** and **jf pipenv install** command in the **.jfrog/projects/deps.cache.json** file, located under the root of the project. JFrog CLI uses this cache for including previously installed packages in the build-info.\ -If the Python environment had some packages installed prior to the first execution of the 'install' command, those previously installed packages will be missing from the cache and therefore will not be included in the build-info. +``` +jf twine upload "dist/*" --build-name my-build --build-number 1 +``` -Running the 'install' command with both the **no-cache-dir** and **force-reinstall** pip options, should re-download and install these packages, and they will therefore be included in the build-info and added to the cache. It is also recommended to run the command from inside a [virtual environment](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/). +### Poetry +JFrog CLI provides partial support for building Python packages using the **poetry** package manager. This allows resolving python dependencies from Artifactory, but currently does NOT record downloaded packages as dependencies in the build-info. -#### Commands Params +#### Setting Python repository -| | | -|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | pip / pipenv / poetry | -| Abbreviation | | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| Command argument | The command accepts the same arguments and options as the pip / pipenv / poetry clients. | +Before you can use JFrog CLI to build your Python projects with Artifactory, you first need to set the repository for the project. -#### Examples -##### Example 1 +Here's how you set the repositories. -The following command triggers pip install, while recording the build dependencies as part of build name **my-build** and build number **1** . +1. 'cd' into the root of the Python project. +2. Run the **jf poetry-config** command as follows. + +##### Commands Params + +| | | +|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | poetry-config | +| Abbreviation | poc | +| **Command options:** | | +| `--global` |

[Default false]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| + +##### Examples +###### Example 1 + +Set repositories for this Python project when using the poetry client. ``` -jf pip install . --build-name my-build --build-number 1 +jf poc ``` -##### Example 2 +###### Example 2 -The following command triggers pipenv install, while recording the build dependencies as part of build name **my-build** and build number **1** . +Set repositories for all Python projects using the poetry client on this machine. ``` -jf pipenv install . --build-name my-build --build-number 1 +jf poc --global ``` -##### Example 3 +#### Installing Python packages + +The **jf poetry install** commands use the **poetry** client to install the project dependencies from Artifactory. + +> **Note**: Before running the **poetry install** command on a project for the first time, the project should be configured using the **jf poetry-config** command. + +##### Commands Params + +| | | +|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | poetry | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| Command argument | The command accepts the same arguments and options as the poetry clients. | + +##### Examples +###### Example 1 -The following are command triggers poetry install, while recording the build dependencies as part of build name **my-build** and build number **1** . +The following command triggers poetry install, while resolving dependencies from Artifactory. ``` -jf poetry install . --build-name my-build --build-number 1 +jf poetry install . ``` ## Building NuGet Packages @@ -842,16 +900,16 @@ Before using the nuget or dotnet commands, the **nuget-config** or **dotnet-conf The following table lists the commands' options: -| | | -|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | nuget-config / dotnet-config | -| Abbreviation | nugetc / dotnetc | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-resolve |

[Optional]

Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| -| --repo-resolve |

[Optional]

Repository for dependencies resolution.

| -| --nuget-v2 |

[Default: false]
Set to true if you'd like to use the NuGet V2 protocol when restoring packages from Artifactory (instead of NuGet V3).

| -| Command arguments | The command accepts no arguments | +| | | +|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | nuget-config / dotnet-config | +| Abbreviation | nugetc / dotnetc | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-resolve` |

[Optional]
Artifactory server ID for resolution. The server should configured using the 'jf c add' command.

| +| `--repo-resolve` |

[Optional]
Repository for dependencies resolution.

| +| --nuget-v2 |

[Default: false]
Set to true if you'd like to use the NuGet V2 protocol when restoring packages from Artifactory (instead of NuGet V3).

| +| **Command arguments:** | The command accepts no arguments | ### Running Nuget and Dotnet commands @@ -865,16 +923,16 @@ The **nuget** command runs the **NuGet client** and the **dotnet** command runs The following table lists the commands arguments and options: -| | | -|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | nuget / dotnet | -| Abbreviation | | -| Command options | | -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project |

[Optional]

JFrog project key.

| -| --module |

[Optional]

Optional module name for the build-info.

| -| Command argument | The command accepts the same arguments and options as the NuGet client / .NET Core CLI. | +| | | +|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | nuget / dotnet | +| Abbreviation | | +| **Command options:** | | +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` |

[Optional]
JFrog project key.

| +| `--module` |

[Optional]
Optional module name for the build-info.

| +| Command argument | The command accepts the same arguments and options as the NuGet client / .NET Core CLI. | #### Examples ##### Example 1 @@ -923,15 +981,15 @@ The **jf terraform-config** command will store the repository name inside the ** The following table lists the command options: -| | | -|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | terraform-config | -| Abbreviation | tfc | -| Command options | | -| --global |

[Optional]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| -| --server-id-deploy |

[Optional]

Artifactory server ID for deployment. The server should configured using the 'jf c add' command.

| -| --repo-deploy |

[Optional]

Repository for artifacts deployment.

| -| Command arguments | The command accepts no arguments | +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | terraform-config | +| Abbreviation | tfc | +| **Command options:** | | +| `--global` |

[Optional]
Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

| +| `--server-id-deploy` |

[Optional]
Artifactory server ID for deployment. The server should configured using the 'jf c add' command.

| +| `--repo-deploy` |

[Optional]
Repository for artifacts deployment.

| +| **Command arguments:** | The command accepts no arguments | #### Examples ##### Example 1 @@ -958,19 +1016,19 @@ The **terraform publish** command creates a terraform package for the module in The following table lists the commands arguments and options: -| | | -|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | terraform publish | -| Abbreviation | tf p | -| Command options | | -| --namespace |

[Mandatory]

Terraform module namespace

| -| --provider |

[Mandatory]

Terraform module provider

| -| --tag |

[Mandatory]

Terraform module tag

| -| --exclusions |

[Optional]

A list of Semicolon-separated exclude patterns wildcards. Paths inside the module matching one of the patterns are excluded from the deployed package.

| -| --build-name |

[Optional]

Build name. For more details, please refer to Build Integration.

| -| --build-number |

[Optional]

Build number. For more details, please refer to Build Integration.

| -| --project | | -| Command argument | The command accepts no arguments | +| | | +|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | terraform publish | +| Abbreviation | tf p | +| **Command options:** | | +| `--namespace` |

[Mandatory]
Terraform module namespace

| +| `--provider` |

[Mandatory]
Terraform module provider

| +| `--tag` |

[Mandatory]
Terraform module tag

| +| `--exclusions` |

[Optional]
A list of semicolon-separated(;) exclude patterns wildcards. Paths inside the module matching one of the patterns are excluded from the deployed package.

| +| `--build-name` |

[Optional]
Build name. For more details, please refer to Build Integration.

| +| `--build-number` |

[Optional]
Build number. For more details, please refer to Build Integration.

| +| `--project` | | +| Command argument | The command accepts no arguments | #### Examples ##### Example 1 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md index 173024a..26fe248 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/release-lifecycle-management.md @@ -94,20 +94,20 @@ The file spec may be of one of the following creation sources: ### Commands Params -| | | -|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-create | -| Abbreviation | rbc | -| Command options | | -| --project |

[Optional]

Project key associated with the created Release Bundle version.

| -| --server-id |

[Optional]

Platform server ID configured using the config command.

| -| --signing-key |

[Mandatory]

The GPG/RSA key-pair name given in Artifactory.

| -| --spec |

[Optional]

Path to a File Spec.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --sync |

[Default: false]

Set to true to run synchronously.

| -| Command arguments | | -| release bundle name | Name of the newly created Release Bundle. | -| release bundle version | Version of the newly created Release Bundle. | +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-create | +| Abbreviation | rbc | +| **Command arguments:** | | +| release bundle name | Name of the newly created Release Bundle. | +| release bundle version | Version of the newly created Release Bundle. | +| **Command options:** | | +| `--project` |

[Optional]
Project key associated with the created Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--signing-key` |

[Mandatory]
The GPG/RSA key-pair name given in Artifactory.

| +| `--spec` |

[Optional]
Path to a File Spec.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." (wrapped by quotes) to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--sync` |

[Default: false]
Set to true to run synchronously.

| | ### Examples #### Example 1 @@ -140,21 +140,21 @@ This command allows promoting a release bundle to a target environment. ### Commands Params -| | | -|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-promote | -| Abbreviation | rbp | -| Command options | | -| --input-repos |

[Optional]

A list of semicolon-separated repositories to include in the promotion. If this property is left undefined, all repositories (except those specifically excluded) are included in the promotion. If one or more repositories are specifically included, all other repositories are excluded.

| -| --exclude-repos |

[Optional]

A list of semicolon-separated repositories to exclude from the promotion.

| -| --project |

[Optional]

Project key associated with the Release Bundle version.

| -| --server-id |

[Optional]

Platform server ID configured using the config command.

| -| --signing-key |

[Mandatory]

The GPG/RSA key-pair name given in Artifactory.

| -| --sync |

[Default: false]

Set to true to run synchronously.

| -| Command arguments | | -| release bundle name | Name of the Release Bundle to promote. | -| release bundle version | Version of the Release Bundle to promote. | -| environment | Name of the target environment for the promotion. | +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-promote | +| Abbreviation | rbp | +| **Command arguments:** | | +| release bundle name | Name of the Release Bundle to promote. | +| release bundle version | Version of the Release Bundle to promote. | +| environment | Name of the target environment for the promotion. | +| **Command options:** | | +| `--input-repos` |

[Optional]
A list of semicolon-separated(;) repositories to include in the promotion. If this property is left undefined, all repositories (except those specifically excluded) are included in the promotion. If one or more repositories are specifically included, all other repositories are excluded.

| +| `--exclude-repos` |

[Optional]
A list of semicolon-separated(;) repositories to exclude from the promotion.

| +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--signing-key` |

[Mandatory]
The GPG/RSA key-pair name given in Artifactory.

| +| `--sync` |

[Default: false]
Set to true to run synchronously.

| | ### Examples #### Example 1 @@ -193,26 +193,26 @@ jf rbp --signing-key=myKeyPair --exclude-repos="generic-local;my-repo" myApp 1.0 This command distributes a release bundle to an edge node. -| | | -|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-distribute | -| Abbreviation | rbd | -| Command options | | -| --city |

[Default: *]

Wildcard filter for site city name.

| -| --country-codes |

[Default: *]

Semicolon-separated list of wildcard filters for site country codes.

| -| --create-repo |

[Default: false]

Set to true to create the repository on the edge if it does not exist.

| -| --dist-rules |

[Optional]

Path to a file, which includes the Distribution Rules in a JSON format. See the "Distribution Rules Structure" bellow.

| -| --dry-run |

[Default: false]

Set to true to disable communication with JFrog Distribution.

| -| --mapping-pattern |

[Optional]

Specify along with 'mapping-target' to distribute artifacts to a different path on the edge node. You can use wildcards to specify multiple artifacts.

| -| --mapping-target |

[Optional]

The target path for distributed artifacts on the edge node. If not specified, the artifacts will have the same path and name on the edge node, as on the source Artifactory server. For flexibility in specifying the distribution path, you can include [placeholders](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UsingPlaceholders) in the form of {1}, {2} which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis.

| -| --max-wait-minutes |

[Default: 60]

Max minutes to wait for sync distribution.

| -| --project |

[Optional]

Project key associated with the Release Bundle version.

| -| --server-id |

[Optional]

Platform server ID configured using the config command.

| -| --site |

[Default: *]

Wildcard filter for site name.

| -| --sync |

[Default: false]

Set to true to run synchronously.

| -| Command arguments | | -| release bundle name | Name of the release bundle to distribute. | -| release bundle version | Version of the release bundle to distribute. | +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-distribute | +| Abbreviation | rbd | +| **Command arguments:** | | +| release bundle name | Name of the release bundle to distribute. | +| release bundle version | Version of the release bundle to distribute. | +| **Command options:** | | +| `--city` |

[Default: *]
Wildcard filter for site city name.

| +| `--country-codes` |

[Default: *]
semicolon-separated(;) list of wildcard filters for site country codes.

| +| `--create-repo` |

[Default: false]
Set to true to create the repository on the edge if it does not exist.

| +| `--dist-rules` |

[Optional]
Path to a file, which includes the Distribution Rules in a JSON format. See the "Distribution Rules Structure" bellow.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with JFrog Distribution.

| +| `--mapping-pattern` |

[Optional]
Specify along with 'mapping-target' to distribute artifacts to a different path on the edge node. You can use wildcards to specify multiple artifacts.

| +| `--mapping-target` |

[Optional]
The target path for distributed artifacts on the edge node. If not specified, the artifacts will have the same path and name on the edge node, as on the source Artifactory server. For flexibility in specifying the distribution path, you can include [placeholders](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UsingPlaceholders) in the form of {1}, {2} which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis.

| +| `--max-wait-minutes` |

[Default: 60]
Max minutes to wait for sync distribution.

| +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--site` |

[Default: *]
Wildcard filter for site name.

| +| `--sync` |

[Default: false]
Set to true to run synchronously.

| | **Distribution Rules Structure** ```json @@ -247,21 +247,25 @@ The Distribution Rules format also supports wildcards. For example: ### Examples #### Example 1 Distribute the release bundle named myApp with version 1.0.0. Use the distribution rules defined in the specified file. - - jf rbd --dist-rules=/path/to/dist-rules.json myApp 1.0.0 +``` +jf rbd --dist-rules=/path/to/dist-rules.json myApp 1.0.0 +``` #### Example 2 Distribute the release bundle named myApp with version 1.0.0 using the default distribution rules. -Map files under the 'source' directory to be placed under the 'target' directory. +Map files under the `source` directory to be placed under the `target` directory. - jf rbd --dist-rules=/path/to/dist-rules.json --mapping-pattern="(*)/source/(*)" --mapping-target="{1}/target/{2}" myApp 1.0.0 +``` +jf rbd --dist-rules=/path/to/dist-rules.json --mapping-pattern="(*)/source/(*)" --mapping-target="{1}/target/{2}" myApp 1.0.0 +``` #### Example 3 -Synchronously distribute a release bundle associated with project "proj" - - jf rbd --dist-rules=/path/to/dist-rules.json --sync --project="proj" myApp 1.0.0 +Synchronously distribute a release bundle associated with project "proj" +``` +jf rbd --dist-rules=/path/to/dist-rules.json --sync --project="proj" myApp 1.0.0 +``` ## Deleting release bundle locally This command allows deleting all release bundle promotions to an environment or deleting a release bundle locally altogether. @@ -271,62 +275,130 @@ Deleting locally means distributions of the release bundle will not be deleted. |------------------------|----------------------------------------------------------------------------------------------------------------------------------------| | Command-name | release-bundle-delete-local | | Abbreviation | rbdell | -| Command options | | -| --project |

[Optional]

Project key associated with the Release Bundle version.

| -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| --server-id |

[Optional]

Platform server ID configured using the config command.

| -| --sync |

[Default: false]

Set to true to run synchronously.

| -| Command arguments | | +| **Command arguments:** | | | release bundle name | Name of the release bundle to distribute. | | release bundle version | Version of the release bundle to distribute. | | environment | If provided, all promotions to this environment are deleted. Otherwise, the release bundle is deleted locally with all its promotions. | +| **Command options:** | | +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--quiet` |

[Default: $CI]
Set to true to skip the delete confirmation message.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--sync` |

[Default: false]
Set to true to run synchronously.

| ### Examples #### Example 1 Locally delete the release bundle named myApp with version 1.0.0 altogether. - jf rbdell myApp 1.0.0 +``` +jf rbdell myApp 1.0.0 +``` #### Example 2 Delete a release bundle locally altogether. Run the command synchronously and skip the confirmation message. - jf rbdell --quiet --sync myApp 1.0.0 +``` +jf rbdell --quiet --sync myApp 1.0.0 +``` #### Example 3 Delete all promotions of the release bundle to environment "PROD". - jf rbdell myApp 1.0.0 PROD - +``` +jf rbdell myApp 1.0.0 PROD +``` ## Deleting release bundle remotely This command will delete distributions of a release bundle from edge nodes. -| | | -|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-delete-remote | -| Abbreviation | rbdelr | -| Command options | | -| --city |

[Default: *]

Wildcard filter for site city name.

| -| --country-codes |

[Default: *]

Semicolon-separated list of wildcard filters for site country codes.

| -| --dist-rules |

[Optional]

Path to a file, which includes the Distribution Rules in a JSON format. See the "Distribution Rules Structure" bellow.

| -| --dry-run |

[Default: false]

Set to true to disable communication with JFrog Distribution.

| -| --max-wait-minutes |

[Default: 60]

Max minutes to wait for sync distribution.

| -| --project |

[Optional]

Project key associated with the Release Bundle version.

| -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| --server-id |

[Optional]

Platform server ID configured using the config command.

| -| --site |

[Default: *]

Wildcard filter for site name.

| -| --sync |

[Default: false]

Set to true to run synchronously.

| -| Command arguments | | -| release bundle name | Name of the release bundle to distribute. | -| release bundle version | Version of the release bundle to distribute. | +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-delete-remote | +| Abbreviation | rbdelr | +| **Command arguments:** | | +| release bundle name | Name of the release bundle to distribute. | +| release bundle version | Version of the release bundle to distribute. | +| **Command options:** | | +| `--city` |

[Default: *]
Wildcard filter for site city name.

| +| `--country-codes` |

[Default: *]
semicolon-separated(;) list of wildcard filters for site country codes.

| +| `--dist-rules` |

[Optional]
Path to a file, which includes the Distribution Rules in a JSON format. See the "Distribution Rules Structure" bellow.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with JFrog Distribution.

| +| `--max-wait-minutes` |

[Default: 60]
Max minutes to wait for sync distribution.

| +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--quiet` |

[Default: $CI]
Set to true to skip the delete confirmation message.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| `--site` |

[Default: *]
Wildcard filter for site name.

| +| `--sync` |

[Default: false]
Set to true to run synchronously.

| ### Examples #### Example 1 Delete the distributions of release bundle named myApp with version 1.0.0 from edge nodes matching the provided distribution rules defined in the specified file. - jf rbd --dist-rules=/path/to/dist-rules.json myApp 1.0.0 +``` +jf rbd --dist-rules=/path/to/dist-rules.json myApp 1.0.0 +``` #### Example 2 Delete the distributions of the release bundle associated with project "proj" from the provided edge nodes. Run the command synchronously and skip the confirmation message. - jf rbd --dist-rules=/path/to/dist-rules.json --project="proj" --quiet --sync myApp 1.0.0 +``` +jf rbd --dist-rules=/path/to/dist-rules.json --project="proj" --quiet --sync myApp 1.0.0 +``` + +## Exporting Release Bundle archive +JFrog Lifecycle Management supports distributing your Release Bundles to remote Edge nodes within an air-gapped environment. This use case is mainly intended for organizations that have two or more JFrog instances that have no network connection between them. + +The following command allows exporting a Release Bundle as an archive to the filesystem that can be transferred to a different instance in an air-gapped environment. + +| | | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-export | +| Abbreviation | rbe | +| **Command arguments:** | | +| release bundle name | Name of the Release Bundle to export. | +| release bundle version | Version of the release bundle to export. | +| target pattern | The argument is optional and specifies the local file system target path.If the target path ends with a slash, the path is assumed to be a directory.For example, if you specify the target as "repo-name/a/b/", then "b" is assumed to be a directory into which files should be downloaded.If there is no terminal slash, the target path is assumed to be a file to which the downloaded file should be renamed.For example, if you specify the target as "a/b", the downloaded file is renamed to "b". | +| **Command options:** | | +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| +| mapping-pattern |

[Optional]
Specify a list of input regex mapping pairs that define where the queried artifact is located and where it should be placed after it is imported. Use this option if the path on the target is different than the source path. | +| mapping-target |

[Optional]
Specify a list of output regex mapping pairs that define where the queried artifact is located and where it should be placed after it is imported. Use this option if the path on the target is different than the source path. | +| split-count |

[Optional]
The maximum number of parts that can be concurrently uploaded per file during a multi-part upload. Set to 0 to disable multi-part upload. | +| min-split |

[Optional]
Minimum file size in KB to split into ranges when downloading. Set to -1 for no splits | + + +#### Example +Export release bundle named "myApp" and version 1.0.0 + +``` +jf rbe myApp 1.0.0 +``` + +#### Example +Download to a specific location + +``` +jf rbe myApp 1.0.0 /user/mybundle/ +``` + +## Importing Release Bundle archive +Import a Release Bundle archive from a release bundle exported zip file. + +Please note this functionality only works on Edge nodes within an air-gapped environment. + +| | | +|-------------------|-----------------------------------------------------------------------------------| +| Command-name | release-bundle-import | +| Abbreviation | rbi | +| **Command arguments:** | | +| path to archive | Path to the release bundle archive on the filesystem | +| **Command options:** | | +| `--project` |

[Optional]
Project key associated with the Release Bundle version.

| +| `--server-id` |

[Optional]
Platform Server ID configured using the 'jf config' command.

| + +#### Example +Import a Release Bundle named "myExportedApp" and version 1.0.0 + +``` +jf rbi ./myExportedApp.zip +``` + diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/transferring-files-between-artifactory-servers.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/transferring-files-between-artifactory-servers.md index c2c7033..17d9470 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/transferring-files-between-artifactory-servers.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/transferring-files-between-artifactory-servers.md @@ -100,7 +100,9 @@ To install the **data-transfer** user plugin on the source machine manually, fol Install JFrog CLI on your source instance by using one of the \[#JFrog CLI Installers]. For example: -`curl -fL https://install-cli.jfrog.io | sh` +```sh +curl -fL https://install-cli.jfrog.io | sh +``` **Note** @@ -152,9 +154,10 @@ Follows these steps to installing JFrog CLI on that machine. 1. Install JFrog CLI by using one of the \[#JFrog CLI Installers]. For example: - ``` + ```sh curl -fL https://install-cli.jfrog.io | sh ``` + 2. If your source instance is accessible only through an HTTP/HTTPS proxy, set the proxy environment variable as described \[#here]. 3. Configure the connection details of the source Artifactory instance with your admin credentials. Run the following command and follow the instructions. diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/verifying-artifactory-accessibility.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/verifying-artifactory-accessibility.md index 703ee7c..e6dfc37 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/verifying-artifactory-accessibility.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/verifying-artifactory-accessibility.md @@ -4,16 +4,16 @@ This command can be used to verify that Artifactory is accessible by sending an ## Commands Params -| | | -|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | rt ping | -| Abbreviation | rt p | -| | | -| Command options | | -| --url |

[Optional]

Artifactory URL.

| -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured Artifactory server is used.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | The command accepts no arguments. | +| | | +|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | rt ping | +| Abbreviation | rt p | +| | | +| **Command options:** | | +| `--url` |

[Optional]
JFrog Artifactory URL. (example: https://acme.jfrog.io/artifactory)

| +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured Artifactory server is used.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| **Command arguments:** | The command accepts no arguments. | ## Examples ### Example 1 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md index b27ba20..f0670d7 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer.md @@ -12,9 +12,27 @@ The Artifactory Transfer solution currently transfers the config and data of JFr In this page, we refer to the source self-hosted instance as the source instance, and the target JFrog Cloud instance as the target instance. -### Artifactory Version Support +### Noteworthy Details -The Artifactory Transfer solution is supported for any version of Artifactory 7.x and Artifactory version 6.23.21 and above. + * **Artifactory Version Support:** The Artifactory Transfer solution is supported for any version of Artifactory 7.x and Artifactory version 6.23.21 and above. If your current Artifactory version is not of compatible version, please consider upgrading the Artifactory instance. + * **Supported OS Platforms:** The transfer tool can help transfer the files and configuration from operating systems of all types, including Windows and Container environments. + +### Limitations + +The following limitations need to be kept in mind before you start the migration process + +1. The Archive Search Enabled feature is not supported on JFrog Cloud. +2. Artifactory System Properties are not transferred and JFrog Cloud defaults are applied after the transfer. +3. User plugins are not supported on JFrog Cloud. +4. Artifact Cold Storage is not supported in JFrog Cloud. +5. Artifacts in remote repositories caches are not transferred. +6. Federated repositories are transferred without their federation members. After the transfer, you'll need to reconfigure the federation as described in the Federated Repositories documentation. Federated Repositories +7. Docker repositories with names that include dots or underscores aren't allowed in JFrog Cloud. +8. Artifact properties with a value longer than 2.4K characters are not supported in JFrog Cloud. Such properties are generally seen in Conan artifacts. The artifacts will be transferred without the properties in this case. A report with these artifacts will become available to you at the end of the transfer. +9. The files transfer process allows transferring files that were created or modified on the source instance after the process started. However: + * Files that were deleted on the source instance after the process started, are not deleted on the target instance by the process. + * The custom properties of those files are also updated on the target instance. However, if only the custom properties of those files were modified on the source, but not the files' content, the properties are not modified on the target instance by the process. +10. When transferring files in build-info repositories, JFrog CLI limits the total of working threads to 8. This is done to limit the load on the target instance while transferring build-info. ### Transfer phases @@ -34,30 +52,15 @@ The transfer process includes two phases, that you must perform in the following You can do both steps while the source instance is in use. No downtime on the source instance is required while the transfer is in progress. -### Limitations - -The following limitations need to be kept in mind before you start the migration process - -1. The Archive Search Enabled feature is not supported on JFrog Cloud. -2. Artifactory System Properties are not transferred and JFrog Cloud defaults are applied after the transfer. -3. User plugins are not supported on JFrog Cloud. -4. Artifact Cold Storage is not supported in JFrog Cloud. -5. Artifacts in remote repositories caches are not transferred. -6. Federated repositories are transferred without their federation members. After the transfer, you'll need to reconfigure the federation as described in the Federated Repositories documentation. Federated Repositories -7. Docker repositories with names that include dots or underscores aren't allowed in JFrog Cloud. -8. Artifact properties with a value longer than 2.4K characters are not supported in JFrog Cloud. Such properties are generally seen in Conan artifacts. The artifacts will be transferred without the properties in this case. A report with these artifacts will become available to you at the end of the transfer. -9. The files transfer process allows transferring files that were created or modified on the source instance after the process started. However, files that were deleted on the source instance after the process started, are not deleted on the target instance by the process. -10. The files transfer process allows transferring files that were created or modified on the source instance after the process started. The custom properties of those files are also updated on the target instance. However, if only the custom properties of those files were modified on the source, but not the files' content, the properties are not modified on the target instance by the process. - ### Before you begin 1. If your source instance hosts files that are larger than 25 GB, they will be blocked during the transfer. To learn how to check whether large files are hosted by your source instance, and what to do in that case, read [this section](#transferring-files-larger-than-25-gb). 2. Ensure that you can log in to the UI of both the source and target instances with users that have admin permissions. 3. Ensure that the target instance license does not support fewer features than the source instance license. 4. Run the file transfer pre-checks as described [here](#running-pre-checks-before-initiating-the-file-transfer-process). -5. Ensure that all the remote repositories on the source Artifactory instance have network access to their destination URL once they are created in the target instance. Even if one remote or federated repository does not have access, the configuration transfer operation will be canceled. You do have the option of excluding specific repositories from being transferred. +5. Ensure that all the remote repositories on the source Artifactory instance have network access to their destination URL once they are created in the target instance. Even if one remote or federated repository does not have access, the configuration transfer operation will be cancelled. You do have the option of excluding specific repositories from being transferred. 6. Ensure that all the replications configured on the source Artifactory instance have network access to their destination URL once they are created in the target instance. -7. Ensure that you have a user that can log in to [MyJFrog](https://my.jfrog.com/login/). +7. Ensure that you have a user who can log in to [MyJFrog](https://my.jfrog.com/login/). 8. Ensure that you can log in to the primary node of your source instance through a terminal. ### Running the transfer process @@ -95,9 +98,9 @@ To set up the source instance, you must install the data-transfer user plugin in 1. Install JFrog CLI on the primary node machine of the source instance as described [here](#installing-jfrog-cli-on-the-source-instance-machine). 2. Configure the connection details of the source Artifactory instance with your admin credentials by running the following command from the terminal. -```sh -jf c add source-server -``` + ```sh + jf c add source-server + ``` 3. Ensure that the **JFROG\_HOME** environment variable is set and holds the value of the JFrog installation directory. It usually points to the **/opt/jfrog** directory. In case the variable isn't set, set its value to point to the correct directory as described in the JFrog Product Directory Structure article.System Directories @@ -111,7 +114,7 @@ jf rt transfer-plugin-install source-server If the source instance has no internet access, follow these steps instead. -1. Download the following two files from a machine that has internet access: Download **data-transfer.jar** from [https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE\]/lib/data-transfer.jar](https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE]/lib/data-transfer.jar). Download **dataTransfer.groovy** from [https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE\]/dataTransfer.groovy](https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE]/dataTransfer.groovy). +1. Download the following two files from a machine that has internet access: [**data-transfer.jar**](https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE]/lib/data-transfer.jar) and [**dataTransfer.groovy**](https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/\[RELEASE]/dataTransfer.groovy). 2. Create a new directory on the primary node machine of the source instance and place the two files you downloaded inside this directory. 3. Install the data-transfer user plugin by running the following command from the terminal. Replace the `` token with the full path to the directory which includes the plugin files you downloaded. @@ -119,6 +122,17 @@ If the source instance has no internet access, follow these steps instead. jf rt transfer-plugin-install source-server --dir "" ``` +If the above is not an option, you may also load the transfer plugin manually into the on-premise plugins directory to continue with the transfer process. + +**Step-1:** Download the dataTransfer JAR file from here (https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/[RELEASE]/lib/data-transfer.jar) and add it under $JFROG_HOME/artifactory/var/etc/artifactory/plugins/lib/. If the "lib" directory is not present, create one. + +**Step-2:** Download the dataTransfer.groovy file from here (https://releases.jfrog.io/artifactory/jfrog-releases/data-transfer/[RELEASE]/dataTransfer.groovy) and add it under $JFROG_HOME/artifactory/var/etc/artifactory/plugins/. + +**Step-3:** Reload the plugin using the following command. +curl -u admin -X POST http://localhost:8082/artifactory/api/plugins/reload + +If the plugin is loaded successfully, source instance is all set to proceed with the configuration transfer. + #### Step 3: Transfer configuration from the source instance to the target instance *** @@ -132,24 +146,28 @@ jf rt transfer-plugin-install source-server --dir "" 1. Install JFrog CLI on the source instance machine as described [here](#installing-jfrog-cli-on-the-source-instance-machine). 2. Configure the connection details of the source Artifactory instance with your admin credentials by running the following command from the terminal. -```sh -jf c add source-server -``` + ```sh + jf c add source-server + ``` 3. Configure the connection details of the target Artifactory server with your admin credentials by running the following command from the terminal. -```sh -jf c add target-server -``` + ```sh + jf c add target-server + ``` 4. Run the following command to verify that the target URLs of all the remote repositories are accessible from the target. -```sh -jf rt transfer-config source-server target-server --prechecks -``` + ```sh + jf rt transfer-config source-server target-server --prechecks + ``` If the command output shows that a target URL isn't accessible for any of the repositories, you'll need to make the URL accessible before proceeding to transfer the config. You can then rerun the command to ensure that the URLs are accessible. +If the command execution fails with an error indicating that the configuration import failed against the target server due to some existing data, before using the --force flag to override it, consider reviewing the configuration present in the cloud instance to ensure if it's safe to override. If you would like to preserve the existing configuration in cloud instance whilst transferring the additional data from on-premise, refer to the link here (https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-cloud-transfer#transferring-projects-and-repositories-from-multiple-source-instances). This section describes a merge task instead of transfer, to sync the data between the instances. + +NOTE: Users will not be transferred while executing merge. Only Repositories and Projects will be merged with the cloud instance. + *** **Note** @@ -160,9 +178,9 @@ If the command output shows that a target URL isn't accessible for any of the re 5. Transfer the configuration from the source to the target by running the following command. -```sh -jf rt transfer-config source-server target-server -``` + ```sh + jf rt transfer-config source-server target-server + ``` This command might take up to two minutes to run. @@ -175,12 +193,12 @@ This command might take up to two minutes to run. 6. View the command output in the terminal to verify that there are no errors. The command output is divided into the following four phases: -``` -========== Phase 1/4 - Preparations ========== -========== Phase 2/4 - Export configuration from the source Artifactory ========== -========== Phase 3/4 - Download and modify configuration ========== -========== Phase 4/4 - Import configuration to the target Artifactory ========== -``` + ``` + ========== Phase 1/4 - Preparations ========== + ========== Phase 2/4 - Export configuration from the source Artifactory ========== + ========== Phase 3/4 - Download and modify configuration ========== + ========== Phase 4/4 - Import configuration to the target Artifactory ========== + ``` 7. View the log to verify there are no errors.\ ![](../.gitbook/assets/transfer-3.png) @@ -199,13 +217,29 @@ Disabling the configuration transfer might take some time. #### Step 5: Push the files from the source to the target instance +### Running pre-checks before initiating the file transfer process + +Before initiating the file transfer process, we highly recommend running pre-checks, to identify issues that can affect the transfer. You trigger the pre-checks by running a JFrog CLI command on your terminal. The pre-checks will verify the following: + +1. There's network connectivity between the source and target instances. +2. The source instance does not include artifacts with properties with values longer than 2.4K characters. This is important, because values longer than 2.4K characters are not supported in JFrog Cloud, and those properties are skipped during the transfer process. + +To run the pre-checks, follow these steps: + 1. Install JFrog CLI on any machine that has access to both the source and the target JFrog instances. To do this, follow the steps described [here](#installing-jfrog-cli-on-a-machine-with-network-access-to-the-source-and-target-machines). -2. Run the following command to start pushing the files from all the repositories in the source instance to the target instance. +2. Run the following command: ```sh -jf rt transfer-files source-server target-server +jf rt transfer-files source-server target-server --prechecks ``` +**Initiating File Transfer:** +Run the following command to start pushing the files from all the repositories in the source instance to the target instance. + + ```sh + jf rt transfer-files source-server target-server + ``` + This command may take a few days to push all the files, depending on your system size and your network speed. While the command is running, It displays the transfer progress visually inside the terminal. \ ![](../.gitbook/assets/transfer-4.png) @@ -255,6 +289,45 @@ While the file transfer is running, monitor the load on your source instance, an You have the option to sync the configuration between the source and target after the file transfer process is complete. You may want to so this if new config entities, such as projects, repositories, or users were created or modified on the source, while the files transfer process has been running. To do this, simply repeat steps 1-3 above. +### Running the transfer process - Exceptional cases +1. **Transferring files larger than 25GB:** By default, files that are larger than 25 GB will be blocked by the JFrog Cloud infrastructure during the file transfer. To check whether your source Artifactory instance hosts files larger than that size, do the following. +Run the following curl command from your terminal, after replacing the ``, `` and `` tokens with your source instance details. The command execution may take a few minutes, depending on the number of files hosted by Artifactory. + + ```sh + curl -X POST /artifactory/api/search/aql -H "Content-Type: text/plain" -d 'items.find({"name" : {"$match":"*"}}).include("size","name","repo").sort({"$desc" : ["size"]}).limit(1)' -u ":" + ``` + + You should get a result that looks like the following. + ```json + { + "results":[ + { + "size":132359021 + } + ], + "range":{ + "start_pos":0, + "end_pos":1, + "total":1, + "limit":1 + } + } + ``` + The value of **size** represents the largest file size hosted by your source Artifactory instance. + + If the size value you received is larger than 25000000000, please avoid initiating the files transfer before contacting JFrog Support, to check whether this size limit can be increased for you. You can contact Support by sending an email to [support@jfrog.com](mailto:support@jfrog.com) + +2. **Routing the traffic from the source to the target through an HTTPS proxy:** +The `jf rt transfer-files` command pushes the files directly from the source to the target instance over the network. In case the traffic from the source instance needs to be routed through an HTTPS proxy, follow these steps. + + a. Define the proxy details in the source instance UI as described in the Managing ProxiesManaging Proxies documentation. + b. When running the `jf rt transfer-files` command, add the `--proxy-key` option to the command, with Proxy Key you configured in the UI as the option value. For example, if the Proxy Key you configured is **my-proxy-key**, run the command as follows: + +```sh +jf rt transfer-files my-source my-target --proxy-key my-proxy-key +``` + + ### Transferring projects and repositories from multiple source instances The **jf rt transfer-config** command transfers all the config entities (users, groups, projects, repositories, and more) from the source to the target instance. While doing so, the existing configuration on the target is deleted and replaced with the new configuration from the source. If you'd like to transfer the projects and repositories from multiple source instances to a single target instance, while preserving the existing configuration on the target, follow the below steps. @@ -300,15 +373,7 @@ The `jf rt transfer-files` command pushes the files from the source instance to * **Phase 3** attempts to push files that failed to be transferred in earlier phases (**Phase 1** or **Phase 2**) or in previous executions of the command. * If **Phase 1** finished running for a specific repository, and you run the `jf rt transfer-files` command again, only **Phase 2** and **Phase 3** will be triggered. You can run the `jf rt transfer-files` as many times as needed, till you are ready to move your traffic to the target instance permanently. In any subsequent run of the command, **Phase 2** will transfer the newly created and modified files, and **Phase 3** will retry transferring files that failed to be transferred in previous phases and also **in previous runs of the command**. -#### Using Replication - -To help reduce the time it takes for Phase 2 to run, you may configure Event-Based Push Replication for some or all of the local repositories on the source instance. With Replication configured, when files are created or updated on the source repository, they are immediately replicated to the corresponding repository on the target instance. Repository Replication - -The replication can be configured at any time. Before, during, or after the file transfer process. - -#### Files transfer state - -You can run the `jf rt transfer-files` command multiple times. This is needed to allow transferring files that have been created or updated after previous command executions. To achieve this, JFrog CLI stores the current state of the file transfer process in a directory named `transfer` under the JFrog CLI home directory. You can usually find this directory at this location `~/.jfrog/transfer`. +To achieve this, JFrog CLI stores the current state of the file transfer process in a directory named `transfer` under the JFrog CLI home directory. You can usually find this directory at this location `~/.jfrog/transfer`. JFrog CLI uses the state stored in this directory to avoid repeating transfer actions performed in previous executions of the command. For example, once **Phase 1** is completed for a specific repository, subsequent executions of the command will skip **Phase 1** and run **Phase 2** and **Phase 3** only. @@ -316,7 +381,7 @@ In case you'd like to ignore the stored state, and restart the file transfer fro ### Installing JFrog CLI on a machine with network access to the source and target machines -Unlike the transfer-config command, which should be run from the primary note machines of Artifactory, it is recommended to run the transfer-files command from a machine that has network access to the source Artifactory URL. This allows the spreading the transfer load on all the Artifactory cluster nodes. This machine should also have network access to the target Artifactory URL. +Unlike the transfer-config command, which should be run from the primary node machines of Artifactory, it is recommended to run the transfer-files command from a machine that has network access to the source Artifactory URL. This allows the spreading the transfer load on all the Artifactory cluster nodes. This machine should also have network access to the target Artifactory URL. Follow these steps to install JFrog CLI on that machine. @@ -386,10 +451,6 @@ By default, the `jf rt transfer-files` command uses 8 working threads to push fi jf rt transfer-settings ``` -### Build-info repositories - -When transferring files in build-info repositories, JFrog CLI limits the total of working threads to 8. This is done in order to limit the load on the target instance while transferring build-info. - ### Manually copying the filestore to reduce the transfer time When your self-hosted Artifactory hosts hundreds of terabytes of binaries, you may consult with your JFrog account manager about the option of reducing the file transfer time by manually copying the entire filestore to the JFrog Cloud storage. This reduces the transfer time because the binaries' content does not need to be transferred over the network. @@ -398,71 +459,14 @@ The `jf rt transfer-files` command transfers the metadata of the binaries to the To run the file transfer after you copy the filestore, add the `--filestore` command option to the `jf rt transfer-files` command. -### Running pre-checks before initiating the file transfer process - -Before initiating the file transfer process, we highly recommend running pre-checks, to identify issues that can affect the transfer. You trigger the pre-checks by running a JFrog CLI command on your terminal. The pre-checks will verify the following: - -1. There's network connectivity between the source and target instances. -2. The source instance does not include artifacts with properties with values longer than 2.4K characters. This is important, because values longer than 2.4K characters are not supported in JFrog Cloud, and those properties are skipped during the transfer process. - -To run the pre-checks, follow these steps: - -1. Install JFrog CLI on any machine that has access to both the source and the target JFrog instances. To do this, follow the steps described [here](#installing-jfrog-cli-on-a-machine-with-network-access-to-the-source-and-target-machines). -2. Run the following command: - -```sh -jf rt transfer-files source-server target-server --prechecks -``` - -*** +#### Using Replication -**Note** +To help reduce the time it takes for Phase 2 to run, you may configure Event-Based Push Replication for some or all of the local repositories on the source instance. With Replication configured, when files are created or updated on the source repository, they are immediately replicated to the corresponding repository on the target instance. Repository Replication -> If the traffic between the source and target instance needs to be routed through an HTTPS proxy, add the --proxy-key command option as described in [this](#routing-the-traffic-from-the-source-to-the-target-through-an-https-proxy) section. +The replication can be configured at any time. Before, during, or after the file transfer process. *** -### Transferring files larger than 25 GB - -By default, files that are larger than 25 GB will be blocked by the JFrog Cloud infrastructure during the file transfer. To check whether your source Artifactory instance hosts files larger than that size, do the following. - -1. Run the following curl command from your terminal, after replacing the ``, `` and `` tokens with your source instance details. The command execution may take a few minutes, depending on the number of files hosted by Artifactory. - -```sh -curl -X POST /artifactory/api/search/aql -H "Content-Type: text/plain" -d 'items.find({"name" : {"$match":"\*"}}).include("size").sort({"$desc" : \["size"\]}).limit(1)' -u : -``` - -2. You should get a result that looks like the following. -```json - { - "results":[ - { - "size":132359021 - } - ], - "range":{ - "start_pos":0, - "end_pos":1, - "total":1, - "limit":1 - } - } -``` -The value of **size** represents the largest file size hosted by your source Artifactory instance. - -3. If the size value you received is larger than 25000000000, please avoid initiating the files transfer before contacting JFrog Support, to check whether this size limit can be increased for you. You can contact Support by sending an email to [support@jfrog.com](mailto:support@jfrog.com) - -### Routing the traffic from the source to the target through an HTTPS proxy - -The `jf rt transfer-files` command pushes the files directly from the source to the target instance over the network. In case the traffic from the source instance needs to be routed through an HTTPS proxy, follow these steps. - -1. Define the proxy details in the source instance UI as described in the Managing ProxiesManaging Proxies documentation. -2. When running the `jf rt transfer-files` command, add the `--proxy-key` option to the command, with Proxy Key you configured in the UI as the option value. For example, if the Proxy Key you configured is **my-proxy-key**, run the command as follows: - -```sh -jf rt transfer-files my-source my-target --proxy-key my-proxy-key -``` - ### Frequently asked questions **Why is the total file count on my source and target instances different after the files transfer finishes?** diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-curation.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-curation.md index f0e64b3..6a4a7a5 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-curation.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-curation.md @@ -2,52 +2,76 @@ ## Overview -JFrog Curation enables you to block malicious or risky open-source packages entering your software supply chain. What can you do with Curation? +JFrog Curation defends your software supply chain, enabling early blocking of malicious or risky open-source packages before they even enter. Seamlessly identify harmful, vulnerable, or risky packages, ensuring increased security, compliance, and developer productivity. -* Track the open-source packages downloaded by your organization to gain centralized visibility and control. -* Prevent harmful packages from getting into your software development pipelines. -* Protect against known and unknown threats, allowing only trusted software packages into your SDLC. -* Create policies to block packages with known vulnerabilities, malicious code, operational risk, or license compliance issues. +For more information see [**here**](https://jfrog.com/curation/) -For more information on JFrog Curation and how to set it up, see the JFrog Curation general documentation at https://jfrog.com/help. +The 'curation-audit' is a JFrog CLI command designed for developers to scan their projects and identify third-party dependencies that violate the restrictions set by the Curation service. This command provides detailed insights into the specific package policies that are being violated, leading to their blockage by the Curation service. Additionally, when feasible, 'curation-audit' may suggest alternative versions of the packages that comply with the Curation policies. -JFrog Curation requires [Xray version 3.78.9](https://jfrog.com/help/r/jfrog-release-information/xray-3.78.9) and above, and [Artifactory version 7.63.5](https://jfrog.com/help/r/jfrog-release-information/artifactory-7.63) and above. It also requires Enterprise X and Enterprise + subscriptions. +## Supported package managers & build systems + +Curation-audit command supported package managers and build systems: + +* Npm (npm) +* Maven (mvn) - Requires xray 3.92 and above, and Artifactory 7.82 and above +* Pip (pip) - Requires xray 3.92 and above, and Artifactory 7.82 and above +* Go (go) - Requires xray 3.92 and above, and Artifactory 7.87 and above + +For a full list of the package managers and build systems supported by the curation-audit command and the required Artifactory and Xray versions to use it please see [**this matrix**](https://jfrog.com/help/r/jfrog-curation/curation-support-matrix) *** ### Commands -Audit your Project with JFrog Curation +Audit your Project with JFrog CLI curation-audit command -**Note** +### Setup: -> The **curation-audit** command currently only supports npm projects. +Prerequisites: -The **jf curation-audit** command enables developers to scan project dependencies to find packages that were blocked by the JFrog curation service. This command provides developers with more detailed information, such as whether the blocked package is the project’s direct dependency or is a transitive dependency. This information helps developers to resolve blocked packages more efficiently as they will be able to make a more informative decision based on what Policy violation occurred and what exactly needs to be resolved. +Some package types (except npm packages) require 'pass-through' curation configuration on the remote repositories in Artifactory, in addition to configuring curation on them. For more information, see [**this page**](https://jfrog.com/help/r/jfrog-curation/configure-curation-pass-through)**.** -For each blocked package the CLI provides the violated Curation Policies. The command builds a deep dependencies graph for the project, and requests the Curation status by a HEAD request for each node in the tree. It uses the package manager that is used in the project to build the dependencies graph. +1. **Connect JFrog CLI to JFrog Platform** -Before running the command, do the following: + Connect the JFrog CLI to your JFrog Platform instance by running the following command: -1. Connect the JFrog CLI to your JFrog Platform instance by running the **jf c add** command. -2. Ensure your project is configured in the JFrog CLI with the repository you would like to resolve dependencies from. Set the repository with the **jf npmc** command inside the project directory.\ - \ + ``` + jf c add + ``` -#### Commands Params + * When prompted for the access token, use the token generated from Artifactory. For more details, refer to the [adding and editing configured servers documentation](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/configurations/jfrog-platform-configuration#adding-and-editing-configured-servers). -| | | -|---------------------|----------------------------------------------------------------------------------------------------------------------------------------| -| **Command name** | curation-audit | -| **Abbreviation** | ca | -| **Command options** | | -| --format |

[Default: table]

Defines the output format of the command. Acceptable values are: table and json.

| -| --working-dirs |

[Optional]

A comma separated list of relative working directories, to determine the audit targets locations.

| -| --threads |

[Default: 10]

The number of parallel threads used to determine the curation status for each package in the project tree.

| + ``` + jf c show + ``` + + * It should present Artifactory server just added (with default true) +2. **Configure JFrog CLI for Project**\ + Ensure your project is configured in the JFrog CLI with the repository you would like to resolve dependencies from. Here are details for each package manager: + * **NPM:** + * Set the resolved repository using the [**jf npmc**](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration#setting-npm-repositories) command inside the project directory. + * **MAVEN:** + * Set the resolved repository using the [**jf mvnc**](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration#setting-maven-repositories) command inside the project directory. + * **PIP:** + * Set the resolved repository using the [**jf pipc**](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration#setting-python-repository) command inside the project directory (The only package installer supported for now by Python is "pip"). + * **GO:** + * Set the resolved repository using the [**jf goc**](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/package-managers-integration#examples-4) command inside the project directory. + +#### Commands Params +| | | +| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | +| **Command name** | curation-audit | +| **Abbreviation** | ca | +| **Command options** | | +| `--format` |

[Default: table]

Defines the output format of the command. Acceptable values are: table and json.

| +| `--working-dirs` |

[Optional]

A comma separated list of relative working directories, to determine the audit targets locations.

| +| `--threads` |

[Default: 3]

The number of parallel threads used to determine the curation status for each package in the project tree.

| +| `--requirements-file` |

[Optional] [Pip]

Defines pip requirements file name. For example: 'requirements.txt'

| #### Example 1 -Audit the project in the current directory. Displays all known packages that were blocked by Curation Policies. +Curation-Audit the project in the current directory. Displays all known packages that were blocked by Curation Policies. ``` jf curation-audit @@ -55,7 +79,7 @@ jf curation-audit #### Example 2 -Audit the projects according to the specific paths defined in the "working-dirs" option. Displays all known packages that were blocked by Curation Policies for all projects. The data is displayed in separate tables. +Curation-Audit the projects according to the specific paths defined in the "working-dirs" option. Displays all known packages that were blocked by Curation Policies for all projects. The data is displayed in separate tables. ``` jf curation-audit --working-dirs="/path/to/project/npm_project1,/path/to/project/npm_project2" @@ -63,7 +87,7 @@ jf curation-audit --working-dirs="/path/to/project/npm_project1,/path/to/project #### Example 3 -Audit the project in the current directory using 5 threads to check the packages Curation status in parallel. Displays all known packages blocked by Curation Policies. +Curation-Audit the project in the current directory using 5 threads to check the packages Curation status in parallel. Displays all known packages blocked by Curation Policies. ``` jf curation-audit --threads=5 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md index 6c94740..9ede73a 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-distribution.md @@ -34,30 +34,30 @@ This commands creates and updates an unsigned Release Bundle on JFrog Distributi #### Commands Params -| | | -|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-create / release-bundle-update | -| Abbreviation | rbc / rbu | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --spec |

[Optional]

Path to a file spec. For more details, please refer to Using File Specs.

| -| --spec-vars |

[Optional]

List of variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| -| --target-props |

[Optional]

The list of properties, in the form of key1=value1;key2=value2,..., to be added to the artifacts after distribution of the release bundle.

| -| --target |

[Optional]

The target path for distributed artifacts on the edge node. If not specified, the artifacts will have the same path and name on the edge node, as on the source Artifactory server. For flexibility in specifying the distribution path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis.

| -| --dry-run |

[Default: false]

Set to true to disable communication with JFrog Distribution.

| -| --sign |

[Default: false]

If set to true, automatically signs the release bundle version.

| -| --passphrase |

[Optional]

The passphrase for the signing key.

| -| --desc |

[Optional]

Description of the release bundle.

| -| --release-notes-path |

[Optional]

Path to a file describes the release notes for the release bundle version.

| -| --release-notes-syntax |

[Default: plain_text]

The syntax for the release notes. Can be one of markdown, asciidoc, or plain_text.

| -| --exclusions |

[Optional]

A list of Semicolon-separated exclude path patterns, to be excluded from the Release Bundle. Allows using wildcards.

| -| --repo |

[Optional]

A repository name at source Artifactory to store release bundle artifacts in. If not provided, Artifactory will use the default one.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --detailed-summary |

[Default: false]

Set to true to return the SHA256 value of the release bundle manifest.

| -| Command arguments | | -| release bundle name | The name of the release bundle. | -| release bundle version | The release bundle version. | -| pattern | Specifies the source path in Artifactory, from which the artifacts should be bundled, in the following format: \/\. You can use wildcards to specify multiple artifacts. This argument should not be sent along with the _--spec_ option. | +| | | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-create / release-bundle-update | +| Abbreviation | rbc / rbu | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--spec` |

[Optional]
Path to a file spec. For more details, please refer to Using File Specs.

| +| `--spec-vars` |

[Optional]
List of semicolon-separated(;) variables in the form of "key1=value1;key2=value2;..." to be replaced in the File Spec. In the File Spec, the variables should be used as follows: ${key1}.

| +| `--target-props` |

[Optional]
The list of properties, in the form of key1=value1;key2=value2,..., to be added to the artifacts after distribution of the release bundle.

| +| `--target` |

[Optional]
The target path for distributed artifacts on the edge node. If not specified, the artifacts will have the same path and name on the edge node, as on the source Artifactory server. For flexibility in specifying the distribution path, you can include placeholders in the form of {1}, {2} which are replaced by corresponding tokens in the pattern path that are enclosed in parenthesis.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with JFrog Distribution.

| +| `--sign` |

[Default: false]
If set to true, automatically signs the release bundle version.

| +| `--passphrase` |

[Optional]
The passphrase for the signing key.

| +| `--desc` |

[Optional]
Description of the release bundle.

| +| `--release-notes-path` |

[Optional]
Path to a file describes the release notes for the release bundle version.

| +| `--release-notes-syntax` |

[Default: plain_text]
The syntax for the release notes. Can be one of markdown, asciidoc, or plain_text.

| +| `--exclusions` |

[Optional]
A list of semicolon-separated(;) exclude path patterns, to be excluded from the Release Bundle. Allows using wildcards.

| +| `--repo` |

[Optional]
A repository name at source Artifactory to store release bundle artifacts in. If not provided, Artifactory will use the default one.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--detailed-summary` |

[Default: false]
Set to true to return the SHA256 value of the release bundle manifest.

| +| **Command arguments:** | | +| release bundle name | The name of the release bundle. | +| release bundle version | The release bundle version. | +| pattern | Specifies the source path in Artifactory, from which the artifacts should be bundled, in the following format: \/\. You can use wildcards to specify multiple artifacts. This argument should not be sent along with the _--spec_ option. | #### Example 1 @@ -180,19 +180,19 @@ This command GPG signs an existing Release Bundle on JFrog Distribution. #### Commands Params -| | | -|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-sign | -| Abbreviation | rbs | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --passphrase |

[Optional]

The passphrase for the signing key.

| -| --repo |

[Optional]

A repository name at source Artifactory to store release bundle artifacts in. If not provided, Artifactory will use the default one.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| --detailed-summary |

[Default: false]

Set to true to return the SHA256 value of the release bundle manifest.

| -| Command arguments | | -| release bundle name | The name of the release bundle. | -| release bundle version | The release bundle version. | +| | | +|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-sign | +| Abbreviation | rbs | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--passphrase` |

[Optional]
The passphrase for the signing key.

| +| `--repo` |

[Optional]
A repository name at source Artifactory to store release bundle artifacts in. If not provided, Artifactory will use the default one.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| `--detailed-summary` |

[Default: false]
Set to true to return the SHA256 value of the release bundle manifest.

| +| **Command arguments:** | | +| release bundle name | The name of the release bundle. | +| release bundle version | The release bundle version. | #### Example @@ -216,24 +216,24 @@ This command distributes a release bundle to the Edge Nodes. #### Commands Params -| | | -|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-distribute | -| Abbreviation | rbd | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --sync |

[Default: false]

Set to true to enable sync distribution (the command execution will end when the distribution process ends).

| -| --max-wait-minutes |

[Default: 60]

Max minutes to wait for sync distribution.

| -| --create-repo |

[Default: false]

Set to true to create the repository on the edge if it does not exist.

| -| --dry-run |

[Default: false]

Set to true to disable communication with JFrog Distribution.

| -| --dist-rules |

[Optional]

Path to a file, which includes the Distribution Rules in a JSON format.

Distribution Rules JSON structure

{
"distribution_rules": [
{
"site_name": "DC-1",
"city_name": "New-York",
"country_codes": ["1"]
},
{
"site_name": "DC-2",
"city_name": "Tel-Aviv",
"country_codes": ["972"]
}
]
}

The Distribution Rules format also supports wildcards. For example:

{
"distribution_rules": [
{
"site_name": "",
"city_name": "",
"country_codes": ["*"]
}
]
}

| -| --site |

[Default: *]

Wildcard filter for site name.

| -| --city |

[Default: *]

Wildcard filter for site city name.

| -| --country-codes |

[Default: *]

Semicolon-separated list of wildcard filters for site country codes.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | | -| release bundle name | The name of the release bundle. | -| release bundle version | The release bundle version. | +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-distribute | +| Abbreviation | rbd | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--sync` |

[Default: false]
Set to true to enable sync distribution (the command execution will end when the distribution process ends).

| +| `--max-wait-minutes` |

[Default: 60]
Max minutes to wait for sync distribution.

| +| `--create-repo` |

[Default: false]
Set to true to create the repository on the edge if it does not exist.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with JFrog Distribution.

| +| `--dist-rules` |

[Optional]
Path to a file, which includes the Distribution Rules in a JSON format.

Distribution Rules JSON structure

{
"distribution_rules": [
{
"site_name": "DC-1",
"city_name": "New-York",
"country_codes": ["1"]
},
{
"site_name": "DC-2",
"city_name": "Tel-Aviv",
"country_codes": ["972"]
}
]
}

The Distribution Rules format also supports wildcards. For example:

{
"distribution_rules": [
{
"site_name": "",
"city_name": "",
"country_codes": ["*"]
}
]
}

| +| `--site` |

[Default: *]
Wildcard filter for site name.

| +| `--city` |

[Default: *]
Wildcard filter for site city name.

| +| `--country-codes` |

[Default: *]
semicolon-separated(;) list of wildcard filters for site country codes.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| **Command arguments:** | | +| release bundle name | The name of the release bundle. | +| release bundle version | The release bundle version. | #### Example 1 @@ -252,31 +252,31 @@ This command deletes a Release Bundle from the Edge Nodes and optionally from Di **Note** -> These commands require version 2.0 or higher of[JFrog Distribution](https://www.jfrog.com/confluence/display/JFROG/JFrog+Distribution). +> These commands require version 2.0 or higher of [JFrog Distribution](https://www.jfrog.com/confluence/display/JFROG/JFrog+Distribution). *** #### Commands Params -| | | -|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command-name | release-bundle-delete | -| Abbreviation | rbdel | -| Command options | | -| --server-id |

[Optional]

Artifactory server ID configured using the config command.

| -| --sync |

[Default: false]

Set to true to enable sync deletion (the command execution will end when the deletion process ends).

| -| --max-wait-minutes |

[Default: 60]

Max minutes to wait for sync deletion.

| -| --dry-run |

[Default: false]

Set to true to disable communication with JFrog Distribution.

| -| --dist-rules |

[Optional]

Path to a file, which includes the distribution rules in a JSON format.

| -| --site |

[Default: *]

Wildcard filter for site name.

| -| --city |

[Default: *]

Wildcard filter for site city name.

| -| --country-codes |

[Default: *]

Semicolon-separated list of wildcard filters for site country codes.

| -| --delete-from-dist |

[Default: false]

Set to true to delete release bundle version in JFrog Distribution itself after deletion is complete in the specified Edge nodes.

| -| --quiet |

[Default: false]

Set to true to skip the delete confirmation message.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification.

| -| Command arguments | | -| release bundle name | The name of the release bundle. | -| release bundle version | The release bundle version. | +| | | +|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command-name | release-bundle-delete | +| Abbreviation | rbdel | +| **Command options:** | | +| `--server-id` |

[Optional]
Artifactory Server ID configured using the 'jf config' command.

| +| `--sync` |

[Default: false]
Set to true to enable sync deletion (the command execution will end when the deletion process ends).

| +| `--max-wait-minutes` |

[Default: 60]
Max minutes to wait for sync deletion.

| +| `--dry-run` |

[Default: false]
Set to true to disable communication with JFrog Distribution.

| +| `--dist-rules` |

[Optional]
Path to a file, which includes the distribution rules in a JSON format.

| +| `--site` |

[Default: *]
Wildcard filter for site name.

| +| `--city` |

[Default: *]
Wildcard filter for site city name.

| +| `--country-codes` |

[Default: *]
semicolon-separated(;) list of wildcard filters for site country codes.

| +| `--delete-from-dist` |

[Default: false]
Set to true to delete release bundle version in JFrog Distribution itself after deletion is complete in the specified Edge nodes.

| +| `--quiet` |

[Default: false]
Set to true to skip the delete confirmation message.

| +| `--insecure-tls` |

[Default: false]
Set to true to skip TLS certificates verification.

| +| **Command arguments:** | | +| release bundle name | The name of the release bundle. | +| release bundle version | The release bundle version. | #### Example 1 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-pipelines.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-pipelines.md index 69f3833..8c7bd0e 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-pipelines.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-pipelines.md @@ -30,13 +30,13 @@ The following sections describe the commands available in the JFrog CLI for use ##### Commands Params -| | | -|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | pl version | -| Abbreviation | v | -| Command arguments | The command accepts no arguments. | -| Command options | | -| --server-id |

[Optional]

Specify Pipelines server for which the version is to be fetched. If not specified, the default configured server is used.

| +| | | +|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | pl version | +| Abbreviation | v | +| **Command arguments:** | The command accepts no arguments. | +| **Command options:** | | +| `--server-id` |

[Optional]
Specify Pipelines server for which the version is to be fetched. If not specified, the default configured server is used.

| ##### Example @@ -51,18 +51,18 @@ Get the status of the run for the specified pipeline ##### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------| -| Command name | pl status | -| Abbreviation | s | -| Command arguments | The command accepts no arguments. | -| | | -| Command options | | -| --pipeline-name |

[Optional]

Name of the pipeline.

| -| --branch |

[Optional]

Name of the multi branch.

| -| --monitor |

[Optional]

Continuous monitoring until pipeline reaches end state.

Default time is 1 hour and 30 minutes.

| -| --server-id |

[Optional]

Name of the server.

| -| --single-branch |

[Optional]

To be used when using a single branch.

| +| | | +|-------------------|----------------------------------------------------------------------------------------------------------------------------| +| Command name | pl status | +| Abbreviation | s | +| **Command arguments:** | The command accepts no arguments. | +| | | +| **Command options:** | | +| `--pipeline-name` |

[Optional]
Name of the pipeline.

| +| `--branch` |

[Optional]
Name of the multi branch.

| +| `--monitor` |

[Optional]
Continuous monitoring until pipeline reaches end state.

Default time is 1 hour and 30 minutes.

| +| `--server-id` |

[Optional]
Name of the server.

| +| `--single-branch` |

[Optional]
To be used when using a single branch.

| ##### Example 1 @@ -85,16 +85,16 @@ Trigger a pipeline run. ##### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------| -| Command name | pl trigger | -| Abbreviation | t | -| Command options | | -| --server-id |

[Optional]

Name of the server.

| -| --single-branch |

[Optional]

To be used when using a single branch. When used, branch_name argument is ignored.

| -| Command arguments | | -| pipeline\_name | Name of the pipeline to be triggered. | -| branch\_name | Name of the multi branch. | +| | | +|-------------------|----------------------------------------------------------------------------------------------------------------------| +| Command name | pl trigger | +| Abbreviation | t | +| **Command options:** | | +| `--server-id` |

[Optional]
Name of the server.

| +| `--single-branch` |

[Optional]
To be used when using a single branch. When used, branch_name argument is ignored.

| +| **Command arguments:** | | +| pipeline\_name | Name of the pipeline to be triggered. | +| branch\_name | Name of the multi branch. | ##### Example 1 @@ -116,14 +116,14 @@ jf pl trigger myPipeline main/jobs --server-id repo21 ##### Commands Params -| | | -|-----------------|-------------------------------------------------------------------------------------------| -| Command name | pl sync | -| Abbreviation | sy | -| Command options | | -| --server-id |

[Optional]

Name of the server.

| -| --repository |

[Optional]

Full name of the repository where the pipeline source is stored.

| -| --branch |

[Optional]

Name of branch that has the pipeline source.

| +| | | +|-----------------|---------------------------------------------------------------------------------------| +| Command name | pl sync | +| Abbreviation | sy | +| **Command options:** | | +| `--server-id` |

[Optional]
Name of the server.

| +| `--repository` |

[Optional]
Full name of the repository where the pipeline source is stored.

| +| `--branch` |

[Optional]
Name of branch that has the pipeline source.

| ##### Example @@ -140,9 +140,9 @@ jf pl sync --repository jfrog/artifactory --branch main/jobs --server-id repo21 |-------------------|------------------------------------------------------------------| | Command name | pl sync-status | | Abbreviation | ss | -| Command options | | -| --server-id |

[Optional]

Name of the server.

| -| Command arguments | | +| **Command options:** | | +| `--server-id` |

[Optional]
Name of the server.

| +| **Command arguments:** | | | full\_repo\_name | Full name of the repository where the pipeline source is stored. | | branch\_name | Name of the branch. | diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/README.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/README.md new file mode 100644 index 0000000..2e3ff24 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/README.md @@ -0,0 +1,11 @@ +# CLI for JFrog Platform Services + +This page describes how to use JFrog CLI with JFrog Platform Services. + +Read more about JFrog CLI [here](https://jfrog-external.fluidtopics.net/r/help/JFrog-CLI/JFrog-CLI). + +**Managing Workers** + +JFrog CLI allows you to fully manage your platform workers. + + diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-add-secret.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-add-secret.md new file mode 100644 index 0000000..d135ebd --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-add-secret.md @@ -0,0 +1,22 @@ +# Add worker secret + +## Overview + +This command is used to edit a worker manifest to add secret that can be used for deployment or/and execution. + +| | | +|------------------------|---------------------------------------------------------| +| Command name | worker add-secret | +| Abbreviation | worker as | +| **Command options:** | | +| `--edit` | \[Default: false] Whether to update an existing secret. | +| **Command arguments:** | | +| secret-name | The secret name | + +## Example + +Add a secret name `my-secret` to a worker initialized in the current directory. + +``` +jfrog worker add-secret my-secret +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-deploy.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-deploy.md new file mode 100644 index 0000000..6e27854 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-deploy.md @@ -0,0 +1,22 @@ +# Deploy a worker + +## Overview + +This command is used to update the worker definition (code, description , filter, secret ...) on your Artifactory instance. + +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker deploy | +| Abbreviation | worker d | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | +| `--no-secrets` | \[Default: false] Do not use registered secrets. | + +## Example + +Deploy a worker to server with id `my-server`. + +``` +jfrog worker server deploy --server-id my-server +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-dry-run.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-dry-run.md new file mode 100644 index 0000000..d90c50a --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-dry-run.md @@ -0,0 +1,24 @@ +# Test a worker + +## Overview + +Dry run a worker. The worker needs to be initialized before running this command. + +| | | +|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker dry-run | +| Abbreviation | worker dr | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | +| `--no-secrets` | \[Default: false] Do not use registered secrets. | +| **Command arguments:** | | +| json-payload | The json payload expected by the worker. Use `-` to read the payload from standard input. Use `@` to read from a file located at . | + +## Example + +Dry run a worker initialized in the current directory, with a payload located in a file named `payload.json` from the same directory. + +``` +jfrog worker dry-run @payload.json +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-execute.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-execute.md new file mode 100644 index 0000000..ee89eca --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-execute.md @@ -0,0 +1,25 @@ +# Execute an HTTP-triggered worker + +## Overview + +Execute an HTTP-triggered worker. + +| | | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker execute | +| Abbreviation | worker exec, worker e | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | +| **Command arguments:** | | +| worker-key | The worker key. If not provided it will be read from the `manifest.json` in the current directory. | +| json-payload | The json payload expected by the worker. Use `-` to read the payload from standard input. Use `@` to read from a file located at . | + +## Example + +Execute an HTTP-triggered worker initialized in the current directory, with a payload located in a file named `payload.json` from the same directory. + +``` +jf worker execute @payload.json +``` + diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-init.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-init.md new file mode 100644 index 0000000..7bbe173 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-init.md @@ -0,0 +1,24 @@ +# Initialize a Worker + +## Overview + +This command is used to initialize a new platform worker. + +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker init | +| Abbreviation | worker i | +| **Command options:** | | +| `--force` | \[Default: false] Whether to overwrite existing files. | +| `--no-test` | \[Default: false] Whether to skip tests generation. | +| **Command arguments:** | | +| action | The action that will trigger the worker (BEFORE_DOWNLOAD, AFTER_DOWNLOAD, BEFORE_UPLOAD, AFTER_CREATE, AFTER_BUILD_INFO_SAVE, AFTER_MOVE, GENERIC_EVENT, BEFORE_CREATE_TOKEN, ...). | +| worker-name | The name of the worker | + +## Example + +Initialize a new BEFORE_DOWNLOAD worker named `my-worker`. + +``` +jfrog worker init BEFORE_DOWNLOAD my-worker +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list-event.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list-event.md new file mode 100644 index 0000000..2f27f5e --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list-event.md @@ -0,0 +1,21 @@ +# List events + +## Overview + +This command list all the available events on your Artifactory. + +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker list-event | +| Abbreviation | worker le | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | + +## Example + +List event supported by a server identified by `my-server`. + +``` +jfrog worker list-event --server-id my-server +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list.md new file mode 100644 index 0000000..65edb16 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-list.md @@ -0,0 +1,23 @@ +# List registered workers + +## Overview + +List workers saved on your Artifactory instance. The default output is a CSV format with columns `name`,`action`,`description`,`enabled`. + +| | | +|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker list | +| Abbreviation | worker ls | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--json` | \[Default: false] Whether to use JSON instead of CSV as output. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | + + +# Example + +List all workers registered in a platform named `my-platform` with detailed data. + +``` +jfrog worker list --server-id my-platform --json +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-undeploy.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-undeploy.md new file mode 100644 index 0000000..57e37f8 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-platform-services/platform-workers-undeploy.md @@ -0,0 +1,23 @@ +# Undeploy a worker + +## Overview + +This command is used to remove a registered worker from you Artifactory instance. + +| | | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | worker undeploy | +| Abbreviation | worker rm | +| **Command options:** | | +| `--server-id` | \[Optional] Server ID configured using the config command. | +| `--timeout-ms` | \[Default: 5000] The request timeout in milliseconds. | +| **Command arguments:** | | +| worker-key | \[Optional] The worker key. If not provided it will be read from the `manifest.json` in the current directory. | + +## Example + +Undeploy a worker name `my-worker` from an Artifactory instance identified by `my-server`. + +``` +jfrog worker undeploy --server-id my-server my-worker +``` \ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/README.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/README.md index 210fd4e..92d38a4 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/README.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/README.md @@ -8,7 +8,32 @@ When used with Xray, JFrog CLI offers several means of authentication: JFrog CLI To authenticate yourself using your Xray login credentials, either configure your credentials once using the\_jf c add\_command or provide the following option to each command. -
Command optionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--userJFrog username
--passwordJFrog password
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Command optionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--userJFrog username
--passwordJFrog password
#### Authenticating with an Access Token @@ -17,5 +42,5 @@ To authenticate yourself using an Xray Access Token, either configure your Acces | | | |----------------|---------------------------------------------------------| | Command option | Description | -| --url | JFrog Xray API endpoint URL. It usually ends with /xray | -| --access-token | JFrog access token | +| `--url` | JFrog Xray API endpoint URL. It usually ends with /xray | +| `--access-token` | JFrog access token | diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/authentication.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/authentication.md index d798663..8a1a3e7 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/authentication.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/authentication.md @@ -1,18 +1,59 @@ # Authentication -When used with Xray, JFrog CLI offers several means of authentication: JFrog CLI does not support accessing Xray without authentication. +When used with Xray, JFrog CLI offers several means of authentication: JFrog CLI does not support accessing Xray without +authentication. #### Authenticating with Username and Password -To authenticate yourself using your Xray login credentials, either configure your credentials once using the _**jf c add**_ command or provide the following option to each command. - -
Command OptionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--userJFrog username
--passwordJFrog password
+To authenticate yourself using your Xray login credentials, either configure your credentials once using the +_**jf c add**_ command or provide the following option to each command. + + + + + + + + + + + + + + + + + + + + + + +
Command OptionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--userJFrog username
--passwordJFrog password
#### Authenticating with an Access Token -To authenticate yourself using an Xray Access Token, either configure your Access Token once using the _**jf c add**_ command or provide the following option to each command. - -
Command OptionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--access-tokenJFrog access token
+To authenticate yourself using an Xray Access Token, either configure your Access Token once using the _**jf c add**_ +command or provide the following option to each command. + + + + + + + + + + + + + + + + + + +
Command OptionDescription
--urlJFrog Xray API endpoint URL. It usually ends with /xray
--access-tokenJFrog access token
*** diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/curl-integration.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/curl-integration.md new file mode 100644 index 0000000..72c9391 --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/curl-integration.md @@ -0,0 +1,31 @@ +# cUrl Integration +### Running cUrl + +Execute a cUrl command, using the configured Xray details. The command expects the cUrl client to be included in the PATH. + +#### Commands Params + +| | | +|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | xr curl | +| Abbreviation | xr cl | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| +| **Command arguments:** | | +| cUrl arguments and flags |

The same list of arguments and flags passed to cUrl, except for the following changes:

1. The full Xray URL should not be passed. Instead, the REST endpoint URI should be sent.
2. The login credentials should not be passed. Instead, the --server-id should be used.

| + +#### Example 1 + +Execute the cUrl client, to send a GET request to the /api/system/version endpoint to the default configured Xray server. + +``` +jf xr curl -XGET /api/v1/system/version +``` + +#### Example 2 + +Execute the cUrl client, to send a GET request to the /api/v1/system/version endpoint to the configured my-xr-server server ID. + +``` +jf rt curl -XGET /api/v1/system/version --server-id my-xr-server +``` diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/download-updates-for-xrays-database.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/download-updates-for-xrays-database.md index 0f3c981..937ae2f 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/download-updates-for-xrays-database.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/download-updates-for-xrays-database.md @@ -2,4 +2,57 @@ The offline-update command downloads updates to Xray's vulnerabilities database. The Xray UI allows building the command structure for you. -
Command namexr offline-update
Abbreviationxr ou
Command options
--license-id[Mandatory]

Xray license ID.
--from[Optional]

From update date in YYYY-MM-DD format.
--to[Optional]

To update date in YYYY-MM-DD format.
--version[Optional]

Xray API version.
--target[Default: ./]

Path for downloaded update files.
--dbsyncv3[Default: false]

Set to true to use Xray DBSync V3.
--periodic[Default: false]

Set to true to get the Xray DBSync V3 Periodic Package (Use with dbsyncv3 flag).
Command argumentsThe command accepts no arguments.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Command namexr offline-update
Abbreviationxr ou
Command options
--license-id[Mandatory]
Xray license ID.
--from[Optional]
From update date in YYYY-MM-DD format.
--to[Optional]
To update date in YYYY-MM-DD format.
--version[Optional]
Xray API version.
--target[Default: ./]
Path for downloaded update files.
--stream[Default: false]
Set to true to use Xray DBSync V3 stream, Possible values are: public_data, exposures and contextual_analysis.
--periodic[Default: false]
Set to true to get the Xray DBSync V3 Periodic Package (Use with stream flag).
Command argumentsThe command accepts no arguments.
\ No newline at end of file diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/enrich-your-sbom.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/enrich-your-sbom.md new file mode 100644 index 0000000..56e275d --- /dev/null +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/enrich-your-sbom.md @@ -0,0 +1,43 @@ +# Enrich your SBOM JSONs & XMLs + +The sbom enrichment command takes an exported SBOM file in XML/JSON format and enriches your file with package vulnerabilities found by XRAY. + +This _**jf sbom enrich \**_ command enriches a file that is found on file\_path. + +*** + +**Note** + +> This command requires: + +* Version 3.101.3 or above of Xray +* Version 2.60.0 or above of JFrog CLI + +*** + +#### Commands Params + +| | | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| **Command name** | sbom-enrich | +| **Abbreviation** | se | +| **Command options** | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| +| **Command arguments** | | +| `file_path` | the sbom file path. | + +#### Example 1 + +Enriches an XML file + +``` +jf se "path/to/file.xml" +``` + +#### Example 2 + +Enriches a JSON file + +``` +jf se "path/to/files/file.json" +``` diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-published-builds.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-published-builds.md index 2633df2..05ec3d3 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-published-builds.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-published-builds.md @@ -6,20 +6,20 @@ JFrog CLI is integrated with JFrog Xray and JFrog Artifactory, allowing you to h ### Commands Params -| | | -|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | build-scan | -| Abbreviation | bs | -| Command options | | -| --server-id |

[Optional]

Server ID configured by the jf c add command. If not specified, the default configured server is used.

| -| --vuln |

[Optional]

Set if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.

| -| --fail |

[Default: true]

When set, the command returns exit code 3 if a 'Fail Build' rule is matched by Xray.
Set to false if you do not wish the command to return exit code 3 in such case, and an exit code 0 will be returned.

| -| --format |

[Default: table]

Defines the output format of the command. The accepted values are: table and json.

| -| --project |

[Optional]

JFrog project key

| -| --rescan |

[Default: false]

Set to true when scanning an already successfully scanned build, for example after adding an ignore rule.

| -| Command arguments | The command accepts two arguments. | -| Build name | Build name to be scanned. | -| Build number | Build number to be scanned. | +| | | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Command name | build-scan | +| Abbreviation | bs | +| **Command options:** | | +| `--server-id` |

[Optional]
Server ID configured by the jf c add command. If not specified, the default configured server is used.

| +| `--vuln` |

[Optional]
Set if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.

| +| `--fail` |

[Default: true]
When using one of the flags --watches, --project or --repo-path and a Fail build rule is matched the command will return exit code 3. Set to false if you'd like to see violations with exit code 0.

| +| `--format` |

[Default: table]
Defines the output format of the command. The accepted values are: table and json.

| +| `--project` |

[Optional]
JFrog project key

| +| `--rescan` |

[Default: false]
Set to true when scanning an already successfully scanned build, for example after adding an ignore rule.

| +| **Command arguments:** | The command accepts two arguments. | +| Build name | Build name to be scanned. | +| Build number | Build number to be scanned. | ### Example diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md index a54b1c1..0b83584 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-binaries.md @@ -19,20 +19,21 @@ This _**jf scan**_ command scans files on the local file system with Xray. #### Commands Params -| | | -|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Command name** | scan | -| **Abbreviation** | s | -| **Command options** | | -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured server is used.

| -| --spec |

[Optional]

Path to a file specifying the files to scan. If the pattern argument is provided to the command, this option should not be provided.

| -| --project |

[Optional]

JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --repo-path |

[Optional]

Artifactory repository path in the form of <repository>/<path in the repository>, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --watches |

[Optional]

A comma-separated list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --licenses |

[Default: false]

Set if you also require the list of licenses to be displayed.

| -| --format=json |

[Optional]

Produces a JSON file containing the scan results.

| -| **Command arguments** | | -| **Pattern** | Specifies the local file system path to artifacts to be scanned. You can specify multiple files by using wildcards. | +| | | +|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Command name** | scan | +| **Abbreviation** | s | +| **Command options** | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| +| `--spec` |

[Optional]
Path to a file specifying the files to scan. If the pattern argument is provided to the command, this option should not be provided.

| +| `--project` |

[Optional]
JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--repo-path` |

[Optional]
Artifactory repository path, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--watches` |

[Optional]
A comma-separated(,) list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--licenses` |

[Default: false]
Set if you also require the list of licenses to be displayed.

| +| --format=json |

[Optional]
Produces a JSON file containing the scan results.

| +| `--vuln` |

[Optional]
Set if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.

| +| **Command arguments** | | +| **Pattern** | Specifies the local file system path to artifacts to be scanned. You can specify multiple files by using wildcards. | #### Example 1 @@ -84,7 +85,7 @@ jf s "*.tgz" ### Scanning Docker Containers on the Local File System -This j\_**f docker scan**\_ command scans docker containers located on the local file-system using the _**docker client**_ and _**JFrog Xray**_. The containers don't need to be deployed to Artifactory or any other container registry before it can be scanned. +This _**jf docker scan**_ command scans docker containers located on the local file-system using the _**docker client**_ and _**JFrog Xray**_. The containers don't need to be deployed to Artifactory or any other container registry before it can be scanned. *** @@ -99,19 +100,21 @@ This j\_**f docker scan**\_ command scans docker containers located on the local #### Commands Params -| | | -|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Command name** | docker scan | -| **Abbreviation** | | -| **Command options** | | -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured server is used.

| -| --project |

[Optional]

JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --repo-path |

[Optional]

Artifactory repository path in the form of <repository>/<path in the repository>, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --watches |

[Optional]

A comma separated list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --repo-path and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| -| --licenses |

[Default: false]

Set if you also require the list of licenses to be displayed.

| -| --format=json |

[Optional]

Produces a JSON file containing the scan results.

| -| **Command arguments** | | -| **Pattern** | Specifies the local file system path to artifacts to be scanned. You can specify multiple files by using wildcards. | +| | | +|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Command name** | docker scan | +| **Abbreviation** | | +| **Command options** | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| +| `--project` |

[Optional]
JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--repo-path` |

[Optional]
Artifactory repository path, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--watches` |

[Optional]
A comma-separated(,) list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --repo-path and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities.

| +| `--licenses` |

[Default: false]
Set if you also require the list of licenses to be displayed.

| +| `--validate-secrets` |

[Default: false] Triggers token validation on found secrets

| +| --format=json |

[Optional]
Produces a JSON file containing the scan results.

| +| `--vuln` |

[Optional]
Set if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.

| +| **Command arguments** | | +| **Pattern** | Specifies the local file system path to artifacts to be scanned. You can specify multiple files by using wildcards. | #### Example 1 diff --git a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md index 806590a..93bc1e2 100644 --- a/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md +++ b/jfrog-applications/jfrog-cli/cli-for-jfrog-security/scan-your-source-code.md @@ -20,7 +20,7 @@ The command will detect the package manager used by the project automatically. I This command also supports the following Advanced Scans with the **Advanced Security Package** enabled on the JFrog Platform instance. To enable the Advanced Security Package, contact us using [this](https://jfrog.com/advanced-security-contact-us/) form. -* **Vulnerability Contextual Analysis**: This feature uses the code context to eliminate false positive reports on vulnerable dependencies that are not applicable to the code. Vulnerability Contextual Analysis is currently supported for Python and JavaScript code. +* **Vulnerability Contextual Analysis**: This feature uses the code context to eliminate false positive reports on vulnerable dependencies that are not applicable to the code. Vulnerability Contextual Analysis is currently supported for Python, Go and JavaScript code. * **Secrets Detection**: Detect any secrets left exposed inside the code. to stop any accidental leak of internal tokens or credentials. * **Infrastructure as Code scans (IaC)**: Scan Infrastructure as Code (Terraform) files for early detection of cloud and infrastructure misconfigurations. @@ -29,42 +29,50 @@ This command also supports the following Advanced Scans with the **Advanced Secu **Note** * The **jf audit** command does not extract the internal content of the scanned dependencies. This means that if a package includes other vulnerable components bundled inside the binary, they may not be shown as part of the results. This is contrary to the **jf scan** command, which drills down into the package content. -* To generate the dependency tree for scanning purposes, the system will execute an 'install' command on the project if it hasn't been executed previously. +* To generate the dependency tree for scanning purposes, the system will execute an `install` command on the project if it hasn't been executed previously. *** #### Commands Params -| | | -|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Command name** | audit | -| **Abbreviation** | aud | -| **Command options** | | -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured server is used.

| -| --project |

[Optional]

JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| -| --repo-path |

[Optional]

Artifactory repository path in the form of <repository>/<path in the repository>, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| -| --watches |

[Optional]

A comma-separated list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --repo-path and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| -| --licenses |

[Default: false]

Set if you'd also like the list of licenses to be displayed.

| -| --format |

[Default: table]

Defines the output format of the command. Acceptable values are: table and json.

| -| --fail |

[Default: true]

Set to false if you do not wish the command to return exit code 3, even if the 'Fail Build' rule is matched by Xray.

| -| --use-wrapper |

[Default: false] [Gradle]

Set to true if you'd like to use the Gradle wrapper.

| -| --dep-type |

[Default: all] [npm]

Defines npm dependencies type. Possible values are: all, devOnly and prodOnly

| -| --exclude-test-deps |

[Default: false] [Gradle]

Set to true if you'd like to exclude Gradle test dependencies from Xray scanning.

| -| --requirements-file |

[Optional] [Pip]

Defines pip requirements file name. For example: 'requirements.txt'

| -| --working-dirs |

[Optional]

A comma-separated list of relative working directories, to determine the audit targets locations.

If flag isn't provided, a recursive scan is triggered from the root directory of the project. | -| --exclusions |

[Default: *.git*;*node_modules*;*target*;*venv*;*test*]

List of exclusions separated by semicolons, utilized to skip sub-projects from undergoing an audit. These exclusions may incorporate the * and ? wildcards.

| -| --fixable-only |

[Optional]

Set to true if you wish to display issues that have a fix version only.

| -| --min-severity |

[Optional]

Set the minimum severity of issues to display. The following values are accepted: Low, Medium, High or Critical

| -| --go |

[Default: false]

Set to true to request audit for a Go project.

| -| --gradle |

[Default: false]

Set to true to request audit for a Gradle project.

| -| --mvn |

[Default: false]

Set to true to request audit for a Maven project.

| -| --npm |

[Default: false]

Set to true to request audit for a npm project.

| -| --pnpm |

[Default: false]

Set to true to request audit for a pnpm project.

| -| --nuget |

[Default: false]

Set to true to request audit for a .Net project.

| -| --pip |

[Default: false]

Set to true to request audit for a Pip project.

| -| --pipenv |

[Default: false]

Set to true to request audit for a Pipenv project.

| -| --yarn |

[Default: false]

Set to true to request audit for a Yarn project.

| -| **Command arguments** | The command accepts no arguments | +| | | +|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Command name** | audit | +| **Abbreviation** | aud | +| **Command options** | | +| `--server-id` |

[Optional]
Server ID configured using the jf c add command. If not specified, the default configured server is used.

| +| `--project` |

[Optional]
JFrog project key, to enable Xray to determine security violations accordingly. The command accepts this option only if the --repo-path and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| +| `--repo-path` |

[Optional]
Artifactory repository path, to enable Xray to determine violations accordingly. The command accepts this option only if the --project and --watches options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| +| `--watches` |

[Optional]
A comma-separated(,) list of Xray watches, to enable Xray to determine violations accordingly. The command accepts this option only if the --repo-path and --repo-path options are not provided. If none of the three options are provided, the command will show all known vulnerabilities

| +| `--licenses` |

[Default: false]
Set if you'd also like the list of licenses to be displayed.

| +| `--format` |

[Default: table]
Defines the output format of the command. Acceptable values are: table and json.

| +| `--fail` |

[Default: true]
When using one of the flags --watches, --project or --repo-path and a Fail build rule is matched the command will return exit code 3. Set to false if you'd like to see violations with exit code 0.

| +| `--use-wrapper` |

[Default: false] [Gradle]
Set to true if you'd like to use the Gradle wrapper.

| +| `--dep-type` |

[Default: all] [npm]
Defines npm dependencies type. Possible values are: all, devOnly and prodOnly

| +| `--exclude-test-deps` |

[Default: false] [Gradle]
Set to true if you'd like to exclude Gradle test dependencies from Xray scanning.

| +| `--requirements-file` |

[Optional] [Pip]
Defines pip requirements file name. For example: 'requirements.txt'

| +| `--working-dirs` |

[Optional]
A comma-separated(,) list of relative working directories, to determine the audit targets locations.

If flag isn't provided, a recursive scan is triggered from the root directory of the project.

| +| `--exclusions` |

[Default: .git;node_modules;target;venv;test]
List of semicolon-separated(;) exclusions, utilized to skip sub-projects from undergoing an audit. These exclusions may incorporate the * and ? wildcards.

| +| `--fixable-only` |

[Optional]
Set to true if you wish to display issues that have a fix version only.

| +| `--min-severity` |

[Optional]
Set the minimum severity of issues to display. The following values are accepted: Low, Medium, High or Critical

| +| `--threads` |

[Default: 3]
The number of parallel threads used to scan the source code project.

| +| `--go` |

[Default: false]
Set to true to request audit for a Go project.

| +| `--gradle` |

[Default: false]
Set to true to request audit for a Gradle project.

| +| `--mvn` |

[Default: false]
Set to true to request audit for a Maven project.

| +| `--npm` |

[Default: false]
Set to true to request audit for a npm project.

| +| `--pnpm` |

[Default: false]
Set to true to request audit for a pnpm project.

| +| `--nuget` |

[Default: false]
Set to true to request audit for a .Net project.

| +| `--pip` |

[Default: false]
Set to true to request audit for a Pip project.

| +| `--pipenv` |

[Default: false]
Set to true to request audit for a Pipenv project.

| +| `--yarn` |

[Default: false]
Set to true to request audit for a Yarn project.

| +| `--sca` |

[Default: false] Selective scanners mode: Execute SCA (Software Composition Analysis) sub-scan. By default, runs both SCA and Contextual Analysis. Can be combined with --secrets, --sast, --iac, and --without-contextual-analysis.

| +| `--iac` |

[Default: false] Selective scanners mode: Execute IaC sub-scan. Can be combined with --sca, --secrets and --sast.

| +| `--secrets` |

[Default: false] Selective scanners mode: Execute Secrets sub-scan. Can be combined with --sca, --sast and --iac.

| +| `--sast` |

[Default: false] Selective scanners mode: Execute SAST sub-scan. Can be combined with --sca, --secrets and --iac.

| +| `--without-contextual-analysis` |

[Default: false] Selective scanners mode: Disable Contextual Analysis scanner after SCA. Relevant only with --sca flag.

| +| `--vuln` |

[Optional]
Set if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.

| +| `--validate-secrets` |

[Default: false] Triggers token validation on found secrets

| +| **Command arguments** | The command accepts no arguments | #### **Output Example** @@ -94,7 +102,7 @@ jf audit --watches "watch1" #### Example 4 -Audit the project at the current directory using _watch1_ and \_watch2\_defined in Xray. +Audit the project at the current directory using _watch1_ and \_watch2\_ defined in Xray. ``` jf audit --watches "watch1,watch2" @@ -123,34 +131,3 @@ Audit the project in the current directory, excluding all files inside the _node ``` jf audit --exclusions "*node_modules*;*to_exclude" ``` - -### Running cUrl - -Execute a cUrl command, using the configured Xray details. The command expects the cUrl client to be included in the PATH. - -#### Commands Params - -| | | -|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Command name | xr curl | -| Abbreviation | xr cl | -| Command options | | -| --server-id |

[Optional]

Server ID configured using the jf c add command. If not specified, the default configured server is used.

| -| Command arguments | | -| cUrl arguments and flags |

The same list of arguments and flags passed to cUrl, except for the following changes:

1. The full Xray URL should not be passed. Instead, the REST endpoint URI should be sent.
2. The login credentials should not be passed. Instead, the --server-id should be used.

| - -#### Example 1 - -Execute the cUrl client, to send a GET request to the /api/system/version endpoint to the default configured Xray server. - -``` -jf xr curl -XGET /api/v1/system/version -``` - -#### Example 2 - -Execute the cUrl client, to send a GET request to the /api/v1/system/version endpoint to the configured my-xr-server server ID. - -``` -jf rt curl -XGET /api/v1/system/version --server-id my-xr-server -``` diff --git a/jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md b/jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md index cf0cb80..0d754c7 100644 --- a/jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md +++ b/jfrog-applications/jfrog-cli/cli-plugins/developer-guide.md @@ -58,7 +58,7 @@ Well, plugins can do almost anything. The sky is the limit. 2. You can also add other Go packages to your *go.mod* and use them in your code. 3. You can package any external resources, such as executables or configuration files, and have them published alongside your plugin. Read more about - this [here](jfrog-cli-plugins-developer-guide.md#having-your-plugin-use-external-resources) + this [here](developer-guide.md#having-your-plugin-use-external-resources) ## Including plugins in the official registry diff --git a/jfrog-applications/jfrog-cli/get-started/configurations/README.md b/jfrog-applications/jfrog-cli/get-started/configurations/README.md index 5059b91..4598f5e 100644 --- a/jfrog-applications/jfrog-cli/get-started/configurations/README.md +++ b/jfrog-applications/jfrog-cli/get-started/configurations/README.md @@ -1,2 +1,2 @@ -# Configurations +# Configurations diff --git a/jfrog-applications/jfrog-cli/get-started/configurations/jfrog-platform-configuration.md b/jfrog-applications/jfrog-cli/get-started/configurations/jfrog-platform-configuration.md index e1286f2..7726c21 100644 --- a/jfrog-applications/jfrog-cli/get-started/configurations/jfrog-platform-configuration.md +++ b/jfrog-applications/jfrog-cli/get-started/configurations/jfrog-platform-configuration.md @@ -10,26 +10,26 @@ This command is solely interactive, meaning it does not receive any options and ## Creating Access Tokens -This command allows creating [Access Tokens](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) for users in the JFrog Platform. By default, an user-scoped token will be created. Administrators may provide the scope explicitly with '--scope', or implicitly with '--groups', '--grant-admin'. +This command allows creating [Access Tokens](https://jfrog.com/help/r/jfrog-platform-administration-documentation/access-tokens) for users in the JFrog Platform. By default, a user-scoped token will be created. Administrators may provide the scope explicitly with '--scope', or implicitly with '--groups', '--grant-admin'. ### Commands Params | | | -| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Command name | access-token-create | | Abbreviation | atc | -| Command arguments | | +| **Command arguments:** | | | username | The username for which this token is created. If not specified, the token will be created for the current user. | -| Command options | | -| --audience |

[Optional]

A space-separated list of the other instances or services that should accept this token identified by their Service-IDs.

| -| --description |

[Optional]

Free text token description. Useful for filtering and managing tokens. Limited to 1024 characters.

| -| --expiry |

[Optional]

The amount of time, in seconds, it would take for the token to expire. Must be non-negative. If not provided, the platform default will be used. To specify a token that never expires, set to zero. Non-admin may only set a value that is equal or lower than the platform default that was set by an administrator (1 year by default).

| -| --grant-admin |

[Default: false]

Set to true to provide admin privileges to the access token. This is only available for administrators.

| -| --groups |

[Optional]

A list of comma-separated groups for the access token to be associated with. This is only available for administrators.

| -| --project |

[Optional]

The project for which this token is created. Enter the project name on which you want to apply this token.

| -| --reference |

[Default: false]

Generate a Reference Token (alias to Access Token) in addition to the full token (available from Artifactory 7.38.10).

| -| --refreshable |

[Default: false]

Set to true if you'd like the token to be refreshable. A refresh token will also be returned in order to be used to generate a new token once it expires.

| -| --scope |

[Optional]

The scope of access that the token provides. This is only available for administrators.

| +| **Command options:** | | +| `--audience` |

[Optional]

A space-separated list of the other instances or services that should accept this token identified by their Service-IDs.

| +| `--description` |

[Optional]

Free text token description. Useful for filtering and managing tokens. Limited to 1024 characters.

| +| `--expiry` |

[Optional]

The amount of time, in seconds, it would take for the token to expire. Must be non-negative. If not provided, the platform default will be used. To specify a token that never expires, set to zero. Non-admin may only set a value that is equal or lower than the platform default that was set by an administrator (1 year by default).

| +| `--grant-admin` |

[Default: false]

Set to true to provide admin privileges to the access token. This is only available for administrators.

| +| `--groups` |

[Optional]

A list of comma-separated(,) groups for the access token to be associated with. This is only available for administrators.

| +| `--project` |

[Optional]

The project for which this token is created. Enter the project name on which you want to apply this token.

| +| `--reference` |

[Default: false]

Generate a Reference Token (alias to Access Token) in addition to the full token (available from Artifactory 7.38.10).

| +| `--refreshable` |

[Default: false]

Set to true if you'd like the token to be refreshable. A refresh token will also be returned in order to be used to generate a new token once it expires.

| +| `--scope` |

[Optional]

The scope of access that the token provides. This is only available for administrators.

| ### Examples @@ -54,28 +54,28 @@ jf atc toad The **config add** and **config edit** commands are used to add and edit JFrog Platform server configuration, stored in JFrog CLI's configuration storage. These configured servers can be used by the other commands. The configured servers' details can be overridden per command by passing in alternative values for the URL and login credentials. The values configured are saved in file under the JFrog CLI home directory. | | | -| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Command Name | config add / config edit | | Abbreviation | c add / c edit | -| Command options | | -| --access-token |

[Optional]

Access token.

| -| --artifactory-url |

[Optional]

Artifactory URL.

| -| --basic-auth-only |

[Default: false]

Used for Artifactory authentication. Set to true to disable replacing username and password/API key with automatically created access token that's refreshed hourly. Username and password/API key will still be used with commands which use external tools or the JFrog Distribution service. Can only be passed along with username and password/API key options.

| -| --client-cert-key-path |

[Optional]

Private key file for the client certificate in PEM format.

| -| --client-cert-path |

[Optional]

Client certificate file in PEM format.

| -| --dist-url |

[Optional]

Distribution URL.

| -| --enc-password |

[Default: true]

If true, the configured password will be encrypted using Artifactory'sencryption API before being stored. If false, the configured password will not be encrypted.

| -| --insecure-tls |

[Default: false]

Set to true to skip TLS certificates verification, while encrypting the Artifactory password during the config process.

| -| --interactive |

[Default: true, unless $CI is true]

Set to false if you do not want the config command to be interactive.

| -| --mission-control-url |

[Optional]

Mission Control URL.

| -| --password |

[Optional]

JFrog Platform password.

| -| --pipelines-url |

[Optional]

Pipelines URL.

| -| --ssh-key-path |

[Optional]

For authentication with Artifactory. SSH key file path.

| -| --url |

[Optional]

JFrog platform URL.

| -| --user |

[Optional]

JFrog Platform username.

| -| --xray-url | \[Optional] Xray URL. | -| --overwrite |

[Available for config add only]

[Default: false]

Overwrites the instance configuration if an instance with the same ID already exists.

| -| Command arguments | | +| **Command options:** | | +| `--access-token` |

[Optional]

Access token.

| +| `--artifactory-url` |

[Optional]

JFrog Artifactory URL. (example: https://acme.jfrog.io/artifactory)

| +| `--basic-auth-only` |

[Default: false]

Used for Artifactory authentication. Set to true to disable replacing username and password/API key with automatically created access token that's refreshed hourly. Username and password/API key will still be used with commands which use external tools or the JFrog Distribution service. Can only be passed along with username and password/API key options.

| +| `--client-cert-key-path` |

[Optional]

Private key file for the client certificate in PEM format.

| +| `--client-cert-path` |

[Optional]

Client certificate file in PEM format.

| +| `--dist-url` |

[Optional]

Distribution URL. (example: https://acme.jfrog.io/distribution)

| +| `--enc-password` |

[Default: true]
If true, the configured password will be encrypted using Artifactory's encryption API before being stored. If false, the configured password will not be encrypted.

| +| `--insecure-tls` |

[Default: false]

Set to true to skip TLS certificates verification, while encrypting the Artifactory password during the config process.

| +| `--interactive` |

[Default: true, unless $CI is true]

Set to false if you do not want the config command to be interactive.

| +| `--mission-control-url` |

[Optional]

JFrog Mission Control URL. (example: https://acme.jfrog.io/ms)

| +| `--password` |

[Optional]

JFrog Platform password.

| +| `--pipelines-url` |

[Optional]

JFrog Pipelines URL. (example: https://acme.jfrog.io/pipelines)

| +| `--ssh-key-path` |

[Optional]

For authentication with Artifactory. SSH key file path.

| +| `--url` |

[Optional]

JFrog Platform URL. (example: https://acme.jfrog.io)

| +| `--user` |

[Optional]

JFrog Platform username.

| +| `--xray-url` | \[Optional] Xray URL. (example: https://acme.jfrog.io/xray) | +| `--overwrite` |

[Available for config add only]
[Default: false]
Overwrites the instance configuration if an instance with the same ID already exists.

| +| **Command arguments:** | | | server ID | A unique ID for the server configuration. | ## Removing Configured Servers @@ -83,23 +83,24 @@ The **config add** and **config edit** commands are used to add and edit JFrog P The _config remove_ command is used to remove JFrog Platform server configuration, stored in JFrog CLI's configuration storage. | | | -| ----------------- | ------------------------------------------------------------------------------------ | +|-------------------|--------------------------------------------------------------------------------------| | Command name | config remove | | Abbreviation | c rm | -| Command options | | -| --quiet |

[Default: $CI]

Set to true to skip the delete confirmation message.

| -| Command arguments | | +| **Command options:** | | +| `--quiet` |

[Default: $CI]

Set to true to skip the delete confirmation message.

| +| **Command arguments:** | | | server ID | The server ID to remove. If no argument is sent, all configured servers are removed. | + ## Showing the Configured Servers The _config show_ command shows the stored configuration. You may show a specific server's configuration by sending its ID as an argument to the command. | | | -| ----------------- | --------------------------------------------------------------------------------------- | +|-------------------|-----------------------------------------------------------------------------------------| | Command name | config show | | Abbreviation | c s | -| Command arguments | | +| **Command arguments:** | | | server ID | The ID of the server to show. If no argument is sent, all configured servers are shown. | ## Setting a Server as Default @@ -107,9 +108,9 @@ The _config show_ command shows the stored configuration. You may show a specifi The _config use_ command sets a configured server as default. The following commands will use this server. | | | -| ----------------- | --------------------------------------- | +|-------------------|-----------------------------------------| | Command name | config use | -| Command arguments | | +| **Command arguments:** | | | server ID | The ID of the server to set as default. | ## Exporting and Importing Configuration @@ -119,19 +120,19 @@ The _config export_ command generates a token, which stores the server configura ### Export | | | -| ----------------- | ------------------------------ | +|-------------------|--------------------------------| | Command name | config export | | Abbreviation | c ex | -| Command arguments | | +| **Command arguments:** | | | server ID | The ID of the server to export | ### Import | | | -| ----------------- | ------------------- | +|-------------------|---------------------| | Command name | config import | | Abbreviation | c im | -| Command arguments | | +| **Command arguments:** | | | server token | The token to import | ## Sensitive Data Encryption diff --git a/jfrog-applications/jfrog-cli/get-started/configurations/proxy-support.md b/jfrog-applications/jfrog-cli/get-started/configurations/proxy-support.md index 069b261..a12de1e 100644 --- a/jfrog-applications/jfrog-cli/get-started/configurations/proxy-support.md +++ b/jfrog-applications/jfrog-cli/get-started/configurations/proxy-support.md @@ -4,8 +4,8 @@ JFrog CLI supports using an HTTP/S proxy. All you need to do is set HTTP\_PROXY HTTP\_PROXY, HTTPS\_PROXY and NO\_PROXY are the industry standards for proxy usages. -| Variable Name | Description | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| HTTP\_PROXY | Determines a URL to an HTTP proxy. | -| HTTPS\_PROXY | Determines a URL to an HTTPS proxy. | -| NO\_PROXY | Use this variable to bypass the proxy to IP addresses, subnets or domains. This may contain a comma-separated list of hostnames or IPs without protocols and ports. A typical usage may be to set this variable to Artifactory’s IP address. | +| Variable Name | Description | +|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| HTTP\_PROXY | Determines a URL to an HTTP proxy. | +| HTTPS\_PROXY | Determines a URL to an HTTPS proxy. | +| NO\_PROXY | Use this variable to bypass the proxy to IP addresses, subnets or domains. This may contain a comma-separated(,) list of hostnames or IPs without protocols and ports. A typical usage may be to set this variable to Artifactory’s IP address. | diff --git a/jfrog-applications/jfrog-cli/get-started/configurations/setting-up-a-ci-pipeline.md b/jfrog-applications/jfrog-cli/get-started/configurations/setting-up-a-ci-pipeline.md deleted file mode 100644 index f2152c2..0000000 --- a/jfrog-applications/jfrog-cli/get-started/configurations/setting-up-a-ci-pipeline.md +++ /dev/null @@ -1,27 +0,0 @@ -# Setting up a CI Pipeline - -The **ci-setup** command allows setting up a basic CI pipeline with the JFrog Platform, while automatically configuring the JFrog Platform to serve the pipeline. It is an interactive command, which prompts you with a series for questions, such as your source control details, your build tool, build command and your CI provider. The command then uses this information to do following: - -* Create the repositories in JFrog Artifactory, to be used by the pipeline to resolve dependencies. -* Configure JFrog Xray to scan the build. -* Generate a basic CI pipeline, which builds and scans your code. - -You can use the generated CI pipeline as a working starting point and then expand it as needed. - -The command currently supports the following package managers: - -* Maven -* Gradle -* npm. - -and the following CI providers: - -* JFrog Pipelines -* Jenkins -* GitHub Actions. - -Usage: - -``` -jf ci-setup -``` diff --git a/jfrog-applications/jfrog-cli/get-started/download-and-install/install.md b/jfrog-applications/jfrog-cli/get-started/download-and-install/install.md index b04a7d5..56cdfbc 100644 --- a/jfrog-applications/jfrog-cli/get-started/download-and-install/install.md +++ b/jfrog-applications/jfrog-cli/get-started/download-and-install/install.md @@ -91,7 +91,7 @@ brew install jfrog-cli #### Install with cUrl ``` -url -fL https://install-cli.jfrog.io | sh +curl -fL https://install-cli.jfrog.io | sh ``` #### Download with cUrl diff --git a/jfrog-applications/jfrog-cli/get-started/download-and-install/usage.md b/jfrog-applications/jfrog-cli/get-started/download-and-install/usage.md index 3324351..cb7f609 100644 --- a/jfrog-applications/jfrog-cli/get-started/download-and-install/usage.md +++ b/jfrog-applications/jfrog-cli/get-started/download-and-install/usage.md @@ -1,8 +1,6 @@ # Usage -To use the CLI, [install](https://jfrog.com/getcli/) it on your local machine, or [download](https://jfrog.com/getcli/) its executable, place it anywhere in your file system and add its location to your - -`PATH` environment variable. +To use the CLI, [install](https://jfrog.com/getcli/) it on your local machine, or [download](https://jfrog.com/getcli/) its executable, place it anywhere in your file system and add its location to your `PATH` environment variable. **Environment Variables** @@ -10,14 +8,14 @@ The **jf options** command displays all the supported environment variables. JFrog CLI makes use of the following environment variables: -| Variable Name | Description | -| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **JFROG\_CLI\_LOG\_LEVEL** |

[Default: INFO]

This variable determines the log level of the JFrog CLI. Possible values are: DEBUG, INFO, WARN and ERROR. If set to ERROR, JFrog CLI logs error messages only. It is useful when you wish to read or parse the JFrog CLI output and do not want any other information logged.

| -| **JFROG\_CLI\_LOG\_TIMESTAMP** |

[Default: TIME]

Controls the log messages timestamp format. Possible values are: TIME, DATE_AND_TIME, and OFF.

| -| **JFROG\_CLI\_HOME\_DIR** |

[Default: ~/.jfrog]

Defines the JFrog CLI home directory.

| -| **JFROG\_CLI\_TEMP\_DIR** |

[Default: The operating system's temp directory]

Defines the temp directory used by JFrog CLI.

| -| **JFROG\_CLI\_PLUGINS\_SERVER** |

[Default: Official JFrog CLI Plugins registry]

Configured Artifactory server ID from which to download JFrog CLI Plugins.

| -| **JFROG\_CLI\_PLUGINS\_REPO** |

[Default: 'jfrog-cli-plugins']

Can be optionally used with the JFROG_CLI_PLUGINS_SERVER environment variable. Determines the name of the local repository to use.

| -| **JFROG\_CLI\_RELEASES\_REPO** |

Configured Artifactory repository name from which to download the jar needed by the mvn/gradle command.
This environment variable's value format should be <server ID configured by the 'jf c add' command>/<repo name>.
The repository should proxy https://releases.jfrog.io.
This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command, when used for maven or gradle projects.

| -| **JFROG\_CLI\_SERVER\_ID** | Server ID configured using the config command, unless sent as a command argument or option. | -| **CI** |

[Default: false]

If true, disables interactive prompts and progress bar.

| +| Variable Name | Description | +|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **JFROG\_CLI\_LOG\_LEVEL** |

[Default: INFO]

This variable determines the log level of the JFrog CLI. Possible values are: DEBUG, INFO, WARN and ERROR. If set to ERROR, JFrog CLI logs error messages only. It is useful when you wish to read or parse the JFrog CLI output and do not want any other information logged.

| +| **JFROG\_CLI\_LOG\_TIMESTAMP** |

[Default: TIME]

Controls the log messages timestamp format. Possible values are: TIME, DATE_AND_TIME, and OFF.

| +| **JFROG\_CLI\_HOME\_DIR** |

[Default: ~/.jfrog]

Defines the JFrog CLI home directory.

| +| **JFROG\_CLI\_TEMP\_DIR** |

[Default: The operating system's temp directory]

Defines the temp directory used by JFrog CLI.

| +| **JFROG\_CLI\_PLUGINS\_SERVER** |

[Default: Official JFrog CLI Plugins registry]

Configured Artifactory server ID from which to download JFrog CLI Plugins.

| +| **JFROG\_CLI\_PLUGINS\_REPO** |

[Default: 'jfrog-cli-plugins']

Can be optionally used with the JFROG_CLI_PLUGINS_SERVER environment variable. Determines the name of the local repository to use.

| +| **JFROG\_CLI\_RELEASES\_REPO** |

Configured Artifactory repository name from which to download the jar needed by the mvn/gradle command.
This environment variable's value format should be server ID configured by the 'jf c add' command.
The repository should proxy https://releases.jfrog.io.
This environment variable is used by the 'jf mvn' and 'jf gradle' commands, and also by the 'jf audit' command, when used for maven or gradle projects.

| +| **JFROG\_CLI\_SERVER\_ID** | Server ID configured using the 'jf config' command, unless sent as a command argument or option. | +| **CI** |

[Default: false]

If true, disables interactive prompts and progress bar.

| diff --git a/jfrog-applications/jfrog-security-features/sast/README.md b/jfrog-applications/jfrog-security-features/sast/README.md index 6d312c5..844b5b0 100644 --- a/jfrog-applications/jfrog-security-features/sast/README.md +++ b/jfrog-applications/jfrog-security-features/sast/README.md @@ -4,7 +4,7 @@ ### What is JFrog SAST? -
FASTEasy setup with just a few steps
FOCUSEDDeep analysis with focus on security issues
LOCAL & SECUREWork locally in your environment
+
FASTEasy setup with just a few steps
FOCUSEDDeep analysis with focus on security issues
LOCAL SECUREWork locally in your environment
The JFrog SAST solution aims to enable software developers to hunt, fix, and learn about security issues in their code while allowing them to deliver fast, quality code, and reduce issues. @@ -19,7 +19,7 @@ JFrog SAST scans mainly for specific sensitive operations (DB queries, OS comman * SQL injections * Command injections * Code injections -* SSRF +* SSRF It also detects cases when certain APIs (encryption, cryptographic signing, file operations, etc.) are used with parameters or under circumstances that render the API use unsafe. diff --git a/jfrog-applications/jfrog-security-features/sast/ignore-findings.md b/jfrog-applications/jfrog-security-features/sast/ignore-findings.md index 7699a7c..af4b782 100644 --- a/jfrog-applications/jfrog-security-features/sast/ignore-findings.md +++ b/jfrog-applications/jfrog-security-features/sast/ignore-findings.md @@ -2,7 +2,7 @@ #### Ignore a Specific Finding -The SAST scanner allows you to ignore a vulnerability finding simply by placing an `jfrog-ignore` annotation directly in the code. Place the `jfrog-ignore` annotation as a comment above the 'sink' line of the vulnerability (the final line in the data flow). +The SAST scanner allows you to ignore a vulnerability finding simply by placing an `jfrog-ignore` annotation directly in the code. Place the `jfrog-ignore` annotation as a comment above the `sink` line of the vulnerability (the final line in the data flow). The following example shows how to ignore an unsafe-deserialization issue: diff --git a/jfrog-applications/jfrog-security-features/sast/supported-technologies.md b/jfrog-applications/jfrog-security-features/sast/supported-technologies.md index 656afc5..6c6d614 100644 --- a/jfrog-applications/jfrog-security-features/sast/supported-technologies.md +++ b/jfrog-applications/jfrog-security-features/sast/supported-technologies.md @@ -1,4 +1,4 @@ # Supported Technologies -
JavaScript/TypeScript

Supports JS up to ECMAScript 2016/ES7. TypeScript is also supported.

Note: JSX is not supported

PythonSupports Python versions 3.0 to 3.11
JavaSupports all Java versions up to version 19
+
JavaScript/TypeScript

Supports JS up to ECMAScript 2016/ES7. TypeScript is also supported.

Note: JSX is not supported

PythonSupports Python versions 3.0 to 3.11
JavaSupports all Java versions up to version 19
GOSupports Go vesions up to version 1.22
diff --git a/jfrog-applications/jfrog-security-for-developers/features/sca.md b/jfrog-applications/jfrog-security-for-developers/features/sca.md index 182d479..e5e437f 100644 --- a/jfrog-applications/jfrog-security-for-developers/features/sca.md +++ b/jfrog-applications/jfrog-security-for-developers/features/sca.md @@ -19,4 +19,4 @@ With JFrog's Software Composition Analysis, get enhanced CVE detection and enhan * Scan pull requests immediately after they are opened but before they are merged. * Get notified if the pull request is about to introduce new vulnerabilities to your code. * Scan the Git repository periodically and create pull requests with fixes for vulnerabilities that are detected. -* Frogbot uses JFrog's vast vulnerabilities database, to which we continuously add new component vulnerability data. +* Frogbot uses JFrog's vast vulnerabilities database, to which we continuously add new component vulnerability data.