diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d37de842847fa28b9ed9e6dc728054cb92600c8f..97ed2c50172943e01af8c51184d88f2efc00fe91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,13 +17,7 @@ build-v1: junit: - "**/target/*-reports/TEST-*.xml" -deploy-int: - stage: deploy - variables: - APP_VERSION: develop-SNAPSHOT - trigger: - project: stemcovid19/infrastructure/functional-zone/services/codegeneration/codegeneration-ansible - branch: master - strategy: depend - rules: - - if: '$CI_COMMIT_BRANCH == "develop"' +build: + script: + # Build image and push to container registry + - mvn spring-boot:build-image -Dmaven.test.skip=true -Dspring-boot.build-image.imageName=$CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA -Dspring-boot.build-image.publish=true diff --git a/pom.xml b/pom.xml index 9c69187ac1f7e3bc462b59a24ab3e060c585c235..98f47adc306f9a684e7d580280d836e61cf33a5b 100644 --- a/pom.xml +++ b/pom.xml @@ -257,6 +257,12 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> + <docker> + <publishRegistry> + <username>${env.CI_REGISTRY_USER}</username> + <password>${env.CI_REGISTRY_PASSWORD}</password> + </publishRegistry> + </docker> <layers> <enabled>true</enabled> </layers> diff --git a/src/k8s/submission-code-server-deployment.yml b/src/k8s/submission-code-server-deployment.yml index beff437fe486259485b3f873e78e1530e9bf8406..120bec2e7a901874c9ca2f7e5b1f8c76cc6e4c3b 100644 --- a/src/k8s/submission-code-server-deployment.yml +++ b/src/k8s/submission-code-server-deployment.yml @@ -23,7 +23,7 @@ spec: - containerPort: 8080 env: - name: SPRING_DATASOURCE_URL - value: "jdbc:postgresql://postgres-db-service:5432/dev-submission-code-server-schema" + value: "jdbc:postgresql://postgres-db-service:5432/submission" - name: SPRING_DATASOURCE_USERNAME value: postgres - name: SPRING_DATASOURCE_PASSWORD diff --git a/src/k8s/submission-postgres-deployment.yml b/src/k8s/submission-postgres-deployment.yml index ca81a0bcdc2b90fba8b28a12295c63a88011e2c3..e9a0a42acc3e3b7e6182240611fbabc85fbfd126 100644 --- a/src/k8s/submission-postgres-deployment.yml +++ b/src/k8s/submission-postgres-deployment.yml @@ -25,7 +25,7 @@ spec: - name: POSTGRES_PASSWORD value: "1234" - name: POSTGRES_DB - value: dev-submission-code-server-schema + value: submission - name: POSTGRES_USER value: postgres ---