diff --git a/bamboo-specs/build.yaml b/bamboo-specs/build.yaml index 7082f90..2c22c4f 100644 --- a/bamboo-specs/build.yaml +++ b/bamboo-specs/build.yaml @@ -72,11 +72,6 @@ Build: # Create build.txt file with version yarn build:txt - - # Cleanup - rm -rf node_modules - rm -rf client/node_modules - rm -rf server/node_modules - inject-variables: file: out/build.txt scope: RESULT @@ -86,6 +81,31 @@ Build: configuration: selectedRepository: defaultRepository tagName: v${bamboo.inject.version} + final-tasks: + - script: + interpreter: SHELL + scripts: + - |- + set -x + set -e + + # Fix mixed logs + exec 2>&1 + + ls -la + + echo "Size before cleanup:" && du -h | tail -n 1 + + # cleanup root directory + rm -rf node_modules + + # cleanup client directory + rm -rf client/node_modules + + # cleanup server directory + rm -rf server/node_modules + + echo "Size after cleanup:" && du -h | tail -n 1 # Store the .vsix file as a build artifact artifacts: - name: vscode-adblock.vsix diff --git a/bamboo-specs/deploy.yaml b/bamboo-specs/deploy.yaml index 81326b3..ac29633 100644 --- a/bamboo-specs/deploy.yaml +++ b/bamboo-specs/deploy.yaml @@ -42,9 +42,28 @@ marketplace.visualstudio.com: # https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publish-an-extension yarn vsce publish -p ${bamboo.vsceToken} -i vscode-adblock.vsix + final-tasks: + - script: + interpreter: SHELL + scripts: + - |- + set -x + set -e + + # Fix mixed logs + exec 2>&1 + + ls -la - # Cleanup + echo "Size before cleanup:" && du -h | tail -n 1 + + # cleanup root directory + # note: no need to clean client and server directories here, because we only installed + # dependencies in the root directory (for the vsce publish command above) + # TODO: switch to yarn workspaces rm -rf node_modules + + echo "Size after cleanup:" && du -h | tail -n 1 requirements: - adg-docker: 'true' notifications: @@ -89,9 +108,28 @@ open-vsx.org: # https://github.com/eclipse/openvsx/wiki/Publishing-Extensions#5-package-and-upload yarn ovsx publish vscode-adblock.vsix -p ${bamboo.openVsxToken} + final-tasks: + - script: + interpreter: SHELL + scripts: + - |- + set -x + set -e + + # Fix mixed logs + exec 2>&1 + + ls -la - # Cleanup + echo "Size before cleanup:" && du -h | tail -n 1 + + # cleanup root directory + # note: no need to clean client and server directories here, because we only installed + # dependencies in the root directory (for the vsce publish command above) + # TODO: switch to yarn workspaces rm -rf node_modules + + echo "Size after cleanup:" && du -h | tail -n 1 requirements: - adg-docker: 'true' notifications: diff --git a/bamboo-specs/test.yaml b/bamboo-specs/test.yaml index 1608d05..9e50e1c 100644 --- a/bamboo-specs/test.yaml +++ b/bamboo-specs/test.yaml @@ -64,13 +64,31 @@ Build: # Run Jest tests yarn test + final-tasks: + - script: + interpreter: SHELL + scripts: + - |- + set -x + set -e - # Cleanup + # Fix mixed logs + exec 2>&1 + + ls -la + + echo "Size before cleanup:" && du -h | tail -n 1 + + # cleanup root directory rm -rf node_modules + + # cleanup client directory rm -rf client/node_modules + + # cleanup server directory rm -rf server/node_modules - final-tasks: - - clean + + echo "Size after cleanup:" && du -h | tail -n 1 requirements: - adg-docker: true