SOLMAN 7.2 ASE (SLES15SP4)_ #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SAP Solution Manager 7.2 / SAP ASE / SLES15 SP4 / us-east-1 / Runs bi-weekly / SAP Software Download & Custom Tags | |
name: 'SOLMAN 7.2 ASE (SLES15SP4)_' | |
# Controls when the workflow will run | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '0 7 2 * *' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
role-session-name: GithubActions | |
# Runs a set of commands using the runners shell | |
- name: test | |
run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip awscliv2.zip | |
sudo ./aws/install --update | |
aws --version | |
MyTimestamp=$(date +%s) | |
StackName=SOLMAN72ASET$MyTimestamp | |
echo ${{ secrets.STACK_SOLMAN72ASE }} > stack.json | |
DEPLOYMENT_ID=$(aws launch-wizard create-deployment --specifications file://stack.json --deployment-pattern-name "SapNWOnAseSingle" --name $StackName --workload-name "SAP" --output text --query 'deploymentId') | |
sleep 10s | |
echo "Deployment started: "$DEPLOYMENT_ID | |
until [ $(aws launch-wizard get-deployment --deployment-id $DEPLOYMENT_ID --output text --query 'deployment.status') = *"IN_PROGRESS"* ]; | |
do | |
echo "Waiting to complete...." | |
sleep 60s | |
if [ $(aws launch-wizard get-deployment --deployment-id $DEPLOYMENT_ID --output text --query 'deployment.status') != "IN_PROGRESS" ]; then | |
status=$(aws launch-wizard get-deployment --deployment-id $DEPLOYMENT_ID --output text --query 'deployment.status') | |
echo "Deployment $status" | |
if [[ $status != "COMPLETED" ]]; then | |
exit 1 | |
fi | |
break | |
fi | |
done |