diff --git a/DRAFT_RELEASE_NOTES.md b/DRAFT_RELEASE_NOTES.md index 296bd6a9e..a6e11e6c5 100644 --- a/DRAFT_RELEASE_NOTES.md +++ b/DRAFT_RELEASE_NOTES.md @@ -26,13 +26,14 @@ The following steps will upgrade your project to 1.10. These instructions consis ## Automatic Upgrades To reduce burden of upgrading aiSSEMBLE, the Baton project is used to automate the migration of some files to the new version. These migrations run automatically when you build your project, and are included by default when you update the `build-parent` version in your root POM. Below is a description of all of the Baton migrations that are included with this version of aiSSEMBLE. -| Migration Name | Description | -|------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| upgrade-tiltfile-aissemble-version-migration | Updates the aiSSEMBLE version within your project's Tiltfile | -| upgrade-v2-chart-files-aissemble-version-migration | Updates the Helm chart dependencies within your project's deployment resources (`-deploy/src/main/resources/apps/`) to use the latest version of the aiSSEMBLE | -| upgrade-v1-chart-files-aissemble-version-migration | Updates the docker image tags within your project's deployment resources (`-deploy/src/main/resources/apps/`) to use the latest version of the aiSSEMBLE | -| spark-version-upgrade-migration | Updates the Spark Application executor failure parameters to their new key name to ensure compatibility with spark `3.5` | -| log4j-maven-shade-plugin-migration | Updates the Maven Shade Plugin with the new Log4j dependency information | +| Migration Name | Description | +|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| upgrade-tiltfile-aissemble-version-migration | Updates the aiSSEMBLE version within your project's Tiltfile | +| upgrade-v2-chart-files-aissemble-version-migration | Updates the Helm chart dependencies within your project's deployment resources (`-deploy/src/main/resources/apps/`) to use the latest version of the aiSSEMBLE | +| upgrade-v1-chart-files-aissemble-version-migration | Updates the docker image tags within your project's deployment resources (`-deploy/src/main/resources/apps/`) to use the latest version of the aiSSEMBLE | +| spark-version-upgrade-migration | Updates the Spark Application executor failure parameters to their new key name to ensure compatibility with spark `3.5` | +| it-infrastructure-java-upgrade-migration | Updates the Java docker image version in the integration test docker module to JDK 17 | +| log4j-maven-shade-plugin-migration | Updates the Maven Shade Plugin with the new Log4j dependency information | To deactivate any of these migrations, add the following configuration to the `baton-maven-plugin` within your root `pom.xml`: @@ -70,6 +71,12 @@ To start your aiSSEMBLE upgrade, update your project's pom.xml to use the 1.10.0 ## Conditional Steps +### Spark Infrastructure App naming +The Spark Infrastructure helm charts were updated to use `Values.app.name` as the deployment and service name where +previously it was `Release.name`. This change applies to the charts `aissemble-spark-history-chart` and +`aissemble-thrift-server-chart`. To be compatible with this change you will need to add the `Values.app.name` to +these two chart values. + ## Final Steps - Required for All Projects ### Finalizing the Upgrade 1. Run `./mvnw org.technologybrewery.baton:baton-maven-plugin:baton-migrate` to apply the automatic migrations @@ -78,4 +85,4 @@ To start your aiSSEMBLE upgrade, update your project's pom.xml to use the 1.10.0 3. Repeat the previous step until all manual actions are resolved # What's Changed -- `pyproject.toml` files updated to allow for Python version `>=3.8`. \ No newline at end of file +- `pyproject.toml` files updated to allow for Python version `>=3.8`. diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/README.md b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/README.md index a4b3aac5e..d623dab54 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/README.md +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/README.md @@ -19,6 +19,7 @@ _**NOTE:**_ *the version should match the aiSSEMBLE project version.* | Property | Description | Default | |----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------| +| app.name | Sets label for app.kubernetes.io/name | Chart.Name (aissemble-spark-history-chart) | | enable | Enable or disable the entirety of the spark-history-server deployment. When false, equivalent to not installing the chart. | true | | deployment.annotations | Annotations to apply to the Spark History Server Deployment. | {} | | deployment.labels | Labels to apply to the Spark History Server Deployment. | {} | diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/configmap.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/configmap.yaml index c30ead75c..efed1f048 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/configmap.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-shs-spark-config + name: {{ .Values.app.name }}-spark-config data: sparkConf: {{- toYaml .Values.sparkConf | nindent 8 }} diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/deployment.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/deployment.yaml index 47c3fa5a7..a7df63405 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/deployment.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/deployment.yaml @@ -2,21 +2,23 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-shs + name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.annotations }} annotations: {{ toYaml .Values.deployment.annotations | default "" }} {{- end }} labels: - app: {{ .Release.Name }} - {{- if .Values.deployment.labels }} - {{ toYaml .Values.deployment.labels }} - {{- end }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" + {{- if .Values.deployment.labels }} + {{ toYaml .Values.deployment.labels }} + {{- end }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - app: {{ .Release.Name }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.labels }} {{ toYaml .Values.deployment.labels }} {{- end }} @@ -27,7 +29,8 @@ spec: {{ toYaml .Values.deployment.annotations | default "" }} {{- end }} labels: - app: {{ .Release.Name }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.labels }} {{ toYaml .Values.deployment.labels }} {{- end }} @@ -116,7 +119,7 @@ spec: {{- if not (eq .Values.sparkConf "") }} - name: spark-config configMap: - name: {{ .Release.Name }}-shs-spark-config + name: {{ .Values.app.name }}-spark-config items: - key: sparkConf path: spark-defaults.conf diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/ingress.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/ingress.yaml index 25fae4657..da21029a5 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/ingress.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/ingress.yaml @@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ .Release.Name }}-shs-ingress + name: {{ .Values.app.name | default .Chart.Name }} {{- with .Values.ingress.metadata.annotations }} annotations: {{- toYaml . | nindent 8 }} @@ -10,7 +10,6 @@ metadata: spec: ingressClassName: {{ .Values.ingress.ingressClassName }} rules: - {{- $releasename := printf "%s-service" .Release.Name }} {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: @@ -20,7 +19,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ .backend.service.name | default $releasename }} + name: {{ required "A valid .backend.service.name entry required." .backend.service.name }} port: number: {{ .backend.service.port.number }} {{- end }} diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/service.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/service.yaml index edbe10897..c1b850878 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/service.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/templates/service.yaml @@ -2,14 +2,18 @@ apiVersion: v1 kind: Service metadata: - name: {{ .Release.Name }}-shs-service + labels: + app.kubernetes.io/instance: {{ .Values.app.name | default .Chart.Name }} + app.kubernetes.io/name: {{ .Values.app.name | default .Chart.Name }} + name: {{ .Values.app.name | default .Chart.Name }} {{- if .Values.service.annotations }} annotations: {{ .Values.service.annotations }} {{- end }} spec: type: {{.Values.service.type }} selector: - app: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Values.app.name | default .Chart.Name }} + app.kubernetes.io/name: {{ .Values.app.name | default .Chart.Name }} ports: - name: {{ .Values.service.port.name }} protocol: TCP diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/deployment_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/deployment_test.yaml index 2165732b2..ce81486ac 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/deployment_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/deployment_test.yaml @@ -38,14 +38,23 @@ tests: deployment.labels.label1: label2 asserts: - equal: - path: metadata.labels.app - value: RELEASE-NAME + path: spec.selector.matchLabels["app.kubernetes.io/instance"] + value: aissemble-spark-history-chart - equal: - path: spec.template.metadata.labels.app - value: RELEASE-NAME + path: spec.selector.matchLabels["app.kubernetes.io/name"] + value: aissemble-spark-history-chart - equal: - path: spec.selector.matchLabels.app - value: RELEASE-NAME + path: metadata.labels["app.kubernetes.io/instance"] + value: aissemble-spark-history-chart + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: aissemble-spark-history-chart + - equal: + path: spec.template.metadata.labels["app.kubernetes.io/instance"] + value: aissemble-spark-history-chart + - equal: + path: spec.template.metadata.labels["app.kubernetes.io/name"] + value: aissemble-spark-history-chart - it: Should apply requested annotations set: diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/ingress_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/ingress_test.yaml index 01665d861..221e7bd8e 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/ingress_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/ingress_test.yaml @@ -39,7 +39,7 @@ tests: asserts: - equal: path: metadata.name - value: RELEASE-NAME-shs-ingress + value: aissemble-spark-history-chart - notExists: path: metadata.annotations @@ -78,7 +78,7 @@ tests: value: Prefix - equal: path: spec.rules[0].http.paths[0].backend.service.name - value: RELEASE-NAME-service + value: spark-history - equal: path: spec.rules[0].http.paths[0].backend.service.port.number value: 18080 diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/service_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/service_test.yaml index a3c3a13f0..8e41e5e7c 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/service_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/service_test.yaml @@ -19,15 +19,18 @@ tests: count: 1 - equal: path: metadata.name - value: RELEASE-NAME-shs-service + value: aissemble-spark-history-chart - notExists: path: metadata.annotations - equal: path: spec.type value: LoadBalancer - equal: - path: spec.selector.app - value: RELEASE-NAME + path: spec.selector["app.kubernetes.io/instance"] + value: aissemble-spark-history-chart + - equal: + path: spec.selector["app.kubernetes.io/name"] + value: aissemble-spark-history-chart - contains: path: spec.ports content: diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/spark_conf_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/spark_conf_test.yaml index 5cc2c0a29..af646cf80 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/spark_conf_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/tests/spark_conf_test.yaml @@ -15,6 +15,7 @@ tests: - it: If spark conf is specified, the ConfigMap should be created with the provided values set: sparkConf: "spark.executor.instances: 2" + app.name: "spark-history" templates: - configmap.yaml asserts: @@ -25,7 +26,7 @@ tests: - notFailedTemplate: {} - equal: path: metadata.name - value: "RELEASE-NAME-shs-spark-config" + value: "spark-history-spark-config" - equal: path: data.sparkConf value: "spark.executor.instances: 2" @@ -33,6 +34,7 @@ tests: - it: If spark conf is specified, a volume should be created from the created configmap set: sparkConf: "spark.executor.instances: 2" + app.name: "spark-history" templates: - deployment.yaml asserts: @@ -41,7 +43,7 @@ tests: content: name: spark-config configMap: - name: RELEASE-NAME-shs-spark-config + name: spark-history-spark-config items: - key: sparkConf path: spark-defaults.conf diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/values.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/values.yaml index ad4849cc0..7aa3fac41 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/values.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-spark-history-chart/values.yaml @@ -1,4 +1,7 @@ # This file contains the default values for the aiSSEMBLE Spark History Helm chart. +app: + # Sets labels for app.kubernetes.io/name Default is Chart.Name (aissemble-spark-history-chart) + name: '' enable: true @@ -42,6 +45,7 @@ ingress: pathType: Prefix backend: service: + name: spark-history port: number: 18080 diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/README.md b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/README.md index 8e96ef5fe..83e817e1b 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/README.md +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/README.md @@ -19,6 +19,7 @@ _**NOTE:**_ *the version should match the aiSSEMBLE project version.* | Property | Description | Default | |----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| +| app.name | Sets label for app.kubernetes.io/name | Chart.Name (aissemble-thrift-server-chart) | | enable | Enable or disable the entirety of the spark-thrift-server deployment. When false, equivalent to not installing the chart. | true | | deployment.annotations | Annotations to apply to the Spark Thrift Server Deployment. | {} | | deployment.labels | Labels to apply to the Spark Thrift Server Deployment. | {} | diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/deployment.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/deployment.yaml index 41eb41617..d3ba1614f 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/deployment.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/deployment.yaml @@ -2,21 +2,23 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-sts + name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.annotations }} annotations: {{ toYaml .Values.deployment.annotations | default "" }} {{- end }} labels: - app: {{ .Release.Name }} - {{- if .Values.deployment.labels }} - {{ toYaml .Values.deployment.labels }} - {{- end }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" + {{- if .Values.deployment.labels }} + {{ toYaml .Values.deployment.labels }} + {{- end }} spec: replicas: {{ .Values.deployment.replicas }} selector: matchLabels: - app: {{ .Release.Name }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.labels }} {{ toYaml .Values.deployment.labels }} {{- end }} @@ -27,14 +29,15 @@ spec: {{ toYaml .Values.deployment.annotations | default "" }} {{- end }} labels: - app: {{ .Release.Name }} + app.kubernetes.io/instance: "{{ .Values.app.name | default .Chart.Name }}" + app.kubernetes.io/name: "{{ .Values.app.name | default .Chart.Name }}" {{- if .Values.deployment.labels }} {{ toYaml .Values.deployment.labels }} {{- end }} spec: {{- if or (not (empty .Values.dependencies.packages)) (not (empty .Values.dependencies.jars)) }} initContainers: - - name: "populate-sts-jar-volume" + - name: "populate-thrift-service-jar-volume" image: {{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }} imagePullPolicy: {{ .Values.deployment.image.imagePullPolicy | default "IfNotPresent" }} command: ["sh", "-c", "cp /opt/spark/jars/* /tmp/jars/"] diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/ingress.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/ingress.yaml index 948f2ac98..99ce5f241 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/ingress.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/ingress.yaml @@ -2,7 +2,7 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ .Release.Name }}-sts-ingress + name: {{ .Values.app.name | default .Chart.Name }} {{- with .Values.ingress.metadata.annotations }} annotations: {{- toYaml . | nindent 8 }} @@ -10,7 +10,6 @@ metadata: spec: ingressClassName: {{ .Values.ingress.ingressClassName }} rules: - {{- $releasename := printf "%s-service" .Release.Name }} {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: @@ -20,7 +19,7 @@ spec: pathType: {{ .pathType }} backend: service: - name: {{ .backend.service.name | default $releasename }} + name: {{ .backend.service.name }} port: number: {{ .backend.service.port.number }} {{- end }} diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/service.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/service.yaml index 32c7bf724..e477f4124 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/service.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/templates/service.yaml @@ -2,14 +2,18 @@ apiVersion: v1 kind: Service metadata: - name: {{ .Release.Name }}-sts-service + labels: + app.kubernetes.io/instance: {{ .Values.app.name | default .Chart.Name }} + app.kubernetes.io/name: {{ .Values.app.name | default .Chart.Name }} + name: {{ .Values.app.name | default .Chart.Name }} {{- if .Values.service.annotations }} annotations: {{ .Values.service.annotations }} {{- end }} spec: type: {{.Values.service.type }} selector: - app: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Values.app.name | default .Chart.Name }} + app.kubernetes.io/name: {{ .Values.app.name | default .Chart.Name }} ports: {{ .Values.service.ports | toYaml | nindent 4}} {{- end }} diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/deployment_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/deployment_test.yaml index f52871f2c..92c2e2480 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/deployment_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/deployment_test.yaml @@ -38,14 +38,23 @@ tests: deployment.labels.label1: label2 asserts: - equal: - path: metadata.labels.app - value: RELEASE-NAME + path: spec.selector.matchLabels["app.kubernetes.io/instance"] + value: aissemble-thrift-server-chart - equal: - path: spec.template.metadata.labels.app - value: RELEASE-NAME + path: spec.selector.matchLabels["app.kubernetes.io/name"] + value: aissemble-thrift-server-chart - equal: - path: spec.selector.matchLabels.app - value: RELEASE-NAME + path: metadata.labels["app.kubernetes.io/instance"] + value: aissemble-thrift-server-chart + - equal: + path: metadata.labels["app.kubernetes.io/name"] + value: aissemble-thrift-server-chart + - equal: + path: spec.template.metadata.labels["app.kubernetes.io/instance"] + value: aissemble-thrift-server-chart + - equal: + path: spec.template.metadata.labels["app.kubernetes.io/name"] + value: aissemble-thrift-server-chart - it: Should apply requested annotations set: @@ -81,7 +90,7 @@ tests: path: spec.template.spec.initContainers any: true content: - name: "populate-sts-jar-volume" + name: "populate-thrift-service-jar-volume" - contains: path: spec.template.spec.initContainers any: true @@ -102,7 +111,7 @@ tests: path: spec.template.spec.initContainers any: true content: - name: "populate-sts-jar-volume" + name: "populate-thrift-service-jar-volume" - contains: path: spec.template.spec.initContainers any: true @@ -125,7 +134,7 @@ tests: path: spec.template.spec.initContainers any: true content: - name: "populate-sts-jar-volume" + name: "populate-thrift-service-jar-volume" - contains: path: spec.template.spec.initContainers any: true diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/ingress_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/ingress_test.yaml index 39660ae0e..9737bc9c7 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/ingress_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/ingress_test.yaml @@ -39,7 +39,7 @@ tests: asserts: - equal: path: metadata.name - value: RELEASE-NAME-sts-ingress + value: aissemble-thrift-server-chart - notExists: path: metadata.annotations diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/service_test.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/service_test.yaml index 8fd3ad170..383b49d9e 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/service_test.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/tests/service_test.yaml @@ -19,15 +19,18 @@ tests: count: 1 - equal: path: metadata.name - value: RELEASE-NAME-sts-service + value: aissemble-thrift-server-chart - notExists: path: metadata.annotations - equal: path: spec.type value: ClusterIP - equal: - path: spec.selector.app - value: RELEASE-NAME + path: spec.selector["app.kubernetes.io/instance"] + value: aissemble-thrift-server-chart + - equal: + path: spec.selector["app.kubernetes.io/name"] + value: aissemble-thrift-server-chart - contains: path: spec.ports any: true diff --git a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/values.yaml b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/values.yaml index ea8d2eb58..9348b5674 100644 --- a/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/values.yaml +++ b/extensions/extensions-helm/extensions-helm-spark-infrastructure/aissemble-thrift-server-chart/values.yaml @@ -1,5 +1,9 @@ # This file contains the default values for the aiSSEMBLE Thrift Service Helm chart. +app: + # Sets labels for app.kubernetes.io/name Default is Chart.Name (aissemble-thrift-server-chart) + name: '' + enable: true deployment: diff --git a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-docker/pom.xml b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-docker/pom.xml index b70e51499..6dac25a72 100644 --- a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-docker/pom.xml +++ b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-docker/pom.xml @@ -110,6 +110,7 @@ ${project.parent.artifactId}-java ${project.version} jar + shaded true ${project.artifactId}.jar ${project.build.directory} @@ -124,4 +125,4 @@ - \ No newline at end of file + diff --git a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml index 16ae5ae07..6bf1777a4 100644 --- a/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml +++ b/foundation/foundation-archetype/src/main/resources/archetype-resources/__rootArtifactId__-tests/__rootArtifactId__-tests-java/pom.xml @@ -36,6 +36,8 @@ ${parentArtifactId}-tests-java + shaded + true @@ -190,4 +192,4 @@ - \ No newline at end of file + diff --git a/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.application.properties.vm b/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.application.properties.vm index 9f2b595f9..ab546d580 100644 --- a/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.application.properties.vm +++ b/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.application.properties.vm @@ -23,4 +23,4 @@ quarkus.vertx.max-event-loop-execute-time=30s quarkus.datasource.jdbc.acquisition-timeout=30s quarkus.datasource.db-kind=other quarkus.datasource.jdbc.driver=org.apache.hive.jdbc.HiveDriver -quarkus.datasource.jdbc.url=jdbc:hive2://spark-infrastructure-sts-service:10001/default;transportMode=http;httpPath=cliservice \ No newline at end of file +quarkus.datasource.jdbc.url=jdbc:hive2://thrift-server:10001/default;transportMode=http;httpPath=cliservice diff --git a/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.pom.xml.vm b/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.pom.xml.vm index 52cac8685..c35a14fa2 100644 --- a/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.pom.xml.vm +++ b/foundation/foundation-mda/src/main/resources/templates/data-access/data.access.pom.xml.vm @@ -21,7 +21,7 @@ com.boozallen.aissemble aissemble-quarkus-bom - ${project.version} + ${version.aissemble} pom import diff --git a/foundation/foundation-mda/src/main/resources/templates/data-lineage-consumer/data-lineage-consumer.pom.xml.vm b/foundation/foundation-mda/src/main/resources/templates/data-lineage-consumer/data-lineage-consumer.pom.xml.vm index b9ed1c60b..9a5e3c63d 100644 --- a/foundation/foundation-mda/src/main/resources/templates/data-lineage-consumer/data-lineage-consumer.pom.xml.vm +++ b/foundation/foundation-mda/src/main/resources/templates/data-lineage-consumer/data-lineage-consumer.pom.xml.vm @@ -14,18 +14,11 @@ - io.quarkus - quarkus-bom - ${version.quarkus} + com.boozallen.aissemble + aissemble-quarkus-bom + ${version.aissemble} pom import - - - - io.smallrye.reactive - * - - io.smallrye.reactive @@ -148,4 +141,4 @@ - \ No newline at end of file + diff --git a/foundation/foundation-mda/src/main/resources/templates/deployment/spark-infrastructure/v2/spark.infrastructure.values.yaml.vm b/foundation/foundation-mda/src/main/resources/templates/deployment/spark-infrastructure/v2/spark.infrastructure.values.yaml.vm index 5a8bd9fc6..f2fc8e4bb 100644 --- a/foundation/foundation-mda/src/main/resources/templates/deployment/spark-infrastructure/v2/spark.infrastructure.values.yaml.vm +++ b/foundation/foundation-mda/src/main/resources/templates/deployment/spark-infrastructure/v2/spark.infrastructure.values.yaml.vm @@ -1,10 +1,14 @@ # This file contains the default values for the aiSSEMBLE Spark Infrastructure Helm chart. aissemble-spark-history-chart: + app: + name: "spark-history" eventVolume: enabled: true aissemble-thrift-server-chart: + app: + name: "thrift-server" dependencies: packages: - org.apache.hadoop:hadoop-aws:3.3.4 @@ -80,4 +84,4 @@ aissemble-hive-metastore-service-chart: - name: fs.s3a.endpoint value: http://s3-local:4566 - name: fs.s3a.path.style.access - value: true \ No newline at end of file + value: true diff --git a/foundation/foundation-mda/src/main/resources/templates/general-docker/it.java.docker.file.vm b/foundation/foundation-mda/src/main/resources/templates/general-docker/it.java.docker.file.vm index d4d9339c5..02605c1fe 100644 --- a/foundation/foundation-mda/src/main/resources/templates/general-docker/it.java.docker.file.vm +++ b/foundation/foundation-mda/src/main/resources/templates/general-docker/it.java.docker.file.vm @@ -3,8 +3,7 @@ # GENERATED DOCKERFILE - please ***DO*** modify. # # Generated from: ${templateName} -ARG DOCKER_BASELINE_REPO_ID -FROM openjdk:11-slim +FROM openjdk:17-jdk-slim COPY ./target/specifications/ ./specifications COPY ./target/${artifactId}.jar ./ diff --git a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.spec.vm b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.spec.vm index bef0de8fd..844140e82 100644 --- a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.spec.vm +++ b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.spec.vm @@ -1,6 +1,8 @@ @pipeline -Feature: Run Spark Operator job +Feature: Example feature file + Generated sample BDD specification/feature file - PLEASE ***DO*** MODIFY. - Scenario: Executes a pipeline - When the job is triggered - Then the pipeline is executed + Scenario: Update me + Given a precondition + When an action occurs + Then a postcondition results diff --git a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.steps.vm b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.steps.vm index 0e3b47807..56732ab47 100644 --- a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.steps.vm +++ b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.pipeline.steps.vm @@ -1,127 +1,42 @@ package ${basePackage}.tests; +import static org.junit.Assert.assertTrue; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import io.cucumber.java.After; import io.cucumber.java.Before; +import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; -import io.fabric8.kubernetes.api.model.HasMetadata; -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.client.KubernetesClient; -import io.fabric8.kubernetes.client.KubernetesClientBuilder; -import io.fabric8.kubernetes.client.informers.ResourceEventHandler; -import org.junit.Assert; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.concurrent.TimeUnit; public class PipelineSteps { private static final Logger logger = LoggerFactory.getLogger(PipelineSteps.class); - List listOfFiles = new ArrayList<>(); - Boolean jobRequestFailed; - List podList; - List hasMetadata; @Before("@pipeline") public void setup() { - this.jobRequestFailed = false; - this.podList = new ArrayList<>(); - this.hasMetadata = new ArrayList<>(); } @After("@pipeline") public void cleanup() { } - @When("the job is triggered") - public void theJobIsTriggered() throws IOException, InterruptedException { - getFiles(); - } - - @Then("the pipeline is executed") - public void thePipelineIsExecuted() { - Assert.assertTrue(String.format("Pod list size should be greater than %d", podList.size()), podList.size() > 0); - } - - private void getFiles() throws IOException, InterruptedException { - - File dir = new File("./pipelines"); - addFilesForFolder(dir); - - logger.info(String.format("Got %d application.yaml file(s) to process", listOfFiles.size())); - - for (File file : listOfFiles) { - - try (KubernetesClient client = new KubernetesClientBuilder().build()) { - - //Initializing Informer - this.initializeInformer(client); - - List metadata = client - .load(new FileInputStream(file)) - .get(); - - this.hasMetadata.addAll(metadata); - logger.info(String.format("has meta data size is %d", hasMetadata.size())); - - //Creating/Replacing resource here - metadata.forEach(o -> logger.info("Creating resource " + o.getMetadata().getName())); - client.resourceList(metadata).inNamespace("default").createOrReplace(); - TimeUnit.MINUTES.sleep(2); - - } - } - } - - private void initializeInformer(KubernetesClient client) { - - client.pods().inNamespace("default").inform(new ResourceEventHandler<>() { - - @Override - public void onAdd(Pod pod) { - addToPodList(pod); - } - - @Override - public void onUpdate(Pod oldPod, Pod newPod) { - addToPodList(oldPod); - } - - @Override - public void onDelete(Pod pod, boolean deletedFinalStateUnknown) { - addToPodList(pod); - } - - }, 30 * 1000L); - - logger.info("Informer initialized."); + @Given("a precondition") + public void a_precondition() { + // code the items you need before performing your action } - - private void addFilesForFolder(final File folder) { - for (final File fileEntry : Objects.requireNonNull(folder.listFiles())) { - if (fileEntry.isDirectory()) { - addFilesForFolder(fileEntry); - } else { - listOfFiles.add(fileEntry); - } - } + @When("an action occurs") + public void an_action_occurs() { + // execute your action } - private void addToPodList(Pod pod) { - - boolean anyMatch = this.hasMetadata.stream().anyMatch(o -> pod.getMetadata().getName().contains(o.getMetadata().getName())); - if (anyMatch) { - logger.info("Pod " + pod.getMetadata().getName() + " added to pod list"); - this.podList.add(pod); - } + @Then("a postcondition results") + public void a_postcondition_results() { + // check for expected postconditions - continue to use normal assert pattern within tests + assertTrue(true); } -} \ No newline at end of file +} diff --git a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.tiltfile.vm b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.tiltfile.vm index dc63acc73..06db0e565 100644 --- a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.tiltfile.vm +++ b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.tiltfile.vm @@ -41,22 +41,6 @@ parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/spark-operator/ ) k8s_yaml(yaml) - -# Hive Metastore DB -yaml = helm( - parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/hive-metastore-db', - values=[parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/hive-metastore-db/values.yaml'] -) -k8s_yaml(yaml) - -# Zookeeper Alert -yaml = helm( - parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert', - values=[parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert/values.yaml', - parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/zookeeper-alert/values-dev.yaml'] -) -k8s_yaml(yaml) - # Kafka yaml = helm( parent_dir + '${parentArtifactId}-deploy/src/main/resources/apps/kafka-cluster', @@ -67,7 +51,7 @@ k8s_yaml(yaml) # Policy Decision Point docker_build( - ref='boozallen/${parentArtifactId}-policy-decision-point-docker', + ref='${parentArtifactId}-policy-decision-point-docker', context=parent_dir + '${parentArtifactId}-docker/${parentArtifactId}-policy-decision-point-docker', build_args=build_args, dockerfile=parent_dir + '${parentArtifactId}-docker/${parentArtifactId}-policy-decision-point-docker/src/main/resources/docker/Dockerfile' diff --git a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.pipeline.yaml.vm b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.pipeline.yaml.vm index 97ec58cc5..26b1b450f 100644 --- a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.pipeline.yaml.vm +++ b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.pipeline.yaml.vm @@ -1,8 +1,15 @@ +#set ($index = $artifactId.indexOf('-tests')) +#set ($parentArtifactId = $artifactId.substring(0, $index)) + deployment: command: '[ "java" ]' - args: '[ "-jar", "${artifactId}.jar" ]' + args: '[ "-jar", "${parentArtifactId}-tests-docker.jar" ]' initContainers: - name: wait-for-spark-operator image: busybox:latest command: [ "/bin/sh","-c" ] - args: [ "until nc -vz spark-operator-webhook.default 443; do sleep 5; echo 'waiting for spark operator...'; done" ] + args: [ "until nc -vz spark-operator-webhook-svc.default 443; do sleep 5; echo 'waiting for spark operator...'; done" ] + - name: wait-for-spark-thrift-service + image: busybox:latest + command: [ "/bin/sh","-c" ] + args: [ "until nc -vz thrift-server.default 10001; do sleep 5; echo 'waiting for spark thrift service...'; done" ] diff --git a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.yaml.vm b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.yaml.vm index 7f8b76e20..6b090e90f 100644 --- a/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.yaml.vm +++ b/foundation/foundation-mda/src/main/resources/templates/integration-test/it.values.yaml.vm @@ -1,4 +1,7 @@ +#set ($index = $artifactId.indexOf('-tests')) +#set ($parentArtifactId = $artifactId.substring(0, $index)) + image: - name: boozallen/${artifactId} + name: ${parentArtifactId}-tests-docker imagePullPolicy: IfNotPresent - dockerRepo: "" \ No newline at end of file + dockerRepo: "" diff --git a/foundation/foundation-upgrade/src/main/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigration.java b/foundation/foundation-upgrade/src/main/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigration.java new file mode 100644 index 000000000..a0907c965 --- /dev/null +++ b/foundation/foundation-upgrade/src/main/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigration.java @@ -0,0 +1,44 @@ +package com.boozallen.aissemble.upgrade.migration.v1_10_0; + +/*- + * #%L + * aiSSEMBLE::Foundation::Upgrade + * %% + * Copyright (C) 2021 Booz Allen + * %% + * This software package is licensed under the Booz Allen Public License. All Rights Reserved. + * #L% + */ + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; + +import org.technologybrewery.baton.BatonException; + +import com.boozallen.aissemble.upgrade.migration.AbstractAissembleMigration; + +public class ItInfrastructureJavaUpgradeMigration extends AbstractAissembleMigration { + private static final String OLD_JDK_VERSION = "FROM openjdk:11-slim"; + private static final String NEW_JDK_VERSION = "FROM openjdk:17-jdk-slim"; + + @Override + protected boolean shouldExecuteOnFile(File file) { + try { + return (Files.readString(file.toPath()).contains(OLD_JDK_VERSION)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + protected boolean performMigration(File file) { + try { + Files.writeString(file.toPath(), Files.readString(file.toPath()) + .replace(OLD_JDK_VERSION, NEW_JDK_VERSION)); + return true; + } catch (IOException e) { + throw new BatonException("Failed to update Dockerfile parent image", e); + } + } +} diff --git a/foundation/foundation-upgrade/src/main/resources/migrations.json b/foundation/foundation-upgrade/src/main/resources/migrations.json index 6bb44f507..8d976b734 100644 --- a/foundation/foundation-upgrade/src/main/resources/migrations.json +++ b/foundation/foundation-upgrade/src/main/resources/migrations.json @@ -15,6 +15,17 @@ } ] }, + { + "name": "it-infrastructure-java-upgrade-migration", + "implementation": "com.boozallen.aissemble.upgrade.migration.v1_10_0.ItInfrastructureJavaUpgradeMigration", + "fileSets": [ + { + "includes": [ + "*-tests/**/Dockerfile" + ] + } + ] + }, { "name": "log4j-maven-shade-plugin-migration", "implementation": "com.boozallen.aissemble.upgrade.migration.v1_10_0.Log4jMavenShadePluginMigration", diff --git a/foundation/foundation-upgrade/src/test/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigrationSteps.java b/foundation/foundation-upgrade/src/test/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigrationSteps.java new file mode 100644 index 000000000..12f327f33 --- /dev/null +++ b/foundation/foundation-upgrade/src/test/java/com/boozallen/aissemble/upgrade/migration/v1_10_0/ItInfrastructureJavaUpgradeMigrationSteps.java @@ -0,0 +1,46 @@ +package com.boozallen.aissemble.upgrade.migration.v1_10_0; + +/*- + * #%L + * aiSSEMBLE::Foundation::Upgrade + * %% + * Copyright (C) 2021 Booz Allen + * %% + * This software package is licensed under the Booz Allen Public License. All Rights Reserved. + * #L% + */ + +import com.boozallen.aissemble.upgrade.migration.AbstractMigrationTest; + +import io.cucumber.java.en.Given; +import io.cucumber.java.en.Then; +import io.cucumber.java.en.When; + +public class ItInfrastructureJavaUpgradeMigrationSteps extends AbstractMigrationTest { + + @Given("a project with outdated java docker image") + public void aProjectWithOutdatedJavaDockerImage() { + testFile = getTestFile("v1_10_0/ItInfrastructureUpgrade/migration/perform/Dockerfile"); + } + + @Given("a project that is using the java 17 docker image") + public void aProjectThatIsUsingTheJavaDockerImage() { + testFile = getTestFile("v1_10_0/ItInfrastructureUpgrade/migration/skip/Dockerfile"); + } + + @When("the it infrastructure migration executes") + public void theItInfrastructureMigrationExecutes() { + performMigration(new ItInfrastructureJavaUpgradeMigration()); + } + + @Then("the docker image being used is JDK 17") + public void theDockerImageBeingUsedIsJDK() { + assertMigrationSuccess(); + assertTestFileMatchesExpectedFile("Docker image was not updated to use the correct JDK image"); + } + + @Then("the migration was skipped") + public void theDockerImageIsNotUpdated() { + assertMigrationSkipped(); + } +} diff --git a/foundation/foundation-upgrade/src/test/resources/specifications/v1_10_0/it-infrastructure-java-upgrade-migration.feature b/foundation/foundation-upgrade/src/test/resources/specifications/v1_10_0/it-infrastructure-java-upgrade-migration.feature new file mode 100644 index 000000000..647ddab0e --- /dev/null +++ b/foundation/foundation-upgrade/src/test/resources/specifications/v1_10_0/it-infrastructure-java-upgrade-migration.feature @@ -0,0 +1,11 @@ +Feature: IT infrastructure is updated to use JDK 17 + + Scenario: Update a project that is using JDK 11 docker image + Given a project with outdated java docker image + When the it infrastructure migration executes + Then the docker image being used is JDK 17 + + Scenario: A project already using JDK 17 image is not updated + Given a project that is using the java 17 docker image + When the it infrastructure migration executes + Then the migration was skipped diff --git a/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/perform/Dockerfile b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/perform/Dockerfile new file mode 100644 index 000000000..841bdbd0e --- /dev/null +++ b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/perform/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:11-slim + +COPY ./target/specifications/ ./specifications +COPY ./target/test-project-192-tests-docker.jar ./ diff --git a/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/skip/Dockerfile b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/skip/Dockerfile new file mode 100644 index 000000000..708cad6f7 --- /dev/null +++ b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/migration/skip/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-slim + +COPY ./target/specifications/ ./specifications +COPY ./target/test-project-192-tests-docker.jar ./ diff --git a/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/validation/perform/Dockerfile b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/validation/perform/Dockerfile new file mode 100644 index 000000000..708cad6f7 --- /dev/null +++ b/foundation/foundation-upgrade/src/test/resources/test-files/v1_10_0/ItInfrastructureUpgrade/validation/perform/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-slim + +COPY ./target/specifications/ ./specifications +COPY ./target/test-project-192-tests-docker.jar ./