Skip to content

Commit

Permalink
pipeline updates
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCsaky committed Nov 19, 2024
1 parent b408830 commit 7480b59
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-to-environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ runs:
--values ./.github/environments/values.${{ inputs.environment }}.yaml
--set image.repository=ghcr.io/$OWNER_LC
--set image.tag=sha-$(git rev-parse --short HEAD)
--set route.host=${{ inputs.acronym }}-${{ inputs.namespace_environment }}-migrate.apps.silver.devops.gov.bc.ca
--set route.host=${{ inputs.acronym }}-${{ inputs.namespace_environment }}-${{ inputs.job_name }}.apps.silver.devops.gov.bc.ca
--set postgres.name=postgres-${{ inputs.job_name }}
--set postgres.enabled=${{ inputs.deploy_postgres }}
--timeout 15m
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
name: "CodeQL"

on:
{}
# - push
# - pull_request
- push
- pull_request

# push:
# branches:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-pr-closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull Request Closed
env:
ACRONYM: ches
APP_NAME: common-hosted-email-service
NAMESPACE_PREFIX: 1dca6b
NAMESPACE_PREFIX: b160aa

on:
pull_request:
Expand All @@ -19,7 +19,7 @@ concurrency:
jobs:
remove-pr-dev:
name: Remove PR build from dev namespace
# if: "! github.event.pull_request.head.repo.fork"
if: "! github.event.pull_request.head.repo.fork"
environment:
name: pr
url: https://${{ env.ACRONYM }}-dev-pr-${{ github.event.number }}.apps.silver.devops.gov.bc.ca
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-pr-opened.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pull Request Opened
env:
ACRONYM: ches
APP_NAME: common-hosted-email-service
NAMESPACE_PREFIX: 1dca6b
NAMESPACE_PREFIX: b160aa

on:
pull_request:
Expand All @@ -21,7 +21,7 @@ concurrency:
jobs:
build:
name: Build & Push
# if: "! github.event.pull_request.head.repo.fork"
if: "! github.event.pull_request.head.repo.fork"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Push
env:
ACRONYM: ches
APP_NAME: common-hosted-email-service
NAMESPACE_PREFIX: 1dca6b
NAMESPACE_PREFIX: b160aa

on:
push:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Tests

on:
{}
# - push
# - pull_request
- push
- pull_request

jobs:
test-app:
Expand Down
2 changes: 1 addition & 1 deletion charts/ches/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: common-hosted-email-service
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.3
version: 1.0.0
kubeVersion: ">= 1.13.0"
description: A microservice for managing access control to S3 Objects
# A chart can be either an 'application' or a 'library' chart.
Expand Down
3 changes: 3 additions & 0 deletions charts/ches/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ spec:
app.kubernetes.io/name: {{ include "ches.configname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
ingress:
- ports:
- protocol: TCP
port: {{ .Values.service.port}}
- from:
- namespaceSelector:
matchLabels:
Expand Down
14 changes: 7 additions & 7 deletions load-tests/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const secret = `${__ENV.secret}`;
const env = `${__ENV.env ? __ENV.env : 'dev'}`;
const targetEmail = `${__ENV.target}`
let emailUrl = 'api/v1/email';
let oidcUrl = 'auth/realms/jbd6rnxw/protocol/openid-connect/token';
let oidcUrl = 'auth/realms/comsvcauth/protocol/openid-connect/token';

// Options for the test run. These can be overidden for a run. See https://k6.io/docs/using-k6/options
export let options = {
Expand Down Expand Up @@ -45,14 +45,14 @@ export let options = {

// URL strings
if (env === 'dev' || env === 'test') {
emailUrl = `https://ches-${env}.apps.silver.devops.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://${env}.oidc.gov.bc.ca/${oidcUrl}`
emailUrl = `https://ches-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://${env}.loginproxy.gov.bc.ca/${oidcUrl}`
} else if (env === 'prod') {
emailUrl = `https://ches.nrs.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://oidc.gov.bc.ca/${oidcUrl}`
emailUrl = `https://ches-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://loginproxy.gov.bc.ca/${oidcUrl}`
} else if (env && env.match(/pr-\d+/g)) {
emailUrl = `https://ches-dev-${env}.nrs.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://dev.oidc.gov.bc.ca/${oidcUrl}`
emailUrl = `https://ches-dev-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://dev.loginproxy.gov.bc.ca/${oidcUrl}`
} else {
fail('No valid environment supplied. Supply "dev", "test", "prod", or "pr##".');
}
Expand Down

0 comments on commit 7480b59

Please sign in to comment.