Skip to content

Commit

Permalink
bugfix: use the tags in the scorecard scaffolded manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
Camila Macedo committed Sep 9, 2020
1 parent 535882d commit e673b61
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
17 changes: 17 additions & 0 deletions changelog/fragments/scorecard_scaffolded_version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
Scaffold scorecard manifests with the tags releases.
# kind is one of:
# - addition
# - change
# - deprecation
# - removal
# - bugfix
kind: "bugfix"
# Is this a breaking change?
breaking: false
11 changes: 6 additions & 5 deletions internal/plugins/scorecard/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"text/template"

"github.com/operator-framework/api/pkg/apis/scorecard/v1alpha3"
Expand All @@ -29,6 +30,7 @@ import (

"github.com/operator-framework/operator-sdk/internal/plugins/util/kustomize"
"github.com/operator-framework/operator-sdk/internal/scorecard"
"github.com/operator-framework/operator-sdk/internal/version"
)

const (
Expand All @@ -54,17 +56,16 @@ patchesJson6902:
)

const (
// defaultTestImageTag points to the latest-released image.
// TODO: change the tag to "latest" once config scaffolding is in a release,
// as the new config spec won't work with the current latest image.
defaultTestImageTag = "quay.io/operator-framework/scorecard-test:master"

// defaultConfigName is the default scorecard componentconfig's metadata.name,
// which must be set on all kustomize-able bases. This name is only used for
// `kustomize build` pattern match and not for on-cluster creation.
defaultConfigName = "config"
)

// defaultTestImageTag points to the latest-released image.
var defaultTestImageTag = fmt.Sprintf("quay.io/operator-framework/scorecard-test:%s",
strings.TrimSuffix(version.Version, "+git"))

// defaultDir is the default directory in which to generate kustomize bases and the kustomization.yaml.
var defaultDir = filepath.Join("config", "scorecard")

Expand Down

0 comments on commit e673b61

Please sign in to comment.