Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated migration.yml #16171

Merged
merged 1 commit into from
Jun 30, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
- "5.11.0"
- "6.0.0"
- "6.1.0"
- "6.2.0"
migratingVersion:
description: "Specify the version of WSO2 IS that you want to migrate."
default: "6.0.0"
Expand All @@ -23,7 +22,6 @@ on:
- "5.11.0"
- "6.0.0"
- "6.1.0"
- "6.2.0"
database:
description: "Select the database."
default: "mysql"
Expand All @@ -39,7 +37,6 @@ on:
options:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
urlOld:
description: "Provide the URL to download the old version of WSO2 IS."
default: https://github.com/wso2/product-is/releases/download/v5.11.0/wso2is-5.11.0.zip
Expand Down Expand Up @@ -115,22 +112,22 @@ jobs:
echo "All postgre scripts executed successfully!"
- name: Execute Migration Automation Script Ubuntu
run: |
chmod +x ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true

- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts


ubuntu-mysql-migration:
Expand All @@ -139,25 +136,24 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Execute Migration Automation Script Ubuntu
run: |
chmod +x ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true

- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/logs.txt
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts

ubuntu-mssql-migration:
if: ${{ github.event.inputs.database == 'mssql' && github.event.inputs.os == 'ubuntu-latest' }}
Expand Down Expand Up @@ -196,22 +192,22 @@ jobs:
echo "Copied mssql scripts to docker container"
- name: Execute Migration Automation Script Ubuntu
run: |
chmod +x ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ./.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/ubuntu-os/migration-script-ubuntu.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt
continue-on-error: true

- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts

macos-mysql-migration:
if: ${{ github.event.inputs.database == 'mysql' && github.event.inputs.os == 'macos-latest' }}
Expand All @@ -222,21 +218,21 @@ jobs:

- name: Execute Migration Automation Script Mac
run: |
chmod +x ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts

macos-postgres-migration:
runs-on: ${{ github.event.inputs.os }}
Expand Down Expand Up @@ -269,21 +265,21 @@ jobs:

- name: Execute Migration Automation Script Mac
run: |
chmod +x ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts

macos-mssql-migration:
if: ${{ github.event.inputs.database == 'mssql' && github.event.inputs.os == 'macos-latest' }}
Expand Down Expand Up @@ -317,21 +313,21 @@ jobs:

- name: Execute Migration Automation Script Mac
run: |
chmod +x ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ./.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" | tee "migration-automation/logs.txt"
chmod +x ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh
sh ${{ github.workspace }}/.github/migration-tester/migration-automation/mac-os/migration-script-mac.sh "${{ github.event.inputs.urlOld }}" "${{ github.event.inputs.urlNew }}" "${{ github.event.inputs.currentVersion }}" "${{ github.event.inputs.migratingVersion }}" "${{ github.event.inputs.database }}" "${{ github.event.inputs.os }}" "${{ secrets.MIGRATION_EMAIL }}" "${{ secrets.MIGRATION_PASSWORD }}" "${{ secrets.MIGRATION_PAT }}" "${{ secrets.GCP_CLIENT_ID }}" "${{ secrets.GCP_CLIENT_SECRET }}" "${{ secrets.GCP_REFRESH_TOKEN }}" | tee "${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt"
continue-on-error: true
- name: Persist Logs
run: |
mkdir -p ./.github/migration-tester/migration-automation/artifacts
cp ./.github/migration-tester/migration-automation/logs.txt migration-automation/artifacts/
mkdir -p ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
cp ${{ github.workspace }}/.github/migration-tester/migration-automation/logs.txt ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/
if: ${{ always() }}

- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts

validate-migration:
needs:
Expand All @@ -353,7 +349,7 @@ jobs:
if: always()
with:
name: "logs-${{ github.event.inputs.currentVersion }}-${{ github.event.inputs.migratingVersion }}-${{ github.event.inputs.database }}-${{ github.event.inputs.os }}"
path: ./.github/migration-tester/migration-automation/artifacts
path: ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts
retention-days: 7
- name: Post Migration Testing
run: |
Expand All @@ -364,4 +360,4 @@ jobs:
else
echo "$line"
fi
done < ./.github/migration-tester/migration-automation/artifacts/logs.txt
done < ${{ github.workspace }}/.github/migration-tester/migration-automation/artifacts/logs.txt