git clone https://github.com/sagecontinuum/sage-ecr.git
cd sage-ecr
./run.sh -d
export ECR_API="localhost:5000"
export SAGE_USER_TOKEN="token1"
Optional: Use jq
for pretty formatting of json output. jq installation instructions
curl -X POST ${ECR_API}/apps/sage/simple/1.0 -H "Authorization: sage ${SAGE_USER_TOKEN}" --data-binary @./example_app.yaml | jq .
Note: repeating this call will re-upload the app, as long as the field "frozen" is false
curl -X GET ${ECR_API}/apps/sage/simple/1.0 -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
curl -X PUT ${ECR_API}/permissions/sage/simple -H "Authorization: sage ${SAGE_USER_TOKEN}" -d '{"operation":"add", "granteeType": "USER", "grantee": "testuser2", "permission":"WRITE"}' | jq .
verify (view permissions as testuser):
curl ${ECR_API}/permissions/sage/simple -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
verify (view app as testuser2)
curl ${ECR_API}/apps/sage/simple/1.0 -H "Authorization: sage token2" | jq .
curl -X PUT ${ECR_API}/permissions/sage -H "Authorization: sage ${SAGE_USER_TOKEN}" -d '{"operation":"add", "granteeType": "USER", "grantee": "testuser2", "permission":"WRITE"}' | jq .
verify
curl ${ECR_API}/permissions/sage -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
curl ${ECR_API}/namespaces -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
curl ${ECR_API}/repositories/sage -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
curl -X POST ${ECR_API}/builds/sage/simple/1.0 -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
curl -X GET ${ECR_API}/builds/sage/simple/1.0 -H "Authorization: sage ${SAGE_USER_TOKEN}" | jq .
Note: After the start of Jenkins you have to login as user ecrdb with password test. You can skip the "Getting Started" dialogue but clicking the X
in the upper right corner. Then click on the blue button Start using Jenkins
. After that your are logged in. Users can view the Jenkins instance without logging in.