-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74e066b
commit 5390977
Showing
8 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "sunday" | ||
|
||
# Maintain dependencies for kotlin | ||
- package-ecosystem: "maven" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "sunday" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Code scanning (CodeQL) | ||
|
||
on: | ||
pull_request: | ||
types: [ready_for_review, opened, reopened, synchronize] | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
jobs: | ||
codeql: | ||
name: Run codeql scan | ||
if: github.event.pull_request.draft == false | ||
uses: Informasjonsforvaltning/workflows/.github/workflows/codeql.yaml@main | ||
with: | ||
language: java | ||
secrets: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy to staging | ||
|
||
on: | ||
pull_request: | ||
types: [ready_for_review, opened, reopened, synchronize] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-service-catalog: | ||
name: Build when pull request is created | ||
if: github.event.pull_request.draft == false | ||
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main | ||
with: | ||
app_name: service-catalog | ||
environment: staging | ||
java_version: '17' | ||
coverage_file_path: ./target/site/jacoco/jacoco.xml | ||
secrets: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GCP_SA_DIGDIR_FDK_GCR_KEY: ${{ secrets.GCP_SA_DIGDIR_FDK_GCR_KEY }} | ||
|
||
deploy: | ||
name: Deploy to staging environment | ||
if: github.event.pull_request.draft == false | ||
needs: [ build-service-catalog ] | ||
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main | ||
with: | ||
app_name: service-catalog | ||
environment: staging | ||
cluster: digdir-fdk-dev | ||
secrets: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }} | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: service-catalog | ||
labels: | ||
app: service-catalog | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: service-catalog | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app: service-catalog | ||
annotations: | ||
prometheus.io/scrape: "false" | ||
spec: | ||
containers: | ||
- name: service-catalog | ||
image: service-catalog | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 8080 | ||
livenessProbe: | ||
httpGet: | ||
path: /actuator/health/liveness | ||
port: 8080 | ||
initialDelaySeconds: 20 | ||
periodSeconds: 30 | ||
successThreshold: 1 | ||
failureThreshold: 5 | ||
readinessProbe: | ||
httpGet: | ||
path: /actuator/health/readiness | ||
port: 8080 | ||
initialDelaySeconds: 20 | ||
periodSeconds: 30 | ||
successThreshold: 1 | ||
failureThreshold: 5 | ||
resources: | ||
requests: | ||
memory: 100Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- deployment-service-catalog.yaml | ||
- service-service-catalog.yaml | ||
images: | ||
- name: service-catalog | ||
newName: eu.gcr.io/digdir-fdk-infra/service-catalog | ||
newTag: $(GIT_COMMIT_SHA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-catalog | ||
spec: | ||
selector: | ||
app: service-catalog | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 8080 | ||
targetPort: 8080 | ||
type: NodePort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: service-catalog | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: service-catalog.api.staging.fellesdatakatalog.digdir.no | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: service-catalog | ||
port: | ||
number: 8080 | ||
path: / | ||
pathType: Prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: staging | ||
resources: | ||
- ../base | ||
- ingress.yaml |