Skip to content

Commit

Permalink
Committing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
49081 committed Jan 18, 2025
1 parent 4b002df commit 0466ad1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aks_tomcat_README_md.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
schedule:
- cron: '0 18 * * 4'
- cron: '0 5 * * 2'
workflow_dispatch:

name: 'aks/tomcat/README.md'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
- cron: '0 6 * * 1'
workflow_dispatch:

name: 'sql/get-country/README.md'
name: 'sql/cli/README.md'
jobs:
validate:
runs-on: 'ubuntu-latest'
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
az group create --name $RESOURCE_GROUP --location $REGION
if [[ -z $MSSQL_NAME ]]; then
export MSSQL_NAME=mssql-$RANDOM
export MSSQL_NAME=joazmssql$RANDOM
export MSSQL_USERNAME=mssql
export MSSQL_PASSWORD=p#ssw0rd-$RANDOM
fi
Expand All @@ -49,26 +49,17 @@ jobs:
--start-ip-address $LOCAL_IP \
--end-ip-address $LOCAL_IP
cd sql/load-your-mssql-database-with-data
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
python -m pip install --upgrade pip
sudo pip install mssql-cli
sudo pip install cli-helpers --upgrade --force
cd sql/cli
mvn package
export MSSQL_DNS_NAME=`az sql server show \
--resource-group $RESOURCE_GROUP \
--name $MSSQL_NAME \
--query fullyQualifiedDomainName \
--output tsv`
export MSSQL_CLIENT_USERNAME="$MSSQL_USERNAME@$MSSQL_NAME"
mssql-cli -S $MSSQL_DNS_NAME -U $MSSQL_CLIENT_USERNAME -P $MSSQL_PASSWORD -i create.sql
mssql-cli -S $MSSQL_DNS_NAME -U $MSSQL_CLIENT_USERNAME -P $MSSQL_PASSWORD -d demo -i load.sql
cd ../..
cd sql/get-country
mvn package
java -jar target/get-country.jar "jdbc:sqlserver://$MSSQL_DNS_NAME:1433;databaseName=demo;encrypt=true;trustServerCertificate=true" $MSSQL_CLIENT_USERNAME $MSSQL_PASSWORD USA
export MSSQL_CLIENT_USERNAME="$MSSQL_USERNAME@$MSSQL_NAME"
java -jar target/cli.jar "jdbc:sqlserver://$MSSQL_DNS_NAME:1433;encrypt=true;trustServerCertificate=true" $MSSQL_CLIENT_USERNAME $MSSQL_PASSWORD "SELECT 1"
cd ../..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sql_create_README_md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
az group create --name $RESOURCE_GROUP --location $REGION
if [[ -z $MSSQL_NAME ]]; then
export MSSQL_NAME=mssql-$RANDOM
export MSSQL_NAME=joazmssql$RANDOM
export MSSQL_USERNAME=mssql
export MSSQL_PASSWORD=p#ssw0rd-$RANDOM
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
az group create --name $RESOURCE_GROUP --location $REGION
if [[ -z $MSSQL_NAME ]]; then
export MSSQL_NAME=mssql-$RANDOM
export MSSQL_NAME=joazmssql$RANDOM
export MSSQL_USERNAME=mssql
export MSSQL_PASSWORD=p#ssw0rd-$RANDOM
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
az group create --name $RESOURCE_GROUP --location $REGION
if [[ -z $MSSQL_NAME ]]; then
export MSSQL_NAME=mssql-$RANDOM
export MSSQL_NAME=joazmssql$RANDOM
export MSSQL_USERNAME=mssql
export MSSQL_PASSWORD=p#ssw0rd-$RANDOM
fi
Expand Down

0 comments on commit 0466ad1

Please sign in to comment.