Hi,
I am trying to deploy a simple spring boot app to gcp using the pipeline. I found the CI tool to be great and went ahead with the doing a POC for the client. I am really looking forward for the project to work but for some reason it keeps getting knocked back and I am trying to find an answer for the past 5 days. Here is my pipeline details. Right now I am using the default pipeline
image: maven:3.5.2-jdk-8
pipelines:
default:
- step:
script:
# Downloading the Google Cloud SDK
- curl -o /tmp/google-cloud-sdk.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-155.0.0-linux-x86_64.tar.gz
- tar -xvf /tmp/google-cloud-sdk.tar.gz -C /tmp/
- /tmp/google-cloud-sdk/install.sh -q
- source /tmp/google-cloud-sdk/path.bash.inc
# Authenticating with the service account key file
- echo $GCLOUD_API_KEYFILE | base64 --decode --ignore-garbage > ./gcloud-api-key.json
#set the account before activating
#below two lines are being omitted since the auth is set with the key configured in the env varible
#- gcloud config set account learning-gcp-199805
#- gcloud auth activate-service-account learning-gcp-199805 --key-file gcloud-api-key.json
# Linking to the Google Cloud project
- gcloud config set project $GCLOUD_PROJECT
- gcloud components install app-engine-java
- gcloud auth activate-service-account --key-file gcloud-api-key.json
- echo $GCLOUD_API_KEYFILE > /tmp/client-secret.json
- echo $GCLOUD_APP_YAML | base64 --decode --ignore-garbage > ./app.yaml
#- ls
#- cd SpringBootProjectWithSecurity #use this only if the ls retunrs the details that are not in the root of the project but a level above too far
#e,lse just continue
- mvn clean install package
#- mvn appengine:update
- mvn appengine:update -Dappengine.additionalParams="--service_account_json_key_file=/tmp/client-secret.json"
#now both the mvn scripts returns error
#
I have added the gcp plugin in my pom.xml
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.9</version>
</plugin>
But I cannot deploy it to gcp/ This is the error that I am getting now. Seems that it is not able to find the packaged jar to deploy.
[INFO] Updating Google App Engine Application[INFO] Running --oauth2 update /opt/atlassian/pipelines/agent/build/target/SpringBootProjectWithSecurity-0.0.1-SNAPSHOTUnable to find the webapp directory /opt/atlassian/pipelines/agent/build/target/SpringBootProjectWithSecurity-0.0.1-SNAPSHOTusage: AppCfg [options] <action> [<app-dir>] [<argument>]Action must be one of: help: Print help for a specific action. download_app: Download a previously uploaded app version. request_logs: Write request logs in Apache common log format. rollback: Rollback an in-progress update. start_module_version: Start the specified module version. stop_module_version: Stop the specified module version. update: Create or update an app version. update_indexes: Update application indexes. update_cron: Update application cron jobs. update_queues: Update application task queue definitions. update_dispatch: Update the application dispatch configuration.
Could someone please help me with this?