Skip to content

Commit

Permalink
update software used in build (pegasystems#703)
Browse files Browse the repository at this point in the history
* update software used in build

* update test for newer k8s

* update test for new k8s

* add version notes
  • Loading branch information
pega-roska authored Feb 6, 2024
1 parent 151a7be commit 96cbb87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/github-actions-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Pega Chart Build

env:
HELM_URL: https://get.helm.sh
HELM_TGZ: helm-v3.6.3-linux-amd64.tar.gz
YAMLLINT_VERSION: 1.15.0
GO_VERSION: 1.18.3
HELM_TGZ: helm-v3.11.3-linux-amd64.tar.gz
YAMLLINT_VERSION: 1.34.0
GO_VERSION: 1.21.6


on:
Expand All @@ -23,15 +23,15 @@ concurrency:

jobs:
run-supplemental-validation-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Run validate supplementals script
run : |
sh validate_supplementals.sh
run-lint-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
sh validatexml.sh
run-remark-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand All @@ -91,7 +91,7 @@ jobs:
remark -i .remark_ignore -f -u validate-links .
run-go-tests-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Check out repository code
uses: actions/checkout@v3
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
go test ./backingservices | grep "FAIL" -A 8 || true ; test ${PIPESTATUS[0]} -eq 0
run-deploy-job:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: [run-lint-job, run-remark-job, run-go-tests-job]
if: ( github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') ) && success()
steps:
Expand Down
18 changes: 10 additions & 8 deletions terratest/src/test/pega/pega-tier-pdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import (
"k8s.io/api/policy/v1beta1"
)

// Leaving the k8s.io import at v1beta1 for now because it doesn't impact the test and upgrading seems like it would probably require going
// through all the Go dependencies. If this test starts failing in the future due to new features not being supported, we should probably
// actually go through and do the upgrade

// TestPegaTierPDBEnabled - verify that a PodDisruptionBudget is created when global.tier.pdb.enabled=true
func TestPegaTierPDBEnabled(t *testing.T) {
var supportedVendors = []string{"k8s", "openshift", "eks", "gke", "aks", "pks"}
Expand Down Expand Up @@ -44,19 +48,19 @@ func TestPegaTierPDBEnabled(t *testing.T) {
{
name: getObjName(options, "-web-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
minAvailable: 1,
},
{
name: getObjName(options, "-batch-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
minAvailable: 1,
},
{
name: getObjName(options, "-stream-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
minAvailable: 1,
},
})
Expand Down Expand Up @@ -100,21 +104,21 @@ func TestPegaTierPDBWithCustomLabels(t *testing.T) {
{
name: getObjName(options, "-web-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
labels: webPDBLabels,
minAvailable: 1,
},
{
name: getObjName(options, "-batch-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
labels: batchPDBLabels,
minAvailable: 1,
},
{
name: getObjName(options, "-stream-pdb"),
kind: "PodDisruptionBudget",
apiversion: "policy/v1beta1",
apiversion: "policy/v1",
minAvailable: 1,
},
})
Expand Down Expand Up @@ -175,8 +179,6 @@ func verifyPegaPDBs(t *testing.T, yamlContent string, options *helm.Options, exp
// verifyPegaPdb - Performs Pega PDB assertions with the values as provided
func verifyPegaPdb(t *testing.T, pegaPdbObj *v1beta1.PodDisruptionBudget, expectedPdb pdb) {
require.Equal(t, pegaPdbObj.TypeMeta.Kind, expectedPdb.kind)
//if the below fails it means that the helm version used in testing is compiled against
//kubernetes 1.21 or higher, and we should adjust this test to use the policy/v1 API version
require.Equal(t, pegaPdbObj.TypeMeta.APIVersion, expectedPdb.apiversion)
require.Equal(t, expectedPdb.minAvailable, pegaPdbObj.Spec.MinAvailable.IntVal)

Expand Down

0 comments on commit 96cbb87

Please sign in to comment.