工具相关🔥

2023/9/26 jenkins工具

Jenkins配置pipeline

D:\Jenkins\jdk-11.0.13\bin\java -jar D:\Jenkins\agent.jar -jnlpUrl http://xx.xx.xx.xx:8082/computer/win2012/jenkins-agent.jnlp -secret 2504c1226cadb6e90fd43086fa4051346d50d05d154f83cc91fdd7506ac32f07 -workDir "D:\Jenkins"

pipeline {
    agent {
        label 'win2012'
    }
    stages {
        stage('Pull Code') {
            steps {
                dir('项目路径') {
                    bat 'cd'
                    bat 'git pull'
                }
            }
        }
        stage('Stop Service') {
            steps {
                dir('服务路径') {
                    bat 'cd'
                    bat 'stop.bat'
                }
            }
        }
        stage('Start Service') {
            environment { 
                JENKINS_NODE_COOKIE = 'dontkillme'
            }
            steps {
                dir('服务路径') {
                    bat 'cd'
                    bat 'start.bat'
                }
            }
        }
    }    
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

Beyond Compare 30 days

1、找到beyond Compare 4安装文件夹下面的BCUnrar.dll文件,将其删除;

2、在搜索栏中输入 regedit ,打开注册表

3、删除项目CacheId :HKEY_CURRENT_USER\Software\Scooter Software\Beyond Compare 4\CacheId

4、就会有30天使用时间,当30天试用期结束后再次执行第三步。
1
2
3
4
5
6
7

git 提交新代码到远程仓库

前提:已创建好远程仓库

git init

git add .

git commit -m "init project"

git remote add origin https://xx.xx.xx.xx/xxx.git

git push -u origin master
1
2
3
4
5
6
7
8
9
10
11

git 取消跟踪某个目录

# 查看跟踪的目录列表
git rm -r -n --cache 目录

# 删除跟踪的目录
git rm -r --cache 目录

git commit -m "delete dir"

git push origin master

不需要的目录可以写到 .gitignore 文件
1
2
3
4
5
6
7
8
9
10
11