Skip to content

Commit

Permalink
revert springboot deps to 2.6.7 and add cloudbuild scripts (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwadie authored Feb 5, 2024
1 parent 384fa60 commit e3799df
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
37 changes: 37 additions & 0 deletions scripts/deploy_common_services_cloudbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

#
# /*
# * Copyright 2023 Google LLC
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * https://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# */
#

# exit script when errors occur
set -e

# set the working dir as the scripts directory
cd "$(dirname "$0")"

cd ../services

# make sure that the project is valid before submitting a build job
mvn install

gcloud builds submit \
--project $PROJECT_ID \
--region $COMPUTE_REGION \
--config cloudbuild_deploy_common_services.yaml \
--substitutions _TAGGING_DISPATCHER_IMAGE=${TAGGING_DISPATCHER_IMAGE},_TAGGER_IMAGE=${TAGGER_IMAGE}

21 changes: 21 additions & 0 deletions services/cloudbuild_deploy_common_services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
steps:
- name: maven:3.8.6-openjdk-18
id: deploy_services
env:
- 'TAGGING_DISPATCHER_IMAGE=${_TAGGING_DISPATCHER_IMAGE}'
- 'TAGGER_IMAGE=${_TAGGER_IMAGE}'
script:

set -e

echo "TAGGING_DISPATCHER_IMAGE = ${TAGGING_DISPATCHER_IMAGE}"
echo "TAGGER_IMAGE = ${TAGGER_IMAGE}"

mvn install

mvn compile jib:build -f=dispatcher-tagging-app/pom.xml -Dimage="${TAGGING_DISPATCHER_IMAGE}"

mvn compile jib:build -f=tagger-app/pom.xml -Dimage="${TAGGER_IMAGE}"



2 changes: 1 addition & 1 deletion services/library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>3.2.2</version>
<version>2.6.7</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down

0 comments on commit e3799df

Please sign in to comment.