Get dependency from enterprise repository

I have built and published the go dependencies to our enterprise artifactory.
Is there an efficient way to get the files from artifactory and use them in test runs?

My dependencies are in jfrog artifactory.
They appear like the following:


How should I resolve them when I run my tests?

When I set GOPROXY =“value” and tried,

go get

go get unexpected status ( 404 Not Found

How can I go get the pkg from enterprise proxy and execute my tests?

As a temporary hack I am doing:

Then following

cd **$** {TESTDIR}/src

curl -O **$** {pkg}

FIELDS=( **$** (echo **$** {pkg} | awk **'{split($0, arr, /[\/:]*/); for (x in arr) { print arr[x] }}'** ))

INDEX=( **$** (echo **$** {FIELDS[@]/@v//} | cut -d/ -f1 | wc -w | tr -d **' '** ))



FILE= **$** {FIELDS[ **$** {POST_INDEX}]}

unzip **$** {FILE}

FILE= **$** (echo **$** {FILE} | sed -e s/^ **$** {go_local}// -e s/ **$** {zip}//)

SOURCE= **$** (find **$** {TESTDIR}/src -name **$** {FIELDS[ **$** {PREV_INDEX}]}@ **$** {FILE})

DIR= **$** (dirname $SOURCE)

mv $SOURCE **$** {DIR}/ **$** {FIELDS[ **$** {PREV_INDEX}]}

rm -rf **$** {FILE}.zip

Please let me know the correct way of doing it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.