Skip to content

Commit

Permalink
Fix kie-issues #1236 - Replace quay.io with docker.io, review version…
Browse files Browse the repository at this point in the history
….go (apache#466)

* Fix kie-issues #1236 - Replace quay.io with docker.io, review version.go

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix env.sh and bump-version.sh scripts

Signed-off-by: Ricardo Zanini <[email protected]>

* Fix small typos

Signed-off-by: Ricardo Zanini <[email protected]>

---------

Signed-off-by: Ricardo Zanini <[email protected]>
  • Loading branch information
ricardozanini authored and rgdoliveira committed Jul 8, 2024
1 parent a190a9d commit 1fb0557
Show file tree
Hide file tree
Showing 32 changed files with 96 additions and 121 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
# kiegroup.org/kogito-serverless-operator-bundle:$VERSION and kiegroup.org/kogito-serverless-operator-catalog:$VERSION.
IMAGE_TAG_BASE ?= quay.io/kiegroup/kogito-serverless-operator-nightly
IMAGE_TAG_BASE ?= docker.io/apache/incubator-kie-sonataflow-operator

# BUNDLE_IMG defines the image:tag used for the bundle.
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
Expand Down
2 changes: 1 addition & 1 deletion bddframework/pkg/api/app/v1beta1/kogitoservices.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ type KogitoServiceSpec struct {
Env []corev1.EnvVar `json:"env,omitempty"`

// +optional
// Image definition for the service. Example: "quay.io/kiegroup/kogito-service:latest".
// Image definition for the service. Example: "docker.io/apache/incubator-kie-kogito-service:latest".
//
// On OpenShift an ImageStream will be created in the current namespace pointing to the given image.
// +operator-sdk:csv:customresourcedefinitions:type=spec
Expand Down
2 changes: 1 addition & 1 deletion bddframework/pkg/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func AppendImageDefaultValues(image *api.Image) {
}

if len(image.Tag) == 0 {
image.Tag = GetKogitoImageVersion(version.OperatorVersion)
image.Tag = GetKogitoImageVersion(version.GetTagVersion())
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apiVersion: v1
data:
DEFAULT_WORKFLOW_EXTENSION: .sw.json
Dockerfile: "FROM quay.io/kiegroup/kogito-swf-builder-nightly:latest AS builder\n\n#
Dockerfile: "FROM docker.io/apache/incubator-kie-sonataflow-builder:main AS builder\n\n#
variables that can be overridden by the builder\n# To add a Quarkus extension
to your application\nARG QUARKUS_EXTENSIONS\n# Args to pass to the Quarkus CLI
add extension command\nARG QUARKUS_ADD_EXTENSION_ARGS\n# Additional java/mvn arguments
to pass to the builder\nARG MAVEN_ARGS_APPEND\n\n# Copy from build context to
skeleton resources project\nCOPY --chown=1001 . ./resources\n\nRUN /home/kogito/launch/build-app.sh
./resources\n \n#=============================\n# Runtime Run\n#=============================\nFROM
registry.access.redhat.com/ubi9/openjdk-17:latest\n\nENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'\n
\ \n# We make four distinct layers so if there are application changes the library
layers can be re-used\nCOPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/lib/
registry.access.redhat.com/ubi9/openjdk-17-runtime:latest\n\nENV LANG='en_US.UTF-8'
LANGUAGE='en_US:en'\n \n# We make four distinct layers so if there are application
changes the library layers can be re-used\nCOPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/lib/
/deployments/lib/\nCOPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/*.jar
/deployments/\nCOPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/app/
/deployments/app/\nCOPY --from=builder --chown=185 /home/kogito/serverless-workflow-project/target/quarkus-app/quarkus/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ metadata:
]
capabilities: Basic Install
categories: Application Runtime
containerImage: quay.io/kiegroup/kogito-serverless-operator-nightly:latest
containerImage: docker.io/apache/incubator-kie-sonataflow-operator:main
description: SonataFlow Kubernetes Operator for deploying workflow applications
based on the CNCF Serverless Workflow specification
operators.operatorframework.io/builder: operator-sdk-v1.25.0
Expand Down Expand Up @@ -761,7 +761,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: quay.io/kiegroup/kogito-serverless-operator-nightly:latest
image: docker.io/apache/incubator-kie-sonataflow-operator:latest
livenessProbe:
httpGet:
path: /healthz
Expand Down
4 changes: 2 additions & 2 deletions config/manager/SonataFlow-Builder.containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/kiegroup/kogito-swf-builder-nightly:latest AS builder
FROM docker.io/apache/incubator-kie-sonataflow-builder:main AS builder

# variables that can be overridden by the builder
# To add a Quarkus extension to your application
Expand All @@ -16,7 +16,7 @@ RUN /home/kogito/launch/build-app.sh ./resources
#=============================
# Runtime Run
#=============================
FROM registry.access.redhat.com/ubi9/openjdk-17:latest
FROM registry.access.redhat.com/ubi9/openjdk-17-runtime:latest

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'

Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: quay.io/kiegroup/kogito-serverless-operator-nightly
newName: docker.io/apache/incubator-kie-sonataflow-operator
newTag: latest
# Patching the manager deployment file to add an env var with the operator namespace in
patchesJson6902:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
alm-examples: '[]'
capabilities: Basic Install
categories: Application Runtime
containerImage: quay.io/kiegroup/kogito-serverless-operator-nightly:latest
containerImage: docker.io/apache/incubator-kie-sonataflow-operator:main
description: SonataFlow Kubernetes Operator for deploying workflow applications
based on the CNCF Serverless Workflow specification
operators.operatorframework.io/internal-objects: '["sonataflowbuilds.sonataflow.org"]'
Expand Down
4 changes: 2 additions & 2 deletions container-builder/builder/kubernetes/builder_kaniko_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func TestNewBuildWithKanikoCustomizations(t *testing.T) {
addFlags[0] = "--use-new-run=true"

// create the new build, schedule with cache enabled, a specific set of resources and additional flags
build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "quay.io/kiegroup/buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "docker.io/apache/incubator-kie-buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
AddResource("Dockerfile", dockerFile).
AddResource("greetings.sw.json", workflowDefinition).
WithClient(c).
Expand Down Expand Up @@ -134,7 +134,7 @@ func TestNewBuildWithKanikoWithBuildArgsAndEnv(t *testing.T) {
},
}

build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "quay.io/kiegroup/buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "docker.io/apache/incubator-kie-buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
AddResource("Dockerfile", dockerFile).
AddResource("greetings.sw.json", workflowDefinition).
WithClient(c).
Expand Down
2 changes: 1 addition & 1 deletion container-builder/builder/kubernetes/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestNewBuild(t *testing.T) {
},
}
// create the new build, schedule
build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "quay.io/kiegroup/buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
build, err := NewBuild(ContainerBuilderInfo{FinalImageName: "docker.io/apache/incubator-kie-buildexample:latest", BuildUniqueName: "build1", Platform: platform}).
WithClient(c).
AddResource("Dockerfile", dockerFile).
AddResource("greetings.sw.json", workflowDefinition).
Expand Down
2 changes: 1 addition & 1 deletion container-builder/builder/kubernetes/testdata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

FROM quay.io/kiegroup/kogito-swf-builder-nightly:latest AS builder
FROM docker.io/apache/incubator-kie-sonataflow-builder:main AS builder

# Kogito User
USER 1001
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: platform-kaniko-using-cache
spec:
publishStrategy: "Kaniko"
baseImage: quay.io/kiegroup/kogito-swf-builder-nightly:latest
baseImage: docker.io/apache/incubator-kie-sonataflow-builder:main
registry:
address: quay.io/kiegroup
secret: regcred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

FROM quay.io/kiegroup/kogito-swf-builder-nightly:latest AS builder
FROM docker.io/apache/incubator-kie-sonataflow-builder:main AS builder

# Kogito User
USER 1001
Expand Down
11 changes: 8 additions & 3 deletions controllers/builder/openshiftbuilder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"context"
"testing"

"github.com/apache/incubator-kie-kogito-serverless-operator/controllers/platform"
buildv1 "github.com/openshift/api/build/v1"
imgv1 "github.com/openshift/api/image/v1"
buildfake "github.com/openshift/client-go/build/clientset/versioned/fake"
Expand Down Expand Up @@ -142,15 +143,19 @@ func Test_openshiftbuilder_forcePull(t *testing.T) {
// Setup
ns := t.Name()
workflow := test.GetBaseSonataFlow(ns)
platform := test.GetBasePlatformInReadyPhase(t.Name())
pl := test.GetBasePlatformInReadyPhase(t.Name())
config := test.GetSonataFlowBuilderConfig(ns)

dockerFile := config.Data[defaultBuilderResourceName]
config.Data[defaultBuilderResourceName] = platform.ReplaceFromImageTagDockerfile(dockerFile, "FROM image:latest AS builder")

namespacedName := types.NamespacedName{Namespace: workflow.Namespace, Name: workflow.Name}
client := test.NewKogitoClientBuilderWithOpenShift().WithRuntimeObjects(workflow, platform, config).Build()
client := test.NewKogitoClientBuilderWithOpenShift().WithRuntimeObjects(workflow, pl, config).Build()
buildClient := buildfake.NewSimpleClientset().BuildV1()
managerContext := buildManagerContext{
ctx: context.TODO(),
client: client,
platform: platform,
platform: pl,
builderConfigMap: config,
}

Expand Down
6 changes: 6 additions & 0 deletions controllers/platform/platformutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,9 @@ func GetFromImageTagDockerfile(dockerfile string) string {
res := builderDockerfileFromRE.FindAllStringSubmatch(dockerfile, 1)
return strings.Trim(res[0][1], " ")
}

// ReplaceFromImageTagDockerfile replaces the "FROM" clause from the given dockerfile with the given fromReplacement.
// For example: "FROM myimage:latest AS builder"
func ReplaceFromImageTagDockerfile(dockerfile string, fromReplacement string) string {
return string(builderDockerfileFromRE.ReplaceAll([]byte(dockerfile), []byte(fromReplacement)))
}
4 changes: 2 additions & 2 deletions controllers/platform/platformutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func TestSonataFlowBuildController(t *testing.T) {
assert.Fail(t, "Unable to read base Dockerfile")
}
dockerfile := string(dockerfileBytes)
// 1 - Let's verify that the default image is used (for this unit test is quay.io/kiegroup/kogito-swf-builder-nightly:latest)
// 1 - Let's verify that the default image is used (for this unit test is docker.io/apache/incubator-kie-sonataflow-builder:main)
resDefault := GetCustomizedBuilderDockerfile(dockerfile, *platform)
foundDefault, err := regexp.MatchString("FROM quay.io/kiegroup/kogito-swf-builder-nightly:latest AS builder", resDefault)
foundDefault, err := regexp.MatchString("FROM docker.io/apache/incubator-kie-sonataflow-builder:main AS builder", resDefault)
assert.NoError(t, err)
assert.True(t, foundDefault)

Expand Down
22 changes: 4 additions & 18 deletions controllers/platform/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,8 @@ func (d DataIndexHandler) GetServiceImageName(persistenceType constants.Persiste
if persistenceType == constants.PersistenceTypeEphemeral && len(cfg.GetCfg().DataIndexEphemeralImageTag) > 0 {
return cfg.GetCfg().DataIndexEphemeralImageTag
}
var tag = version.GetMajorMinor()
var suffix = ""
if version.IsSnapshot() {
tag = "latest"
//TODO, remove
suffix = constants.ImageNameNightlySuffix
}
// returns "quay.io/kiegroup/kogito-data-index-<persistence_layer>:<tag>"
return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, constants.DataIndexName, persistenceType.String()+suffix, tag)
// returns "docker.io/apache/incubator-kie-kogito-data-index-<persistence_layer>:<tag>"
return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, constants.DataIndexName, persistenceType.String(), version.GetTagVersion())
}

func (d DataIndexHandler) GetServiceName() string {
Expand Down Expand Up @@ -279,15 +272,8 @@ func (j JobServiceHandler) GetServiceImageName(persistenceType constants.Persist
if persistenceType == constants.PersistenceTypeEphemeral && len(cfg.GetCfg().JobsServiceEphemeralImageTag) > 0 {
return cfg.GetCfg().JobsServiceEphemeralImageTag
}
var tag = version.GetMajorMinor()
var suffix = ""
if version.IsSnapshot() {
tag = "latest"
//TODO remove
suffix = constants.ImageNameNightlySuffix
}
// returns "quay.io/kiegroup/kogito-jobs-service-<persistece_layer>:<tag>"
return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, constants.JobServiceName, persistenceType.String()+suffix, tag)
// returns "docker.io/apache/incubator-kie-kogito-jobs-service-<persistece_layer>:<tag>"
return fmt.Sprintf("%s-%s-%s:%s", constants.ImageNamePrefix, constants.JobServiceName, persistenceType.String(), version.GetTagVersion())
}

func (j JobServiceHandler) GetServiceName() string {
Expand Down
8 changes: 2 additions & 6 deletions controllers/profiles/common/constants/platform_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,8 @@ const (

DataIndexServiceName = "data-index-service"
JobServiceName = "jobs-service"
ImageNamePrefix = "quay.io/kiegroup/kogito"
//TODO, the usage of this constant was temporary introduced since only the nightly images are being updated for the
//data-index and jobs-service. And this is causing issues at the time of using the workflows integrated with these, etc.
//This will be removed when the CI is fixed.
ImageNameNightlySuffix = "-nightly"
DataIndexName = "data-index"
ImageNamePrefix = "docker.io/apache/incubator-kie-kogito"
DataIndexName = "data-index"

DefaultDatabaseName string = "sonataflow"
DefaultPostgreSQLPort int = 5432
Expand Down
18 changes: 5 additions & 13 deletions controllers/workflowdef/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@
package workflowdef

import (
"fmt"

"github.com/apache/incubator-kie-kogito-serverless-operator/api/v1alpha08"
"github.com/apache/incubator-kie-kogito-serverless-operator/controllers/cfg"
"github.com/apache/incubator-kie-kogito-serverless-operator/version"
)

const (
latestImageTag = "latest"
nightlySuffix = "nightly"
defaultWorkflowDevModeImage = "quay.io/kiegroup/kogito-swf-devmode"
defaultWorkflowBuilderImage = "quay.io/kiegroup/kogito-swf-builder"
defaultWorkflowDevModeImage = "docker.io/apache/incubator-kie-sonataflow-devmode"
defaultWorkflowBuilderImage = "docker.io/apache/incubator-kie-sonataflow-builder"
)

// GetWorkflowAppImageNameTag returns the image name with tag to use for the image to be produced for a given workflow.
Expand Down Expand Up @@ -63,14 +64,5 @@ func GetDefaultWorkflowBuilderImageTag() string {
}

func GetDefaultImageTag(imgTag string) string {
if version.IsSnapshot() {
imgTag += "-" + nightlySuffix
}
imgTag += ":"
if version.IsLatestVersion() {
imgTag += latestImageTag
} else {
imgTag += version.GetMajorMinor()
}
return imgTag
return fmt.Sprintf("%s:%s", imgTag, version.GetTagVersion())
}
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ when the Operator will be installed, and it contains:

At the startup a [Dockerfile](../config/manager/SonataFlow-Builder.containerfile) is placed in a configmap. This
Dockerfile uses a base image
called [kogito-swf-builder](https://github.com/kiegroup/kogito-images/tree/master/modules/kogito-swf-builder) with:
called [sonataflow-builder](https://github.com/kiegroup/kogito-images/tree/master/modules/sonataflow-builder) with:

- openjdk 11+
- maven 3.8.6+
Expand Down
33 changes: 12 additions & 21 deletions hack/bump-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,40 @@ set -e
script_dir_path=$(dirname "${BASH_SOURCE[0]}")
source "${script_dir_path}"/env.sh

imageTag='quay.io/kiegroup/kogito-serverless-operator'
imageTag='docker.io/apache/incubator-kie-sonataflow-operator'
# shellcheck disable=SC2034
old_version=$(getOperatorVersion)
latest_version=$(getOperatorLatestVersion)
old_version=$(getImageTagVersion)
new_version=$1

if [ -z "${new_version}" ]; then
echo "Please inform the new version"
exit 1
fi

imageSuffix=$(if [[ "${new_version}" == *snapshot ]]; then echo '-nightly'; else echo ''; fi)

oldMajorMinorVersion=${old_version%.*}
newMajorMinorVersion=${new_version%.*}
if [ "${old_version}" = "${latest_version}" ]; then
oldMajorMinorVersion='latest'
fi
if [ "${new_version}" = "${latest_version}" ]; then
newMajorMinorVersion='latest'
fi

echo "Set new version to ${new_version} (img_suffix = '${imageSuffix}', majorMinor = ${newMajorMinorVersion})"
echo "Set new version to ${new_version} (majorMinor = ${newMajorMinorVersion})"

sed -i "s|version: ${old_version}|version: ${new_version}|g" image.yaml

sed -i "s|^VERSION ?=.*|VERSION ?= ${new_version}|g" Makefile
sed -i "s|^REDUCED_VERSION ?=.*|REDUCED_VERSION ?= ${newMajorMinorVersion}|g" Makefile
sed -i "s|newTag:.*|newTag: ${new_version}|g" config/manager/kustomization.yaml

sed -i "s|IMAGE_TAG_BASE ?=.*|IMAGE_TAG_BASE ?= ${imageTag}${imageSuffix}|g" Makefile
sed -i "s|newName:.*|newName: ${imageTag}${imageSuffix}|g" config/manager/kustomization.yaml
sed -i "s|IMAGE_TAG_BASE ?=.*|IMAGE_TAG_BASE ?= ${imageTag}|g" Makefile
sed -i "s|newName:.*|newName: ${imageTag}|g" config/manager/kustomization.yaml

# Update kogito-swf-* images
find . -name "*.yaml" -exec sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" {} +
sed -i "s|quay.io/kiegroup/kogito-swf-builder.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-builder${imageSuffix}:${newMajorMinorVersion}|" Dockerfile
# Update sonataflow-* images
find . -name "*.yaml" -exec sed -i "s|docker.io/apache/incubator-kie-sonataflow-builder.*:${oldMajorMinorVersion}|docker.io/apache/incubator-kie-sonataflow-builder:${newMajorMinorVersion}|" {} +
sed -i "s|docker.io/apache/incubator-kie-sonataflow-builder.*:${oldMajorMinorVersion}|docker.io/apache/incubator-kie-sonataflow-builder:${newMajorMinorVersion}|" Dockerfile

find . -name "*.yaml" -exec sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" {} +
sed -i "s|quay.io/kiegroup/kogito-swf-devmode.*:${oldMajorMinorVersion}|quay.io/kiegroup/kogito-swf-devmode${imageSuffix}:${newMajorMinorVersion}|" Dockerfile
find . -name "*.yaml" -exec sed -i "s|docker.io/apache/incubator-kie-sonataflow-devmode.*:${oldMajorMinorVersion}|docker.io/apache/incubator-kie-sonataflow-devmode:${newMajorMinorVersion}|" {} +
sed -i "s|docker.io/apache/incubator-kie-sonataflow-devmode.*:${oldMajorMinorVersion}|docker.io/apache/incubator-kie-sonataflow-devmode:${newMajorMinorVersion}|" Dockerfile

sed -i -r "s|OperatorVersion =.*|OperatorVersion = \"${new_version}\"|g" version/version.go
sed -i -r "s|operatorVersion =.*|operatorVersion = \"${new_version}\"|g" version/version.go

sed -i "s|containerImage:.*|containerImage: ${imageTag}${imageSuffix}:${newMajorMinorVersion}|g" $(getCsvFile)
sed -i "s|containerImage:.*|containerImage: ${imageTag}:${newMajorMinorVersion}|g" $(getCsvFile)

make generate-all
make vet
Expand Down
8 changes: 4 additions & 4 deletions hack/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ CSV_DIR="config/manifests/bases"
BUNDLE_DIR="bundle/manifests"

getOperatorVersion() {
local version=$(grep -m 1 'OperatorVersion' version/version.go | awk -F\" '{print $2}')
local version=$(grep -m 1 'operatorVersion = ' version/version.go | awk -F\" '{print $2}')
echo "${version}"
}

getOperatorLatestVersion() {
local version=$(grep -m 1 'latestVersion' version/version.go | awk -F\" '{print $2}')
echo "${version}"
getImageTagVersion() {
local tag_version=$(grep -m 1 'tagVersion = ' version/version.go | awk -F\" '{print $2}')
echo "${tag_version}"
}

getOperatorImageName() {
Expand Down
2 changes: 1 addition & 1 deletion hack/local/build-simple-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ mkdir -p /tmp/simpleworkflow
cp ./config/manager/sonataflow_builder_dockerfile.yaml /tmp/simpleworkflow/Dockerfile
cp ./workflowproj/testdata/workflows/workflow-minimal.sw.json /tmp/simpleworkflow/workflow-minimal.sw.json

docker build -t quay.io/kiegroup/sonataflow-minimal-example:latest /tmp/simpleworkflow/
docker build -t docker.io/apache/incubator-kie-sonataflow-minimal-example:latest /tmp/simpleworkflow/
Loading

0 comments on commit 1fb0557

Please sign in to comment.