Created
April 25, 2019 15:13
-
-
Save rthallisey/1e250f90bae891db10e0790952d67199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask rbean@redhat.com for granting access | |
# to redhat-operators-stage | |
QUAY_USERNAME="USERNAME" | |
QUAY_PASSWORD="PASSWORD" | |
TOKEN=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d ' | |
{ | |
"user": { | |
"username": "'"${QUAY_USERNAME}"'", | |
"password": "'"${QUAY_PASSWORD}"'" | |
} | |
}' | jq -r '.token') | |
cat <<EOF | oc create -f - | |
apiVersion: operators.coreos.com/v1 | |
kind: OperatorSource | |
metadata: | |
name: redhat-operators-stage | |
namespace: openshift-marketplace | |
spec: | |
type: appregistry | |
endpoint: https://quay.io/redhat-operators-stage | |
registryNamespace: redhat-operators-stage | |
displayName: "RedHat Operators Stage" | |
publisher: "Red Hat" | |
EOF | |
cat <<EOF | oc create -f - | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: downstream-quay | |
namespace: openshift-marketplace | |
type: Opaque | |
stringData: | |
token: $TOKEN | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment