Hi, I'm trying to write my first bitbucket pipelines script to build and deploy code on jboss eap server. What I have so far is:
I have 2 questions:
1. Will this build then deploy my code successfully
2. On line 24 I get "bad indentation of mapping entry line 24 column 12" Which is toward the end of variables between the word and :
Any help would be greatly appreciated
Hey @Cameron and thank you for reaching out to Community!
It seems like the syntax you have used is invalid. I've adjusted the formatting of your YML file to fix the indentation, which you can find below :
image: maven:3.6.3
pipelines:
default:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify - - file pom.xml
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
- step:
name: Deploy
script:
- pipe: atlassian/scp-deploy:1.3.0
variables:
USER: '$BAMBOO _USER'
SERVER: '$DEV_SERVER'
REMOTE PATH: '/home/bamboo'
LOCAL_PATH: '$(BITBUCKET_CLONE_DIR)/**'
- pipe: atlassian/ssh-run:0.5.0
variables:
SSH_USER: '$BAMBOO_USER'
SSH_PASS: '$BAMBOO_PASS'
SERVER: '$DEV_SERVER'
COMMAND: '<Command to run in the destination server>'
You can try running the pipeline with the yml above and let us know how it goes.
For future reference, to validate the syntax/indentation of your YML file before pushing it to your repository, you can use the Bitbucket Pipelines Validator.
Thank you, @Cameron !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.