Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update security compliance with master #274

Merged
merged 176 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
09ed3fd
set up consumergroup per instance
BlakeHolifield Jun 22, 2023
c3ae27b
fix connection struct
BlakeHolifield Jun 26, 2023
d21b86c
Move Learning Resources to Product Materials (#181)
johnsonm325 Jun 30, 2023
f8958a6
Merge pull request #172 from RedHatInsights/kafka-group-websocket
Hyperkid123 Jul 3, 2023
2807b5e
added search results
rsun19 Jul 3, 2023
1ef693b
rearranged
rsun19 Jul 3, 2023
5e74824
more additions
rsun19 Jul 3, 2023
1d06c6b
added alt titles
rsun19 Jul 3, 2023
2296aea
Merge pull request #183 from rsun19/enhanceVulnerability
Hyperkid123 Jul 4, 2023
9448aee
Merge pull request #182 from rsun19/enhanceIAM
Hyperkid123 Jul 4, 2023
0f335d7
Add additional ROS search terms.
Hyperkid123 Jul 4, 2023
2655ee6
Merge pull request #184 from Hyperkid123/ros-search-results
Hyperkid123 Jul 4, 2023
23605df
add search terms for image-builder
BlakeHolifield Jul 5, 2023
3a21bb6
Removing "Overview" permissions as workaround for RHCLOUD-26924.
dlabrecq Jul 6, 2023
ce3204f
add subscriptions to all services page
InsaneZein Jul 6, 2023
cbbdf79
temporary icon
InsaneZein Jul 6, 2023
a1063f0
Merge pull request #190 from RedHatInsights/add-subscription
Hyperkid123 Jul 7, 2023
f280d5c
Merge pull request #189 from dlabrecq/Workaround
Hyperkid123 Jul 7, 2023
1d84501
Merge pull request #185 from RedHatInsights/RHCLOUD-26342-image-builder
Hyperkid123 Jul 7, 2023
12670c4
Move Learning Resources to Product Materials all envs
Jul 7, 2023
fc2977e
Merge pull request #191 from johnsonm325/4838-2
Hyperkid123 Jul 10, 2023
e638f96
[RHCLOUD-26343] Enhance Search Results: Malware (#187)
rsun19 Jul 10, 2023
d5b4a8d
Rename subs bundle navigation file.
Hyperkid123 Jul 10, 2023
503d7bf
Expose subs UI module on stage preview.
Hyperkid123 Jul 10, 2023
7a0a642
only run on merge
BlakeHolifield Jul 5, 2023
7e08856
Merge pull request #188 from RedHatInsights/gh-action-envfile
Hyperkid123 Jul 10, 2023
5888be6
use credit card icon for services for now
InsaneZein Jul 10, 2023
9c772c3
Merge pull request #194 from RedHatInsights/subscription-icon
Hyperkid123 Jul 11, 2023
506000b
Merge pull request #192 from Hyperkid123/rename-subs-bundle
Hyperkid123 Jul 11, 2023
0b68717
adding sub inv
rsun19 Jul 11, 2023
616ec57
added rhel compliance
rsun19 Jul 11, 2023
9545063
rhel remediations
rsun19 Jul 11, 2023
9128a3f
rhel images
rsun19 Jul 11, 2023
231d74c
[RHIF-209] Move Repositories and RHC from Settings to Insights - Stage
AsToNlele Jul 12, 2023
d92d969
Merge pull request #195 from AsToNlele/RHIF-209
Hyperkid123 Jul 12, 2023
1eb7309
added settings integrations
rsun19 Jul 12, 2023
5961341
added vulnerabillity key words
rsun19 Jul 12, 2023
ffa5f96
Update fed-modules.json
edewit Jul 13, 2023
40af9e6
Remove demo plugins from prod preview of application pipeline
karelhala Jul 13, 2023
61fa7ae
Merge pull request #211 from edewit/patch-1
Hyperkid123 Jul 13, 2023
fe5fa02
Merge pull request #212 from karelhala/remove-demo-plugins
Hyperkid123 Jul 13, 2023
0a18b22
add cost management to static services (#193)
BlakeHolifield Jul 13, 2023
7954e4c
add search terms for compliance (#186)
BlakeHolifield Jul 13, 2023
b1487d6
added keywords for host config
rsun19 Jul 13, 2023
061a9fb
added keywords for policies
rsun19 Jul 13, 2023
26d293f
Merge pull request #216 from rsun19/ansiblePolicies
Hyperkid123 Jul 14, 2023
ae5bf0b
[RHCLOUD-27048] Enhance Search Results: Ansible Advisor (#215)
rsun19 Jul 14, 2023
c9979fd
Merge pull request #214 from rsun19/rhelHostConfig
Hyperkid123 Jul 14, 2023
915556f
Merge pull request #210 from rsun19/rhelVulnerability
Hyperkid123 Jul 14, 2023
1d7fcc1
Merge pull request #208 from rsun19/settingsIntegration
Hyperkid123 Jul 14, 2023
812bf35
Merge pull request #202 from rsun19/rhelImages
Hyperkid123 Jul 14, 2023
0435e23
Merge pull request #201 from rsun19/rhelRemediations
Hyperkid123 Jul 14, 2023
21698ba
Merge pull request #199 from rsun19/rhelCompliance
Hyperkid123 Jul 14, 2023
03db329
Merge pull request #198 from rsun19/subInventory
Hyperkid123 Jul 14, 2023
93ebf72
added patch system key words (#197)
rsun19 Jul 14, 2023
af72427
[RHCLOUD-26966] Enhance Search Results: Trusted Content (#196)
rsun19 Jul 14, 2023
1a39363
add cors rules for dev server
BlakeHolifield Jul 14, 2023
836355d
Merge pull request #217 from RedHatInsights/cors-wss
Hyperkid123 Jul 17, 2023
0ad4060
added keywords for rhel repos
rsun19 Jul 17, 2023
614c075
added keywords to activation keys
rsun19 Jul 17, 2023
cc30c1a
added keywords to advisories
rsun19 Jul 17, 2023
4c9ce86
added keywords to recs
rsun19 Jul 17, 2023
02128b4
added keywords for rhel tasks
rsun19 Jul 17, 2023
0a22577
added manifest keywords
rsun19 Jul 17, 2023
3d06b61
Update fed-modules.json to set correct seatsAdmin scope (#213)
merlante Jul 18, 2023
31c3a8c
added vulnerability keywords (#209)
rsun19 Jul 18, 2023
fc0e127
quay search index (#204)
rsun19 Jul 18, 2023
0cdc550
Merge pull request #220 from rsun19/rhelActivationKeys
Hyperkid123 Jul 18, 2023
47042ac
Merge pull request #221 from rsun19/rhelAdvisories
Hyperkid123 Jul 18, 2023
8802c55
Merge pull request #222 from rsun19/rhelAdvisorEnhance
Hyperkid123 Jul 18, 2023
d999186
Merge pull request #223 from rsun19/rhelTasks
Hyperkid123 Jul 18, 2023
c9d54b0
Merge pull request #225 from rsun19/rhelManifest
Hyperkid123 Jul 18, 2023
c17b9d5
Enable hac learning resources pages.
Hyperkid123 Jul 18, 2023
3e4a2b6
Enable learning resources for subscriptions bundle.
Hyperkid123 Jul 18, 2023
0cacb8e
Add openshift learning resources links.
Hyperkid123 Jul 18, 2023
1105b52
Add ansible learning resources links.
Hyperkid123 Jul 18, 2023
4d33d94
Add edge learning resources links.
Hyperkid123 Jul 18, 2023
62f3ae7
Merge pull request #226 from Hyperkid123/release-learning-resources
Hyperkid123 Jul 18, 2023
03f0a7e
change subscription-services to subscriptions (#227)
InsaneZein Jul 18, 2023
28c9e1f
added keywords for hybrid committed spend (#218)
rsun19 Jul 19, 2023
185bccf
Merge pull request #219 from rsun19/rhelContentRepositories
Hyperkid123 Jul 19, 2023
ca871ab
Fix typo in subscriptions links (#229)
karelhala Jul 19, 2023
bd3da6c
added content package keyword (#224)
rsun19 Jul 20, 2023
05cccf5
added search words for inventory systems (#207)
rsun19 Jul 20, 2023
ccdc0ec
added openshift advisor (#200)
rsun19 Jul 20, 2023
a5a8678
move pages to subscriptions (#230)
InsaneZein Jul 21, 2023
db4eb86
[RHCLOUD-27023] Enhance Search Results: RHEL Drift (#205)
rsun19 Jul 21, 2023
18c00c6
[RHCLOUD-27049] Enhance Search Results: Ansible Drift (#206)
rsun19 Jul 21, 2023
24bcf1c
Revert "move pages to subscriptions (#230)"
InsaneZein Jul 21, 2023
6e8e1a4
Merge pull request #231 from RedHatInsights/revert-230-move-subscript…
InsaneZein Jul 21, 2023
0a1127f
change subscriptions inventory link (#232)
InsaneZein Jul 24, 2023
15c42c6
added rhel policies
rsun19 Jul 24, 2023
705df7c
added patch template
rsun19 Jul 24, 2023
e01846f
Merge pull request #233 from rsun19/rhelPolicies
Hyperkid123 Jul 25, 2023
8d2f31e
Merge pull request #234 from rsun19/patchTemplate
Hyperkid123 Jul 25, 2023
58114c2
update subscription links
InsaneZein Jul 25, 2023
c5f17da
Merge pull request #235 from RedHatInsights/update-subs-links
Hyperkid123 Jul 25, 2023
c6f168a
fix subscriptions usage href
InsaneZein Jul 26, 2023
4d4d2f7
update fed nav
InsaneZein Jul 26, 2023
d050821
Merge pull request #236 from RedHatInsights/subs-usage-nav
InsaneZein Jul 26, 2023
d743bce
Add service accounts UI to iam in stage.
Hyperkid123 Jul 27, 2023
8abb820
Update subscriptions dasboard UI config.
Hyperkid123 Jul 27, 2023
a7c929a
Update learning-resources module in stage beta.
Hyperkid123 Jul 27, 2023
1653cbf
Merge pull request #240 from Hyperkid123/update-learning-resources-path
Hyperkid123 Jul 27, 2023
23da752
Merge pull request #239 from Hyperkid123/service-accounts
Hyperkid123 Jul 27, 2023
1a5e7ef
Pushing up changes from Security-Compliance Branch to Main (#238)
casey-williams-rh Jul 27, 2023
f8857dc
fix learning resources path in stage (#243)
BlakeHolifield Jul 31, 2023
4c6ca0a
Update HCS UI to use billing proxy
dlabrecq Jul 31, 2023
dda9486
feat(ESSNTL-5007):Add Host Stales and Culling Nav item
adonispuente Aug 1, 2023
6d04e2d
Merge pull request #244 from dlabrecq/proxy
Hyperkid123 Aug 2, 2023
f277623
Rename starter app.
Hyperkid123 Aug 2, 2023
af61fe6
[RHINENG-663] Fix AllServices page link names and subtitles (#228)
AsToNlele Aug 2, 2023
64be981
Merge pull request #246 from Hyperkid123/starter-app-rename
Hyperkid123 Aug 2, 2023
a3c9dfd
Merge pull request #245 from adonispuente/ESSNTL-5007
Hyperkid123 Aug 2, 2023
c1f8ecb
[RHIF-209] Move Repositories and RHC from Settings to Insights - PROD…
AsToNlele Aug 2, 2023
067f0ed
feat(ESSNTL-5007): Adds System and Culling to button to prod
adonispuente Aug 2, 2023
746455d
Merge pull request #247 from adonispuente/ESSNTL-5007-2
Hyperkid123 Aug 4, 2023
abeb363
[RHINENG-663] Fix AllServices page link names and subtitles - Prod
AsToNlele Aug 4, 2023
50ee4f0
Merge pull request #248 from AsToNlele/RHINENG-663-prod
Hyperkid123 Aug 4, 2023
1d326de
Removed HCS permission check
dlabrecq Aug 4, 2023
a162765
Merge pull request #249 from dlabrecq/proxy
Hyperkid123 Aug 7, 2023
29ab2dc
add notifications overhaul feature flag
InsaneZein Aug 7, 2023
75692ec
remove duplicate learningresources
InsaneZein Aug 7, 2023
86ece97
Merge pull request #250 from RedHatInsights/notif-nav-updates
Hyperkid123 Aug 8, 2023
1dc20d7
Move subs usage to /subs/usage (#251)
karelhala Aug 9, 2023
4297c39
Adjust subscription navigation to match app's expected routes
karelhala Aug 10, 2023
cd7acf4
Merge pull request #252 from karelhala/adjust-subs-nav
Hyperkid123 Aug 10, 2023
e370843
Add scope to HCS module (stage)
Aug 11, 2023
c6b3a77
Updates for renamed Seats Admin module
wscalf Aug 14, 2023
d477f49
Merge pull request #254 from wscalf/main
Hyperkid123 Aug 14, 2023
12d97db
Update SeatsAdmin stage beta to handle renames
wscalf Aug 14, 2023
ea69d2b
Add seats admin prod without navigation
wscalf Aug 14, 2023
1ae5cad
Merge pull request #255 from wscalf/update-ciam-seats-stage-preview
Hyperkid123 Aug 15, 2023
d193eca
Merge pull request #256 from wscalf/add-seats-admin-to-prod
Hyperkid123 Aug 15, 2023
a1fd585
add segment API keys for ansible modules
apinkert Aug 15, 2023
3161e34
update beta fed-modules for ansible API keys
apinkert Aug 16, 2023
51b797b
Merge pull request #257 from RedHatInsights/ansible-segment-keys
Hyperkid123 Aug 16, 2023
da539db
Add Cost Management settings nav link
dlabrecq Aug 17, 2023
5f34ebc
Merge pull request #258 from dlabrecq/settings
Hyperkid123 Aug 17, 2023
f2d3522
Provisioning in production stable
ezr-ondrej Aug 21, 2023
71d3534
Perform search indexing dry run as part of PR checks
florkbr Aug 22, 2023
d309ee6
Merge pull request #253 from lorenzobenvenuti/billing-scope-preprod
Hyperkid123 Aug 22, 2023
0cc11db
Enable PR checking of search index validation
florkbr Aug 22, 2023
595754d
Fix existing search index errors so PR pipeline passes
florkbr Aug 22, 2023
89b19ef
Merge pull request #260 from florkbr/improve-search-pr-checks
Hyperkid123 Aug 23, 2023
e6c4ab6
Merge pull request #259 from ezr-ondrej/provisioning_prod_stable
Hyperkid123 Aug 23, 2023
e0c0689
content-sources goes GA
jlsherrill Aug 23, 2023
4a45a2a
Merge pull request #261 from jlsherrill/cs_prod-stable
Hyperkid123 Aug 23, 2023
955b7e4
add intercom keys for ansible/acs modules
apinkert Aug 23, 2023
de3ac4e
feat(RHINGENG-1298): Learning Resources Updates
adonispuente Aug 23, 2023
902fd83
Merge pull request #262 from adonispuente/RHINGENG-1298
Hyperkid123 Aug 24, 2023
7df16ad
Update user preferences to allow settings notifications as well
karelhala Aug 25, 2023
1364267
update secrets for acs and ansible
apinkert Aug 25, 2023
e0bf29d
Merge pull request #264 from karelhala/add-user-preferences-settings
Hyperkid123 Aug 28, 2023
b374582
add fake keys for ephemeral
apinkert Aug 28, 2023
071fe48
Merge pull request #263 from RedHatInsights/intercom-ansible-acs
apinkert Aug 28, 2023
13b73c4
Add service accounts to prod preview navigation
karelhala Aug 28, 2023
a2730d7
Merge pull request #265 from karelhala/service-accounts-fed-mods
Hyperkid123 Aug 29, 2023
ef84cd7
Add feature flag for Cost management settings page
dlabrecq Aug 29, 2023
629afce
add docs for adding intercom keys
apinkert Aug 29, 2023
aec2cbc
Merge pull request #267 from RedHatInsights/intercom-docs
apinkert Aug 29, 2023
60e631d
Merge pull request #266 from dlabrecq/settings
Hyperkid123 Aug 30, 2023
663242a
Add scope to HCS module (prod)
Aug 31, 2023
9afc8ae
Merge pull request #268 from lorenzobenvenuti/billing-scope-prod
Hyperkid123 Aug 31, 2023
a58067f
Remove Applications nav now that Cost Management settings has moved
dlabrecq Aug 31, 2023
79a4504
Merge pull request #269 from dlabrecq/delete-settings
Hyperkid123 Aug 31, 2023
47e9371
Remove isBeta flag from RHEL Repositories app
leSamo Sep 4, 2023
5749948
Merge pull request #270 from leSamo/repositories-not-beta
Hyperkid123 Sep 4, 2023
22f4632
Add ssoScopes config docs.
Hyperkid123 Sep 4, 2023
a2e8de6
Merge pull request #271 from Hyperkid123/sso-url-docs
Hyperkid123 Sep 4, 2023
44bef1f
feat: configuration for Directory & Domain Service
avisiedo Jun 28, 2023
724348f
Merge pull request #241 from avisiedo/hms-2031-domain-registry
Hyperkid123 Sep 5, 2023
069131e
Adjust subscription inventory module selection
karelhala Sep 6, 2023
7c67274
Merge pull request #273 from karelhala/adjust-subs-inventory
Hyperkid123 Sep 6, 2023
a162ca2
empty commit
aleccohan Sep 6, 2023
1a3f3f6
Merge branch 'security-compliance' into update-security-compliance-wi…
aleccohan Sep 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Go package

on:
# These will only run from a known contributor
push:
branches:
- main
pull_request_target:

jobs:
pr_check:
Expand Down Expand Up @@ -61,9 +61,9 @@ jobs:
with:
go-version: '1.18'

- name: 'Create env file'
- name: 'Create env test file'
run: |
echo "${{ secrets.ENV_FILE }}" > .env
cat ./env.actions > .env

- name: Test
run: make test
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ENV GO111MODULE=on
USER root
RUN go get -d -v
RUN make validate-schema
RUN make publish-search-index-dry-run
RUN CGO_ENABLED=1 go build -o /go/bin/chrome-service-backend

# Build the migration binary.
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ validate-schema:
publish-search-index:
go run cmd/search/*

publish-search-index-dry-run: export SEARCH_INDEX_DRY_RUN = true

publish-search-index-dry-run:
go run cmd/search/*

kafka:
podman-compose -f local/kafka-compose.yaml up

Expand Down
4 changes: 3 additions & 1 deletion cmd/kafka/testMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func main() {
Topic: cfg.KafkaConfig.KafkaTopics[0],
Balancer: &kafka.LeastBytes{},
})

defer kafkaWriter.Close()

body := `{
Expand All @@ -45,6 +44,9 @@ func main() {
Value: []byte(body),
}

fmt.Println("Targeting Topic: ", kafkaWriter.Topic)
fmt.Println("Sending message", body)

err := kafkaWriter.WriteMessages(context.TODO(), msg)
if err != nil {
log.Fatalf("Could not write message due to error : %v", err)
Expand Down
81 changes: 61 additions & 20 deletions cmd/search/publishSearchIndex.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"net/url"
"os"
"path/filepath"
"strconv"
"strings"

"github.com/joho/godotenv"
Expand Down Expand Up @@ -96,21 +97,44 @@ func convertAltTitles(jsonEntry interface{}) []string {
return altTitles
}

func flattenLinks(data interface{}) ([]LinkEntry, error) {
func parseLinkEntry(item map[string]interface{}) (LinkEntry, bool) {
id, idOk := item["id"].(string)
if !idOk || len(id) == 0 {
return LinkEntry{}, false
}

title, titleOk := item["title"].(string)
if !titleOk || len(title) == 0 {
return LinkEntry{}, false
}

href, hrefOk := item["href"].(string)
if !hrefOk || len(href) == 0 {
return LinkEntry{}, false
}

return LinkEntry{
Id: id,
Title: title,
Href: href,
}, true
}

func flattenLinks(data interface{}, locator string) ([]LinkEntry, error) {
flatData := []LinkEntry{}

topLevel, ok := data.(map[string]interface{})
// this is top section or a group item of nav file
if ok && topLevel["navItems"] != nil {
data, err := flattenLinks(topLevel["navItems"])
data, err := flattenLinks(topLevel["navItems"], fmt.Sprintf("%s.%s", locator, "navItems"))
return append(flatData, data...), err
}

// argument came in as an array
isArray, ok := data.([]interface{})
if ok {
for _, item := range isArray {
items, err := flattenLinks(item)
for i, item := range isArray {
items, err := flattenLinks(item, fmt.Sprintf("%s[%d]", locator, i))
if err != nil {
return []LinkEntry{}, err
}
Expand Down Expand Up @@ -146,10 +170,10 @@ func flattenLinks(data interface{}) ([]LinkEntry, error) {
_, nestedRoutesOk := i["routes"].([]interface{})
if ok && idOk {
// all of these are required and type assertion can't fail
link := LinkEntry{
Id: id,
Title: i["title"].(string),
Href: i["href"].(string),
link, linkOk := parseLinkEntry(i)
if !linkOk {
err := fmt.Errorf("[ERROR] parsing link for href entry at %s", locator)
return []LinkEntry{}, err
}

// Alternative titles are optional
Expand All @@ -164,13 +188,13 @@ func flattenLinks(data interface{}) ([]LinkEntry, error) {
}
flatData = append(flatData, link)
} else if nestedRoutesOk {
nestedItems, err := flattenLinks(r)
nestedItems, err := flattenLinks(r, fmt.Sprintf("%s.%s", locator, "routes"))
if err != nil {
return []LinkEntry{}, err
}
flatData = append(flatData, nestedItems...)
} else {
fmt.Printf("[WARN] Unable to convert link id %v to string. %v\n", id, i)
fmt.Printf("[WARN] Unable to convert link id %v to string. %v in file %s\n", id, i, locator)
}
}
return flatData, nil
Expand All @@ -181,10 +205,10 @@ func flattenLinks(data interface{}) ([]LinkEntry, error) {
if ok {
href, ok := item["href"].(string)
if ok && len(href) > 0 {
link := LinkEntry{
Id: item["id"].(string),
Title: item["title"].(string),
Href: item["href"].(string),
link, linkOk := parseLinkEntry(item)
if !linkOk {
err := fmt.Errorf("[ERROR] parsing link for href entry at %s", locator)
return []LinkEntry{}, err
}

// Alternative titles are optional
Expand Down Expand Up @@ -379,7 +403,7 @@ func constructIndex(env SearchEnv) ([]ModuleIndexEntry, error) {
return []ModuleIndexEntry{}, err
}

flatData, err := flattenLinks(navItemData)
flatData, err := flattenLinks(navItemData, file)
if err != nil {
return []ModuleIndexEntry{}, err
}
Expand Down Expand Up @@ -515,7 +539,6 @@ func deployIndex(env SearchEnv, envSecret string, ssoHost string, hydraHost stri
if err != nil {
return err
}

index, err := constructIndex(env)
if err != nil {
return err
Expand All @@ -537,6 +560,7 @@ func main() {
Prod: os.Getenv("SEARCH_CLIENT_SECRET_PROD"),
Stage: os.Getenv("SEARCH_CLIENT_SECRET_STAGE"),
}

ssoHosts := EnvMap{
Prod: "https://sso.redhat.com",
Stage: "https://sso.stage.redhat.com",
Expand All @@ -547,14 +571,31 @@ func main() {
Stage: "https://access.stage.redhat.com",
}

dryRun, _ := strconv.ParseBool(os.Getenv("SEARCH_INDEX_DRY_RUN"))

errors := []error{}
for _, env := range []SearchEnv{Stage, Prod} {
fmt.Println("Attempt to publish search index for ", env, " environment.")
err := deployIndex(env, secrets[env], ssoHosts[env], hydraHost[env])
var err error
if dryRun {
fmt.Println("Attempt dry run search index for", env, "environment.")
_, err = constructIndex(env)
} else {
fmt.Println("Attempt to publish search index for", env, "environment.")
err = deployIndex(env, secrets[env], ssoHosts[env], hydraHost[env])
}
if err != nil {
fmt.Println("Failed to deploy search index for ", env, "environment.")
fmt.Println("[ERROR] Failed to deploy search index for", env, "environment.")
fmt.Println(err)
errors = append(errors, err)
}
}

fmt.Println("Search index published successfully")
if len(errors) == 0 {
fmt.Println("Search index published successfully")
} else {
fmt.Println("Search index publishing failed. See above errors.")
if dryRun {
os.Exit(1)
}
}
}
Loading