Skip to content

Commit

Permalink
customize for mk
Browse files Browse the repository at this point in the history
  • Loading branch information
toby.tan authored and ttbadr committed Jul 28, 2024
1 parent cfea6d1 commit ce89791
Show file tree
Hide file tree
Showing 18 changed files with 1,431 additions and 306 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/auto-prettier.yaml

This file was deleted.

108 changes: 0 additions & 108 deletions .github/workflows/build-vmtool.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

24 changes: 12 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: release

on:
push:
tags:
- "arthas-all-*"
branches:
- master

jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -17,16 +18,15 @@ jobs:
distribution: 'adopt'
- name: Build with Maven
run: mvn clean package -P full

- name: Get version
id: version
run: |
echo "VERSION=$(cat pom.xml | grep -oPm1 '(?<=<revision>)[^<]+')" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
files: |
packaging/target/*.zip
packaging/target/*.deb
packaging/target/*.rpm
tunnel-server/target/*fatjar.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
tag: ${{ steps.version.outputs.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "bin/arthas.sh,packaging/target/*.zip,packaging/target/*.tgz,packaging/target/*.deb,packaging/target/*.rpm,tunnel-server/target/*fatjar.jar"

55 changes: 0 additions & 55 deletions .github/workflows/test.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions bin/arthas.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
unset -v _JAVA_OPTIONS
fileName=arthas-bin.tgz
url1="https://github.com/ttbadr/arthas/releases/download/3.6.7/$fileName"
url2="http://10.116.53.198/scripts/repo/$fileName"

if [ ! -d /tmp/arthas ]; then
mkdir /tmp/arthas && cd /tmp/arthas
echo 'downloading arthas...'
if command -v curl &>/dev/null; then
curl -I -m 3 -o /dev/null -s http://10.116.53.198
if [ $? -gt 0 ];then
curl -L $url1 -o $fileName
else
curl -L $url2 -o $fileName
fi
else
wget -T 3 --spider -S "http://10.116.53.198" &>/dev/null
if [ $? -gt 0 ];then
wget $url1 -O $fileName
else
wget $url2 -O $fileName
fi
fi
tar -xf $fileName
rm -f $fileName
else
cd /tmp/arthas
fi
java -jar arthas-boot.jar
2 changes: 1 addition & 1 deletion core/src/main/java/arthas.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ arthas.ip=127.0.0.1
# seconds
arthas.sessionTimeout=1800

#arthas.enhanceLoaders=java.lang.ClassLoader
arthas.enhanceLoaders=java.lang.ClassLoader,org.jboss.modules.ConcurrentClassLoader,org.jboss.modules.ModuleClassLoader

# https://arthas.aliyun.com/doc/en/auth
# arthas.username=arthas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,9 @@ public ArthasMethod(Class<?> clazz, String methodName, String methodDesc) {
this.methodName = methodName;
this.methodDesc = methodDesc;
}

public Method getTargetMethod() {
initMethod();
return method;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.taobao.arthas.core.command;

import com.taobao.arthas.core.command.monitor200.SqlProfilerCommand;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -105,6 +106,7 @@ private void initCommands(List<String> disabledCommands) {
commandClassList.add(ProfilerCommand.class);
commandClassList.add(VmToolCommand.class);
commandClassList.add(StopCommand.class);
commandClassList.add(SqlProfilerCommand.class);
try {
if (ClassLoader.getSystemClassLoader().getResource("jdk/jfr/Recording.class") != null) {
commandClassList.add(JFRCommand.class);
Expand Down
Loading

0 comments on commit ce89791

Please sign in to comment.