Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Use quay.io instead of devshift registry (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelis authored and alexeykazakov committed May 29, 2018
1 parent 74b8eaf commit bd8ef7c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.deploy.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM prod.registry.devshift.net/osio-prod/base/golang:latest
FROM quay.io/openshiftio/rhel-base-golang:latest

LABEL maintainer "Devtools <[email protected]>"
LABEL author "Devtools <[email protected]>"
Expand Down
17 changes: 9 additions & 8 deletions cico_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
function load_jenkins_vars() {
if [ -e "jenkins-env" ]; then
cat jenkins-env \
| grep -E "(DEVSHIFT_TAG_LEN|DEVSHIFT_USERNAME|DEVSHIFT_PASSWORD|JENKINS_URL|GIT_BRANCH|GIT_COMMIT|BUILD_NUMBER|ghprbSourceBranch|ghprbActualCommit|BUILD_URL|ghprbPullId)=" \
| grep -E "(DEVSHIFT_TAG_LEN|QUAY_USERNAME|QUAY_PASSWORD|JENKINS_URL|GIT_BRANCH|GIT_COMMIT|BUILD_NUMBER|ghprbSourceBranch|ghprbActualCommit|BUILD_URL|ghprbPullId)=" \
| sed 's/^/export /g' \
> ~/.jenkins-env
source ~/.jenkins-env
Expand Down Expand Up @@ -110,9 +110,10 @@ function tag_push() {

function deploy() {
# Login first
REGISTRY="push.registry.devshift.net"
if [ -n "${DEVSHIFT_USERNAME}" -a -n "${DEVSHIFT_PASSWORD}" ]; then
docker login -u ${DEVSHIFT_USERNAME} -p ${DEVSHIFT_PASSWORD} ${REGISTRY}
REGISTRY="quay.io"

if [ -n "${QUAY_USERNAME}" -a -n "${QUAY_PASSWORD}" ]; then
docker login -u ${QUAY_USERNAME} -p ${QUAY_PASSWORD} ${REGISTRY}
else
echo "Could not login, missing credentials for the registry"
fi
Expand All @@ -123,11 +124,11 @@ function deploy() {
TAG=$(echo $GIT_COMMIT | cut -c1-${DEVSHIFT_TAG_LEN})

if [ "$TARGET" = "rhel" ]; then
tag_push ${REGISTRY}/osio-prod/fabric8-services/fabric8-auth:$TAG
tag_push ${REGISTRY}/osio-prod/fabric8-services/fabric8-auth:latest
tag_push ${REGISTRY}/openshiftio/rhel-fabric8-services-fabric8-auth:$TAG
tag_push ${REGISTRY}/openshiftio/rhel-fabric8-services-fabric8-auth:latest
else
tag_push ${REGISTRY}/fabric8-services/fabric8-auth:$TAG
tag_push ${REGISTRY}/fabric8-services/fabric8-auth:latest
tag_push ${REGISTRY}/openshiftio/fabric8-services-fabric8-auth:$TAG
tag_push ${REGISTRY}/openshiftio/fabric8-services-fabric8-auth:latest
fi

echo 'CICO: Image pushed, ready to update deployed app'
Expand Down
4 changes: 3 additions & 1 deletion openshift/auth.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ objects:
service: auth
spec:
containers:
- image: prod.registry.devshift.net/osio-prod/fabric8-services/fabric8-auth:${IMAGE_TAG}
- image: ${IMAGE}:${IMAGE_TAG}
env:
- name: AUTH_POSTGRES_HOST
valueFrom:
Expand Down Expand Up @@ -238,6 +238,8 @@ objects:
type: ClusterIP
sessionAffinity: null
parameters:
- name: IMAGE
value: prod.registry.devshift.net/osio-prod/fabric8-services/fabric8-auth
- name: IMAGE_TAG
value: latest
- description: Number of deployment replicas
Expand Down

0 comments on commit bd8ef7c

Please sign in to comment.