resources: # Automation scripts repo - name: repo_cd_war_vm type: gitRepo integration: "drship_github" versionTemplate: sourceName: "devops-recipes/cd_war_vm_ansible" branch: master # AWS PEM Key - name: pem_cd_war_vm type: integration integration: "drship_aws_pem" # AWS Integration config - name: aws_cli_cd_war_vm type: integration integration: "dr_aws" jobs: # Deploy WAR to VM - name: deploy_war_vm_ans type: runSh steps: - IN: war_loc - IN: repo_cd_war_vm switch: off - IN: aws_cli_cd_war_vm switch: off - IN: aws_ec2_info switch: off - IN: pem_cd_war_vm switch: off - TASK: name: deploy_war runtime: options: imageName: "devopsrecipes/build_custom_ci" imageTag: "582227" pull: true env: - AWS_REGION: "us-east-1" - artifact_dest: "/tmp/jar" script: - pushd $(shipctl get_resource_state "repo_cd_war_vm")/ansible - export AWS_ACCESS_KEY_ID=$(shipctl get_integration_resource_field aws_cli_cd_war_vm "accessKey") - export AWS_SECRET_ACCESS_KEY=$(shipctl get_integration_resource_field aws_cli_cd_war_vm "secretKey") - export artifact_filename=$artifact_id"-"$artifact_version"."$artifact_extension - shipctl replace variables.yml - ansible-playbook -v war_deploy_playbook.yml - popd flags: - cd - vm - aws - ansible - war