Skip to content

Commit

Permalink
Fixed the version bump during the release in deploy artifacts (#247)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
  • Loading branch information
jpkrohling authored Mar 1, 2019
1 parent fc10364 commit f233687
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
24 changes: 21 additions & 3 deletions .travis/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,32 @@ OPERATOR_VERSION=$(echo ${OPERATOR_VERSION} | grep -Po "([\d\.]+)")
TAG=${TAG:-"v${OPERATOR_VERSION}"}
BUILD_IMAGE=${BUILD_IMAGE:-"${BASE_BUILD_IMAGE}:${OPERATOR_VERSION}"}

sed "s~image: jaegertracing\/jaeger-operator\:.*~image: ${BUILD_IMAGE}~gi" -i deploy/operator.yaml
sed "s~image: jaegertracing\/jaeger-operator\:.*~image: ${BUILD_IMAGE}~gi" -i deploy/operator-openshift.yaml
# changes to deploy/operator.yaml
sed "s~image: jaegertracing/jaeger-operator.*~image: ${BUILD_IMAGE}~gi" -i deploy/operator.yaml

# changes to deploy/olm-catalog/jaeger.package.yaml
sed "s/currentCSV: jaeger-operator.*/currentCSV: jaeger-operator.v${OPERATOR_VERSION}/gi" -i deploy/olm-catalog/jaeger.package.yaml

# changes to deploy/olm-catalog/jaeger-operator.csv.yaml
sed "s~containerImage: docker.io/jaegertracing/jaeger-operator.*~containerImage: docker.io/${BUILD_IMAGE}~gi" -i deploy/olm-catalog/jaeger-operator.csv.yaml
sed "s/name: jaeger-operator\.v.*/name: jaeger-operator.v${OPERATOR_VERSION}/gi" -i deploy/olm-catalog/jaeger-operator.csv.yaml
sed "s~image: jaegertracing/jaeger-operator.*~image: ${BUILD_IMAGE}~gi" -i deploy/olm-catalog/jaeger-operator.csv.yaml
## there's a "version: v1alpha1" there somewhere...
sed -E "s/version: ([0-9\.]+).*/version: ${OPERATOR_VERSION}/gi" deploy/olm-catalog/jaeger-operator.csv.yaml

# changes to test/operator.yaml
sed "s~image: jaegertracing/jaeger-operator.*~image: ${BUILD_IMAGE}~gi" -i test/operator.yaml

git diff -s --exit-code
if [[ $? == 0 ]]; then
echo "No changes detected. Skipping."
else
git add deploy/operator.yaml deploy/operator-openshift.yaml
git add \
deploy/operator.yaml \
deploy/olm-catalog/jaeger.package.yaml \
deploy/olm-catalog/jaeger-operator.csv.yaml \
test/operator.yaml

git commit -qm "Release ${TAG}" --author="Jaeger Release <[email protected]>"
git tag ${TAG}
git push --repo=https://${GH_WRITE_TOKEN}@github.com/jaegertracing/jaeger-operator.git --tags
Expand Down
10 changes: 5 additions & 5 deletions deploy/olm-catalog/jaeger-operator.csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
"spec": {
"strategy": "allInOne",
"allInOne": {
"image": "jaegertracing/all-in-one:1.9",
"image": "jaegertracing/all-in-one:1.10",
"options": {
"log-level": "debug",
"query": {
Expand Down Expand Up @@ -54,11 +54,11 @@ metadata:
]
categories: tracing, monitoring, troubleshooting
certified: "false"
containerImage: docker.io/jaegertracing/jaeger-operator:1.9.0
containerImage: docker.io/jaegertracing/jaeger-operator:1.10.0
createdAt: "2019-01-09T12:00:00Z"
support: Jaeger
creationTimestamp: null
name: jaeger-operator.v1.9.0
name: jaeger-operator.v1.10.0
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -156,7 +156,7 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: jaeger-operator
image: jaegertracing/jaeger-operator:1.9.1
image: jaegertracing/jaeger-operator:1.10.0
imagePullPolicy: Always
name: jaeger-operator
ports:
Expand Down Expand Up @@ -242,4 +242,4 @@ spec:
selector:
matchLabels:
name: jaeger-operator
version: 1.9.0
version: 1.10.0
2 changes: 1 addition & 1 deletion deploy/olm-catalog/jaeger.package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packageName: jaeger
channels:
- name: alpha
currentCSV: jaeger-operator.v1.9.0
currentCSV: jaeger-operator.v1.10.0
2 changes: 1 addition & 1 deletion deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: jaeger-operator
containers:
- name: jaeger-operator
image: jaegertracing/jaeger-operator:1.9.2
image: jaegertracing/jaeger-operator:1.10.0
ports:
- containerPort: 60000
name: metrics
Expand Down
2 changes: 1 addition & 1 deletion test/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
serviceAccountName: jaeger-operator
containers:
- name: jaeger-operator
image: jaegertracing/jaeger-operator:1.9.1
image: jaegertracing/jaeger-operator:1.10.0
ports:
- containerPort: 60000
name: metrics
Expand Down

0 comments on commit f233687

Please sign in to comment.