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

Tracking pull request to merge release-0.2.0 to main #73

Merged
merged 152 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 141 commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
1a576e9
update to 0.2.0
kuanfandevops Dec 20, 2021
5ab888a
Superset changes (#74)
kuanfandevops Dec 20, 2021
fd87a5c
add sysdig (#76)
kuanfandevops Dec 20, 2021
4e33026
resolve log4j issue
kuanfandevops Dec 20, 2021
9c8888a
Hydrogen Fleet Model, Migration & Loader (#75)
popkinj Dec 21, 2021
3297f25
update backup container (#77)
kuanfandevops Dec 21, 2021
63b7d5a
Update the value of minio endpoint (#78)
kuanfandevops Dec 21, 2021
9e283da
Dev resource 0.2.0 (#79)
kuanfandevops Dec 22, 2021
73e7f99
Fixed the routes so they don't do multi-loads (#81)
amichard Jan 6, 2022
9f87861
Combined the superset containers into one (#82)
amichard Jan 6, 2022
a6bde69
Data Fleets Table (#83)
popkinj Jan 7, 2022
ef60446
ARC Project Tracking (#84)
popkinj Jan 12, 2022
1893595
Cthub 128 - whitelisted users (#85)
emi-hi Jan 12, 2022
b356146
Made secret key as an environment variable (#86)
amichard Jan 19, 2022
f59d785
Rebuild metabase on prod 0.2.0 (#88)
kuanfandevops Aug 18, 2022
7c614b1
update for metabase
kuanfandevops Dec 14, 2022
a7ccaf8
Update issue templates (#89)
kcabhar Jan 4, 2023
11cabc7
Update issue templates (#90)
kcabhar Jan 18, 2023
7c18b42
update logoutHostName
kuanfandevops Jan 20, 2023
d04936b
release based pipeline (#91)
kuanfandevops Jan 23, 2023
591aa09
add repo name
kuanfandevops Jan 23, 2023
976b55f
remove dev pr based
kuanfandevops Jan 23, 2023
ce8d934
update db secret name
kuanfandevops Jan 24, 2023
9740769
add DB_HOST
kuanfandevops Jan 24, 2023
983777c
Update README.md (#95)
kcabhar Feb 6, 2023
e5b6760
Update build-release.yaml
kuanfandevops Apr 14, 2023
1b80839
chore: add logging to get new preferred_usernames (#98)
tim738745 May 31, 2023
8c0e678
add instruction how to migrate to crunchydb (#116)
kuanfandevops Oct 6, 2023
5cbb4e1
connect to crunchy (#126)
kuanfandevops Nov 28, 2023
df0158e
Update namespace name
kuanfandevops Nov 28, 2023
fb9d0c6
fix: adds filllna to 0 for numeric columns (#131)
emi-hi Nov 28, 2023
71c03ed
Fix: emily- cthub 122 get upload utility working (#133)
emi-hi Dec 4, 2023
da7c977
Feat: Cthub 146 - upload feedback (#147)
emi-hi Feb 6, 2024
1993c2f
increase memory for frontend build
kuanfandevops Feb 7, 2024
dfab6dd
feat: adds error handling for remainder of scripts (#153)
emi-hi Feb 9, 2024
de85df7
update approvers
kuanfandevops Feb 9, 2024
762589a
add two new env vars for backend doc uploads
kuanfandevops Feb 9, 2024
27e217a
replace minio with object storeage
kuanfandevops Feb 13, 2024
e5067fe
cthub-167 chore: replaces whitelisted users table with user, permissi…
emi-hi Feb 26, 2024
4eab603
Feat: Download Dataset Spreadsheet #150 (#176)
JulianForeman Feb 27, 2024
d4aed6d
update minioBucketName
kuanfandevops Feb 28, 2024
fa79229
fix: 169 - get uploader working on test (#184)
tim738745 Feb 28, 2024
657eae4
update backend host name
kuanfandevops Feb 29, 2024
31b03b0
fix: 150 - add xlsxwriter (#189)
tim738745 Mar 1, 2024
ff7136d
Feat Cthub 168 PARTIAL admin page (#193)
emi-hi Mar 4, 2024
6cdb4d4
CTHUB - Frontend styling for upload and user permissions page (#196)
emi-hi Mar 5, 2024
bfebc70
fix: aligns names vertically in row (#202)
emi-hi Mar 5, 2024
31add50
add new ci pipeline (#206)
kuanfandevops Mar 5, 2024
9c74d89
update folder location
kuanfandevops Mar 5, 2024
f52674b
update SUFFIX
kuanfandevops Mar 6, 2024
4027640
update trigger for frontend build
kuanfandevops Mar 6, 2024
3a66850
feat: 201 - Logout button + cleanup (#214)
tim738745 Mar 12, 2024
33d6803
feat: CTHUB 198 - save/update users (#218)
emi-hi Mar 13, 2024
90a27ca
feat CTHUB 212 : clear upload message (#219)
emi-hi Mar 13, 2024
de6b1dd
feat: 197 - header and footer components (#216)
tim738745 Mar 13, 2024
3ea275e
feat: 210 - page refinements + cleanup (#223)
tim738745 Mar 14, 2024
d83893f
chore: fixes padding on app-body, disables adding empty string for ne…
emi-hi Mar 14, 2024
58d5470
update frontend build
kuanfandevops Mar 14, 2024
825c20b
feat: 210 - do not display "download spreadsheet" when no dataset sel…
tim738745 Mar 14, 2024
353f044
list the build foders
kuanfandevops Mar 14, 2024
0a0a870
update to docker strategy
kuanfandevops Mar 14, 2024
daf9116
update Dockerfile-Openshift file name
kuanfandevops Mar 14, 2024
027e565
udpate docker build
kuanfandevops Mar 14, 2024
dffb50e
upgrade npm
kuanfandevops Mar 14, 2024
5c84544
add yes to insall webpack-cli
kuanfandevops Mar 14, 2024
96f18fa
install webpack client globally
kuanfandevops Mar 14, 2024
dadcc2f
move webpack to dev dependencies
kuanfandevops Mar 14, 2024
2ec07d8
try to fin modules
kuanfandevops Mar 14, 2024
a1e9a3b
install webpack as dev dependency
kuanfandevops Mar 14, 2024
b3a9428
update NODE_PATH
kuanfandevops Mar 14, 2024
710d004
set ENV NODE_PATH
kuanfandevops Mar 14, 2024
eb71f73
install copy-webpack-plugin
kuanfandevops Mar 14, 2024
aa37e7c
install all modules
kuanfandevops Mar 14, 2024
99fa3aa
install all dev dependencies with -g
kuanfandevops Mar 14, 2024
5c00681
move NODE_ENV right before run build
kuanfandevops Mar 14, 2024
3bd731f
copy the right folder
kuanfandevops Mar 14, 2024
c8a6b6a
remove tekton
kuanfandevops Mar 14, 2024
2d2465c
Backend build 0.2.0 (#251)
kuanfandevops Mar 15, 2024
7f76c06
disable django migration
kuanfandevops Mar 15, 2024
22ea4f4
open the CD
kuanfandevops Mar 15, 2024
442a169
feat: CTHUB 248 -Delete user (#253)
emi-hi Mar 18, 2024
1fc06f7
update backend bind port 8080
kuanfandevops Mar 19, 2024
0d6c368
update to use node 16
kuanfandevops Mar 19, 2024
b1b3fc2
not to install npm latest
kuanfandevops Mar 19, 2024
900b0d7
rebuild frontend using create-react-app (#259)
tim738745 Mar 22, 2024
0ff4150
add --force for npm or it will fail
kuanfandevops Mar 22, 2024
50f1ffd
use node 20
kuanfandevops Mar 22, 2024
b2a6368
update oc-login
kuanfandevops Mar 22, 2024
b906d15
add noCache forcePull for frontend build
kuanfandevops Mar 26, 2024
7ac5ef1
only build backend
kuanfandevops Mar 26, 2024
0ab45cd
updtae frontend docker build
kuanfandevops Mar 26, 2024
135dc51
update docker build
kuanfandevops Mar 26, 2024
abb058c
update build folder
kuanfandevops Mar 26, 2024
f0d49c1
open the backend build
kuanfandevops Mar 26, 2024
a6d5ba6
Add Superset (#123)
kuanfandevops Mar 26, 2024
e3f4e0d
chore: 164 - metabase models on git (#256)
tim738745 Mar 27, 2024
c5c7928
update workflow (#262)
kuanfandevops Mar 28, 2024
b995aec
only apply on prod
kuanfandevops Mar 28, 2024
167afa0
update frontend build
kuanfandevops Mar 28, 2024
4bb115f
tag after test approval
kuanfandevops Mar 28, 2024
73813fc
Feat: Uploader & Error Refactor #166 (#188)
JulianForeman Mar 28, 2024
ae5f367
Removing dataset from dropdown to be added back later (#265)
JulianForeman Mar 28, 2024
6edc458
test new pip
kuanfandevops Mar 28, 2024
912eeb2
login to test
kuanfandevops Mar 28, 2024
f077a30
read pre-release number from backend
kuanfandevops Mar 28, 2024
0b8fd0f
update dev namespace
kuanfandevops Mar 28, 2024
3cb241a
open deployment on Test
kuanfandevops Mar 28, 2024
73a0a77
correct tagging
kuanfandevops Mar 29, 2024
41c0eb5
login before deploying on test
kuanfandevops Mar 29, 2024
47c9259
task: 257 - add guidance regarding package updates (#260)
tim738745 Apr 2, 2024
f72ea0c
update workflow name
kuanfandevops Apr 2, 2024
31ffce6
show PRE_RELEASE
kuanfandevops Apr 2, 2024
362d4b7
add pre-release to issue title for apprival
kuanfandevops Apr 2, 2024
5fe4d46
add pre-release to issue title for apprival
kuanfandevops Apr 2, 2024
e222907
add prod pipeline
kuanfandevops Apr 2, 2024
beee697
Added more styling options to loading component, loading component no…
JulianForeman Apr 2, 2024
dc677c4
add image cleanup workflow
kuanfandevops Apr 4, 2024
198372b
login first
kuanfandevops Apr 4, 2024
c160949
update image cleanup messages
kuanfandevops Apr 4, 2024
0c0c3c1
coeect var usage
kuanfandevops Apr 4, 2024
3fd442a
add continue-on-error: true
kuanfandevops Apr 4, 2024
247f60a
echo message before delete tool images
kuanfandevops Apr 4, 2024
493f4fe
comment tools env image cleanup
kuanfandevops Apr 4, 2024
897ddbd
update cleanuo script
kuanfandevops Apr 4, 2024
aa8d4f9
update cleanup script
kuanfandevops Apr 4, 2024
ae02852
update test
kuanfandevops Apr 4, 2024
7819e28
further clean up pods, builds and buildconfigs
kuanfandevops Apr 5, 2024
e6f69a6
except crunchy pods
kuanfandevops Apr 5, 2024
1d4deff
ignore cleanup errors
kuanfandevops Apr 5, 2024
fe18401
feat: updates radio text and order (#274)
emi-hi Apr 8, 2024
3215248
Clearing text box on button click & sorting list when adding users (#…
JulianForeman Apr 8, 2024
d7c8592
chore: 217 - install formatters and do initial format (#277)
tim738745 Apr 10, 2024
f4910f3
Task: Backend Tests for Uploader #165 (#276)
JulianForeman Apr 22, 2024
61368a1
task: backend tests for user permissions (#279)
emi-hi Apr 22, 2024
46111d1
cleanup knps:
kuanfandevops Apr 26, 2024
22dd264
Cleanup 0.2.0 (#286)
kuanfandevops Apr 26, 2024
68c76c4
Adding test for changing a user's permissions (#290)
JulianForeman May 8, 2024
da1eb07
Task: Go Electric Rebates Uploader Update #283 (#287)
JulianForeman May 8, 2024
e577b06
feat: 284 and 285 - vin decoding (#289)
tim738745 May 14, 2024
ff66bab
Updating model & constants (#302)
JulianForeman May 21, 2024
a11e976
fix: CTHUB 297 Adds success/error message to icbc vin upload (#303)
emi-hi May 22, 2024
0704a0d
Task queue 0.2.0 (#309)
kuanfandevops May 24, 2024
0eb128c
add taskq build
kuanfandevops May 24, 2024
11d22b3
cleanup
kuanfandevops May 24, 2024
ebf6f43
update task queue image tag
kuanfandevops May 24, 2024
c403ed1
feat: adds redirect to login page if user attempts any axios call aft…
emi-hi May 27, 2024
53f2b12
feat: disables save button on user permissions until any permission i…
emi-hi May 27, 2024
abe1730
update cleanup cron
kuanfandevops May 27, 2024
7dbf76d
fix: 285 - update default chunksize for processing vin files (#313)
tim738745 May 28, 2024
bead5c5
tag taskq image for test
kuanfandevops Jun 4, 2024
ee2c0e0
add task queue to prod pipeline
kuanfandevops Jun 5, 2024
eda1af2
update knps
kuanfandevops Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug
about: An undesirable behaviour that needs correction
title: Bug
labels: ''
assignees: ''

---

**Describe the Bug**
A clear and concise description of what the bug is.

**Expected Behaviour**
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what actually happens.

**Implications**
A clear and concise description of any implications.

**Steps To Reproduce**
Steps to reproduce the behaviour:
User/Role:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/spike.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Spike
about: Research options prior to development work
title: Spike
labels: ''
assignees: ''

---

**Problem Description**
**In order to** (achieve some goal), (a system or persona) **needs to** (some action).

**Solution Needs**
- Enter the non-negotiables of the solution (what are the needs vs. what are the wants)

**Timebox**
- How much effort are we committing to this research?

**Outcome**
Details describing the outcome of the research
- Was it successful? What direction should the work go?
- Was it unsuccessful? Discuss next steps with team

**Additional Context**
- enter text here
- enter text here
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Task
about: Any work that does not directly impact the user
title: Task
labels: ''
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Purpose**
The reason why this task is needed and/or what value it adds.

**Acceptance Criteria**
- [ ] first
- [ ] second
- [ ] third

**Additional context**
- Add any other context about the task here.
- Or here
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/user-story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: User Story
about: This template is to be used when describing a feature from the user's perspective
title: User Story
labels: ''
assignees: ''

---

**Title:**

**Description:**

**Wireframe:** <link>

**Purpose and benefit to user:**

**Acceptance Criteria:**

- [ ] Given I am a <role>, When I am <doing something>, then <this happens>
- [ ] Given I am a <role>, When I am <doing something>, then <this happens>

**Development Checklist:**
- [ ] A
- [ ] B
- [ ] C

**Notes:**
150 changes: 150 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
## For each release, the value of workflow name, branches, PR_NUMBER and RELEASE_NAME need to be adjusted accordingly
## Also change the .pipelin/lib/config.js version number
name: CTHUB v0.2.0

on:
# push:
# branches: [ release-0.2.0 ]
workflow_dispatch:
workflow_call:

env:
## The pull request number of the Tracking pull request to merge the release branch to main
PR_NUMBER: 73
RELEASE_NAME: release-0.2.0

jobs:

## This is the CI job
build:

name: Build CTHUB on Openshift
runs-on: ubuntu-latest
timeout-minutes: 60

steps:

## it will checkout to /home/runner/work/cthub/cthub
- name: Check out repository
uses: actions/checkout@v3

# open it when cthub updated the python packages
#- name: Run django tests
# uses: kuanfandevops/django-test-action@cthub-django-test
# with:
# settings-dir-path: "backend/cthub"
# requirements-file: "backend/requirements.txt"
# managepy-dir: backend

## Log in to Openshift with a token of service account
- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools

## Run build on Openshift
- name: Run build
run: |
cd .pipeline
npm install
npm run build -- --pr=${{ env.PR_NUMBER }} --env=build

# deploy-on-dev:

# name: Deploy CTHUB on Dev Environment
# runs-on: ubuntu-latest
# timeout-minutes: 60
# needs: build

# steps:

# - name: Check out repository
# uses: actions/checkout@v3

# - name: Log in to Openshift
# uses: redhat-actions/[email protected]
# with:
# openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
# openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# insecure_skip_tls_verify: true
# namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev

# - name: Run BCDK deployment on CTHUB Dev environment
# run: |
# cd .pipeline
# echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Dev"
# npm install
# npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=dev

# deploy-on-test:

# name: Deploy CTHUB on Test Environment
# runs-on: ubuntu-latest
# timeout-minutes: 60
# needs: deploy-on-dev

# steps:

# - name: Check out repository
# uses: actions/checkout@v3

# - name: Log in to Openshift
# uses: redhat-actions/[email protected]
# with:
# openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
# openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# insecure_skip_tls_verify: true
# namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-test

# - name: Ask for approval for CTHUB Test deployment
# uses: trstringer/[email protected]
# with:
# secret: ${{ github.TOKEN }}
# approvers: emi-hi,tim738745,kuanfandevops,JulianForeman
# minimum-approvals: 1
# issue-title: "CTHUB ${{ env.RELEASE_NAME }} Test Deployment"

# - name: Run BCDK deployment on CTHUB Test environment
# run: |
# cd .pipeline
# echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Test"
# npm install
# npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=test

deploy-on-prod:

name: Deploy CTHUB on Prod Environment
runs-on: ubuntu-latest
timeout-minutes: 60
# needs: deploy-on-test

steps:

- name: Check out repository
uses: actions/checkout@v3

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-prod

- name: Ask for approval for CTHUB Prod deployment
uses: trstringer/[email protected]
with:
secret: ${{ github.TOKEN }}
approvers: emi-hi,tim738745,kuanfandevops,JulianForeman
minimum-approvals: 2
issue-title: "CTHUB ${{ env.RELEASE_NAME }} Prod Deployment"

- name: Run BCDK deployment on CTHUB Prod environment
run: |
cd .pipeline
echo "Deploying CTHUB ${{ env.RELEASE_NAME }} on Prod"
npm install
npm run deploy -- --pr=${{ env.PR_NUMBER }} --env=prod
95 changes: 95 additions & 0 deletions .github/workflows/cleanup-imagetags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Scheduled cleanup unused images
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
# At 00:00 on Sunday.

jobs:

cleanup-images:
runs-on: ubuntu-latest
steps:

- name: Log in to Openshift
uses: redhat-actions/[email protected]
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
insecure_skip_tls_verify: true
namespace: ${{ env.TOOLS_NAMESPACE }}

- name: cleanup-images
continue-on-error: true
run: |

#!/bin/bash

# This script will delete all image tags for both frontend and backend except the one being referenced

# The sample of search_string is cthub-backend:0.2.0-20240403221450
# The sample of oc_output could include
# cthub-backend:0.2.0-20240403210040
# cthub-backend:0.2.0-20240403211844
# cthub-backend:0.2.0-20240403221450
# The script will remove the first two image tags

delete_resources() {
local search_string="$1"
local oc_output="$2"
local namepace="$3"

# Check if the oc_output is empty
if [ -z "$oc_output" ]; then
echo "Error: No output provided."
return 1
fi

# Loop through each line in the oc output
while IFS= read -r line; do
# Check if the line contains the search string
if [[ "$line" != *"$search_string"* ]]; then
# Extract the name of the resource from the line
resource_name=$(echo "$line" | awk '{print $1}')
# Delete the resource
oc -n "$namepace" delete imagetag/"$resource_name"
fi
done <<< "$oc_output"
}

# Define the search string
search_string=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev describe deploymentconfig/cthub-dev-backend | grep Image | awk -F '/' '{print $NF}')
# Run the oc command and store the output in a variable
oc_output=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev get imagetags | grep cthub-backend | awk '{print $1}')
namespace="${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev"
echo "Will delete all cthub-bakcend image tags in ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev except $search_string"
delete_resources "$search_string" "$oc_output" "$namespace"

# Define the search string
search_string=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev describe deployment/cthub-dev-frontend | grep Image | awk -F '/' '{print $NF}')
# Run the oc command and store the output in a variable
oc_output=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev get imagetags | grep cthub-frontend | awk '{print $1}')
echo "Will delete all cthub-frontend image tags in ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev except $search_string"
namespace="${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev"
delete_resources "$search_string" "$oc_output" "$namespace"

echo "will delete images in tools env"
frontendimages=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get imagetags | grep cthub-frontend | awk '{print $1}')
if [ ! -z "$frontendimages" ]; then
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get imagetags | grep cthub-frontend | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools delete imagetag
fi

backendimages=$(oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get imagetags | grep cthub-backend | awk '{print $1}')
if [ ! -z "$backendimages" ]; then
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get imagetags | grep cthub-backend | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools delete imagetag
fi

echo "Cleaning up Completed pods on Dev except CrunchyDB pods"
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev get pods | grep Completed | grep -v crunchy | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-dev delete pod || true

echo "Cleaning up Complete and Failed builds on Tools"
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get builds | grep Complete | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools delete build || true
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get builds | grep Failed | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools delete build || true

echo "Cleaning up buildconfigs on Tools"
oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools get buildconfig | awk '{print $1}' | xargs oc -n ${{ secrets.OPENSHIFT_NAMESPACE_PLATE }}-tools delete buildconfig || true
Loading