From b979f2a363ac5b2a325f77430ec1ce1087ad4ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 12:22:09 +0200 Subject: [PATCH 01/10] Update deploy-app.yml (#890) --- .github/workflows/deploy-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml index 8fe1c2207..7c342a8cb 100644 --- a/.github/workflows/deploy-app.yml +++ b/.github/workflows/deploy-app.yml @@ -4,6 +4,7 @@ on: push: branches: - main + workflow_dispatch: concurrency: group: '${{ github.workflow }}' @@ -41,7 +42,6 @@ jobs: passphrase: ${{ secrets.PASSPHRASE }} source: "./" target: "mismatch-finder-repo" - rm: true - name: Deploy code uses: appleboy/ssh-action@master From c4ae8e2946b28d7706ad26f2e03acca86722e2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 14:27:47 +0200 Subject: [PATCH 02/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index 312bc14a6..6388d7506 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -46,7 +46,7 @@ jobs: rm: true - name: Deploy code - uses: appleboy/ssh-action@master + uses: appleboy/ssh-action@v1.0.2 with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} From e0bcccec91cf03abe2e1b6c5e714f62cc5713393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 14:37:26 +0200 Subject: [PATCH 03/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index 6388d7506..5db344283 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -53,6 +53,8 @@ jobs: key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} script: | + echo $PATH + echo "$PATH" # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next # Change group of ~/mismatch-finder-repo-next (including symlinks) to tools.mismatch-finder-staging From cda63c84707e6a1b33dc5e075ebee9ddae84ccc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 14:53:01 +0200 Subject: [PATCH 04/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index 5db344283..c06e3c1ab 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -54,7 +54,8 @@ jobs: passphrase: ${{ secrets.PASSPHRASE }} script: | echo $PATH - echo "$PATH" + echo "$PWD" + hostname # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next # Change group of ~/mismatch-finder-repo-next (including symlinks) to tools.mismatch-finder-staging From 84fa17509ffd8b72fe98314bee4dad291c6cdfaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 16:04:31 +0200 Subject: [PATCH 05/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index c06e3c1ab..dffd3a923 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -56,10 +56,16 @@ jobs: echo $PATH echo "$PWD" hostname + become mismatch-finder-staging rm -rf mismatch-finder-repo-next + cp -rv mismatch-finder-repo-next/ ~tools.mismatch-finder-staging/ + become mismatch-finder-staging take mismatch-finder-repo-next + become mismatch-finder-staging cp .env mismatch-finder-repo-next/ + become mismatch-finder-staging mkdir -p mismatch-finder-repo-next/storage/app/allowlist + become mismatch-finder-staging cp uploaders.txt mismatch-finder-repo-next/storage/app/allowlist/ # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable - become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next + # become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next # Change group of ~/mismatch-finder-repo-next (including symlinks) to tools.mismatch-finder-staging - chgrp --no-dereference -R tools.mismatch-finder-staging ~/mismatch-finder-repo-next - rsync -rlgD --delete --delay-updates --exclude '.nfs*' --exclude .env --exclude storage/app/ ~/mismatch-finder-repo-next ~tools.mismatch-finder-staging/ + # chgrp --no-dereference -R tools.mismatch-finder-staging ~/mismatch-finder-repo-next + # rsync -rlgD --delete --delay-updates --exclude '.nfs*' --exclude .env --exclude storage/app/ ~/mismatch-finder-repo-next ~tools.mismatch-finder-staging/ # take aborts recursion whenever it encounters a symlink, thus we use find+xargs to make sure all folders and file ares handled. - find ~tools.mismatch-finder-staging/mismatch-finder-repo-next -type d,f \! -user tools.mismatch-finder-staging -print0 | become mismatch-finder-staging xargs -r --null take 2>&1 | { grep -vF 'will not follow or touch symlinks' || true; } + # find ~tools.mismatch-finder-staging/mismatch-finder-repo-next -type d,f \! -user tools.mismatch-finder-staging -print0 | become mismatch-finder-staging xargs -r --null take 2>&1 | { grep -vF 'will not follow or touch symlinks' || true; } From 3490bb0527f603440c042be70b158d9cc949f5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 16:15:45 +0200 Subject: [PATCH 06/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index dffd3a923..554450f0d 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -56,16 +56,16 @@ jobs: echo $PATH echo "$PWD" hostname - become mismatch-finder-staging rm -rf mismatch-finder-repo-next - cp -rv mismatch-finder-repo-next/ ~tools.mismatch-finder-staging/ - become mismatch-finder-staging take mismatch-finder-repo-next - become mismatch-finder-staging cp .env mismatch-finder-repo-next/ - become mismatch-finder-staging mkdir -p mismatch-finder-repo-next/storage/app/allowlist - become mismatch-finder-staging cp uploaders.txt mismatch-finder-repo-next/storage/app/allowlist/ + # become mismatch-finder-staging rm -rf mismatch-finder-repo-next + # cp -rv mismatch-finder-repo-next/ ~tools.mismatch-finder-staging/ + # become mismatch-finder-staging take mismatch-finder-repo-next + # become mismatch-finder-staging cp .env mismatch-finder-repo-next/ + # become mismatch-finder-staging mkdir -p mismatch-finder-repo-next/storage/app/allowlist + # become mismatch-finder-staging cp uploaders.txt mismatch-finder-repo-next/storage/app/allowlist/ # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable - # become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next + become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next # Change group of ~/mismatch-finder-repo-next (including symlinks) to tools.mismatch-finder-staging - # chgrp --no-dereference -R tools.mismatch-finder-staging ~/mismatch-finder-repo-next - # rsync -rlgD --delete --delay-updates --exclude '.nfs*' --exclude .env --exclude storage/app/ ~/mismatch-finder-repo-next ~tools.mismatch-finder-staging/ + chgrp --no-dereference -R tools.mismatch-finder-staging ~/mismatch-finder-repo-next + rsync -rlgD --delete --delay-updates --exclude '.nfs*' --exclude .env --exclude storage/app/ ~/mismatch-finder-repo-next ~tools.mismatch-finder-staging/ # take aborts recursion whenever it encounters a symlink, thus we use find+xargs to make sure all folders and file ares handled. - # find ~tools.mismatch-finder-staging/mismatch-finder-repo-next -type d,f \! -user tools.mismatch-finder-staging -print0 | become mismatch-finder-staging xargs -r --null take 2>&1 | { grep -vF 'will not follow or touch symlinks' || true; } + find ~tools.mismatch-finder-staging/mismatch-finder-repo-next -type d,f \! -user tools.mismatch-finder-staging -print0 | become mismatch-finder-staging xargs -r --null take 2>&1 | { grep -vF 'will not follow or touch symlinks' || true; } From aa76d8f8071412d957dab31f8a32ab0238a43774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 17:49:47 +0200 Subject: [PATCH 07/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index 554450f0d..c2c718991 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -37,7 +37,7 @@ jobs: - name: Syncing code to Toolforge-Staging uses: appleboy/scp-action@master with: - host: ${{ secrets.HOST }} + host: ${{ secrets.HOST_ALT }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} @@ -46,22 +46,13 @@ jobs: rm: true - name: Deploy code - uses: appleboy/ssh-action@v1.0.2 + uses: appleboy/ssh-action@master with: - host: ${{ secrets.HOST }} + host: ${{ secrets.HOST_ALT }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} script: | - echo $PATH - echo "$PWD" - hostname - # become mismatch-finder-staging rm -rf mismatch-finder-repo-next - # cp -rv mismatch-finder-repo-next/ ~tools.mismatch-finder-staging/ - # become mismatch-finder-staging take mismatch-finder-repo-next - # become mismatch-finder-staging cp .env mismatch-finder-repo-next/ - # become mismatch-finder-staging mkdir -p mismatch-finder-repo-next/storage/app/allowlist - # become mismatch-finder-staging cp uploaders.txt mismatch-finder-repo-next/storage/app/allowlist/ # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next # Change group of ~/mismatch-finder-repo-next (including symlinks) to tools.mismatch-finder-staging From 37b42cade0e59f43bd4bae411f38f9cdac11b647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 17:50:41 +0200 Subject: [PATCH 08/10] Update deploy-app.yml --- .github/workflows/deploy-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml index 7c342a8cb..da7244a0e 100644 --- a/.github/workflows/deploy-app.yml +++ b/.github/workflows/deploy-app.yml @@ -4,7 +4,6 @@ on: push: branches: - main - workflow_dispatch: concurrency: group: '${{ github.workflow }}' @@ -36,17 +35,18 @@ jobs: - name: Syncing code to Toolforge-Production uses: appleboy/scp-action@master with: - host: ${{ secrets.HOST }} + host: ${{ secrets.HOST_ALT }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} source: "./" target: "mismatch-finder-repo" + rm: true - name: Deploy code uses: appleboy/ssh-action@master with: - host: ${{ secrets.HOST }} + host: ${{ secrets.HOST_ALT }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} From bd5ff3581d44409752ff7cafb119ed5c1618f312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 18:08:03 +0200 Subject: [PATCH 09/10] Update deploy-app-staging.yml --- .github/workflows/deploy-app-staging.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-app-staging.yml b/.github/workflows/deploy-app-staging.yml index c2c718991..df384d3ef 100644 --- a/.github/workflows/deploy-app-staging.yml +++ b/.github/workflows/deploy-app-staging.yml @@ -52,6 +52,7 @@ jobs: username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} + command_timeout: 30m script: | # Make sure ~tools.mismatch-finder-staging/mismatch-finder-repo-next is group writable become mismatch-finder-staging chmod -R g+rwx ~tools.mismatch-finder-staging/mismatch-finder-repo-next From 0274e083bbd85aafb7bce314bda9418fcde9d1d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20Akg=C3=BCn?= Date: Tue, 16 Apr 2024 18:23:37 +0200 Subject: [PATCH 10/10] Update deploy-app.yml --- .github/workflows/deploy-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-app.yml b/.github/workflows/deploy-app.yml index da7244a0e..39c4dea07 100644 --- a/.github/workflows/deploy-app.yml +++ b/.github/workflows/deploy-app.yml @@ -50,6 +50,7 @@ jobs: username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} passphrase: ${{ secrets.PASSPHRASE }} + command_timeout: 30m script: | # Make sure ~tools.mismatch-finder/mismatch-finder-repo is group writable become mismatch-finder chmod -R g+rwx ~tools.mismatch-finder/mismatch-finder-repo