diff --git a/.github/workflows/migration.yml b/.github/workflows/migration-automation.yml similarity index 68% rename from .github/workflows/migration.yml rename to .github/workflows/migration-automation.yml index 06349bb57ec..a2ab6b467e1 100644 --- a/.github/workflows/migration.yml +++ b/.github/workflows/migration-automation.yml @@ -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" @@ -23,7 +22,6 @@ on: - "5.11.0" - "6.0.0" - "6.1.0" - - "6.2.0" database: description: "Select the database." default: "mysql" @@ -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 @@ -115,14 +112,14 @@ 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 @@ -130,7 +127,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 ubuntu-mysql-migration: @@ -139,17 +136,16 @@ 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 @@ -157,7 +153,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 ubuntu-mssql-migration: if: ${{ github.event.inputs.database == 'mssql' && github.event.inputs.os == 'ubuntu-latest' }} @@ -196,14 +192,14 @@ 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 @@ -211,7 +207,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 macos-mysql-migration: if: ${{ github.event.inputs.database == 'mysql' && github.event.inputs.os == 'macos-latest' }} @@ -222,13 +218,13 @@ 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 @@ -236,7 +232,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 macos-postgres-migration: runs-on: ${{ github.event.inputs.os }} @@ -269,13 +265,13 @@ 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 @@ -283,7 +279,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 macos-mssql-migration: if: ${{ github.event.inputs.database == 'mssql' && github.event.inputs.os == 'macos-latest' }} @@ -317,13 +313,13 @@ 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 @@ -331,7 +327,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 validate-migration: needs: @@ -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: | @@ -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