Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ dist: xenial
dotnet: 2.2
jdk:
- oraclejdk8
before_install:
- wget https://archive.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
- unzip -qq apache-maven-3.6.0-bin.zip
- export M2_HOME=$PWD/apache-maven-3.6.0
- export PATH=$M2_HOME/bin:$PATH
# before_install:
# - wget https://archive.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
# - unzip -qq apache-maven-3.6.0-bin.zip
# - export M2_HOME=$PWD/apache-maven-3.6.0
# - export PATH=$M2_HOME/bin:$PATH
before_script:
- chmod -R +x cli
- chmod -R +x scripts
- cd scripts
script:
- /bin/sh ./run-automation-pipeline.sh
# - /bin/sh ./run-automation-pipeline.sh
- /bin/sh ./create-pull-request-linux.sh
# after_success:
Binary file added cli/hub-linux-amd64-2.11.2/hub
Binary file not shown.
Binary file added cli/hub-linux-arm64-2.11.2/hub
Binary file not shown.
Binary file added cli/hub-windows-amd64-2.11.2/hub.exe
Binary file not shown.
22 changes: 22 additions & 0 deletions scripts/create-pull-request.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

ROOT_DIRECTORY=$(dirname $(dirname $(readlink -f "$0")))

if [ $OSTYPE = "msys" ]; then # Windows
HUB_PATH="$ROOT_DIRECTORY/cli/hub-windows-amd64-2.11.2"
else
HUB_PATH="$ROOT_DIRECTORY/cli/hub-linux-arm64-2.11.2"
fi

echo $HUB_PATH
export PATH=$HUB_PATH:$PATH

hub version

git fetch
git checkout dev
git pull origin dev

hub pull-request -m "Automation pipeline update"

exit $?
4 changes: 2 additions & 2 deletions scripts/generate-csharp-api-client.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
ROOT_DIRECTORY=$(dirname $(dirname $(readlink -f "$0")))
CLI_JAR="$ROOT_DIRECTORY/cli/swagger-codegen-cli-2.4.4.jar"
CUSTOM_GENERATOR_JAR="$ROOT_DIRECTORY/generators/csharp/target/csharp-swagger-codegen-1.0.0.jar"
CLI_JAR="${ROOT_DIRECTORY}/cli/swagger-codegen-cli-2.4.4.jar"
CUSTOM_GENERATOR_JAR="${ROOT_DIRECTORY}/generators/csharp/target/csharp-swagger-codegen-1.0.0.jar"
java -cp $CUSTOM_GENERATOR_JAR:$CLI_JAR io.swagger.codegen.SwaggerCodegen generate -l csharp -i ../openapi-2.0/sfmc-openapi-v2.json -o ../openapi-2.0/generated -c ../openapi-2.0/swagger-codegen-config.json
exit $?
34 changes: 34 additions & 0 deletions scripts/git-push-csharp-api-client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

ROOT_DIRECTORY=$(dirname $(dirname $(readlink -f "$0")))

if [ $OSTYPE = "msys" ]; then # Windows
HUB_PATH="$ROOT_DIRECTORY/cli/hub-windows-amd64-2.11.2"
else
HUB_PATH="$ROOT_DIRECTORY/cli/hub-linux-arm64-2.11.2"
fi

echo $HUB_PATH
export PATH=$HUB_PATH:$PATH

# Change path to the root folder of the repo
pushd ..

release_note="Automation pipeline update"
git_branch="dev2"
branch_name=${git_branch}
git fetch
git checkout ${branch_name}

# Adds the files in the local repository and stages them for commit.
git add .

# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"

git pull origin $branch_name

# Pushes the changes in the local repository up to the remote repository
hub push origin

popd
4 changes: 3 additions & 1 deletion scripts/run-automation-pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ bash run-integration-tests.sh

bash create-nuget-package.sh

# bash ./git-push.sh
bash git-push-chsarp-api-client.sh

bash create-pull-request.sh