Skip to content

Commit

Permalink
Merge pull request #599 from application-stacks/lcj-update-130
Browse files Browse the repository at this point in the history
Update sample app, go-restful library and exclude sample app image from CD publishing process
  • Loading branch information
leochr authored Dec 1, 2023
2 parents 505ef6f + d451cfe commit 08379b5
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build/_output
build/_test
bin/controller-gen
bin/kustomize
bundle/tests/scorecard/kuttl/kubeconfig
bundle/tests
operators
vendor
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
Expand Down
14 changes: 13 additions & 1 deletion .one-pipeline-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ setup:
echo "${DIGEST}"
echo "${APP}" | jq '.'
if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then
echo "Exclude samples from digest validation: ${ARTIFACT}"
continue
fi
SAVED_DIGEST="$(skopeo inspect docker://$ARTIFACT | jq '.Digest'| sed -e 's/"//g')"
if [[ ${DIGEST} == ${SAVED_DIGEST} ]]; then
echo "Image, $ARTIFACT, passes validation"
Expand Down Expand Up @@ -64,12 +69,19 @@ deploy:
for INVENTORY_ENTRY in $(echo "${INVENTORY_ENTRIES}" | jq -r '.[] '); do
APP=$(cat "${INVENTORY_PATH}/${INVENTORY_ENTRY}")
ARTIFACT=$(echo "${APP}" | jq -r '.artifact')
echo "${ARTIFACT}"
if [[ "${ARTIFACT}" == *"icr.io/appcafe/open-liberty/samples/"* ]];then
echo "Exclude samples from publishing: ${ARTIFACT}"
continue
fi
NAME=$(echo "${APP}" | jq -r '.name')
DIGEST=$(echo "${APP}" | jq -r '.sha256' )
TYPE=$(echo "${APP}" | jq -r '.type' )
REPO=$(echo "${APP}" | jq -r '.repository_url' ).git
COMMIT=$(echo "${APP}" | jq -r '.commit_sha' )
echo "${ARTIFACT}"
#echo "${ARTIFACT##*/}"
IMAGE_NAME="${ARTIFACT##*/}"
echo "Image name: $IMAGE_NAME"
Expand Down
10 changes: 5 additions & 5 deletions bundle/manifests/runtime-component.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
"name": "runtimecomponent-sample"
},
"spec": {
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d",
"expose": true,
"manageTLS": true,
"replicas": 1,
Expand Down Expand Up @@ -44,7 +44,7 @@ metadata:
"name": "runtimecomponent-sample"
},
"spec": {
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d",
"expose": true,
"replicas": 1,
"service": {
Expand All @@ -71,7 +71,7 @@ metadata:
categories: Application Runtime
certified: "true"
containerImage: icr.io/appcafe/runtime-component-operator:daily
createdAt: "2023-11-03T22:14:54Z"
createdAt: "2023-12-01T03:25:43Z"
description: Deploys any runtime component with dynamic and auto-tuning configuration
olm.skipRange: '>=0.8.0 <1.3.0'
operators.openshift.io/infrastructure-features: '["disconnected"]'
Expand Down Expand Up @@ -1006,7 +1006,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down Expand Up @@ -1289,7 +1289,7 @@ spec:
provider:
name: Community
relatedImages:
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
name: liberty-sample-app
- image: icr.io/appcafe/runtime-component-operator:daily
name: runtime-component-operator
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: OPERATOR_IMAGE
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion config/samples/rc.app.stacks_v1_runtimecomponent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: RuntimeComponent
metadata:
name: runtimecomponent-sample
spec:
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
expose: true
manageTLS: true
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: runtimecomponent-sample
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
expose: true
replicas: 1
service:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE=
github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
Expand Down
2 changes: 1 addition & 1 deletion internal/deploy/kubectl/runtime-component-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ spec:
- name: WATCH_NAMESPACE
value: RUNTIME_COMPONENT_WATCH_NAMESPACE
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:bd489232ab238c3d5b484108aa4e48dd296a5022119c251f31238c4f65a2469f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b295be1aeefeae9f36b991a70dfd8ef615e3f4a849d6d6091cf51f55221e3c0d
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down

0 comments on commit 08379b5

Please sign in to comment.