2020-09-21-x
Xplorist Lv6

2020-09-21

todo-list

record-list

  • gitlab runner 又开始抽风, 问题还是那个问题,下面是可能的解决方案,留到晚上回去解决
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
Vyacheslav Napadovsky :satellite_orbital: @slavanap · 1 year ago
I faced the same error. After short investigation, I've found that folder /path/to/folder.tmp created instead folder referenced in cd /path/to/folder

I did sudo chown gitlab-runner:gitlab-runner -R /etc/gitlab-runner after installation. Runner was launched as systemd service under gitlab-runner user with this command:

/usr/lib/gitlab-runner/gitlab-runner --debug "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog"
Fixed my issue with changing command line to

/usr/lib/gitlab-runner/gitlab-runner --debug "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml"
Here's how my modified /etc/systemd/system/gitlab-runner.service file looks like now.

[Unit]
Description=GitLab Runner
After=syslog.target network.target
ConditionFileIsExecutable=/usr/lib/gitlab-runner/gitlab-runner

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/lib/gitlab-runner/gitlab-runner --debug "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml"
User=gitlab-runner
Group=gitlab-runner
WorkingDirectory=/home/gitlab-runner
StandardInput=tty-force
StandardOutput=inherit
StandardError=inherit

Restart=always
RestartSec=120

[Install]
WantedBy=multi-user.target
gitlab-runner doesn't work as user-limited systemd service without tty-force.

Edited by Vyacheslav Napadovsky 1 year ago

我执行run 命令

1
gitlab-runner run --config /etc/gitlab-runner/config.toml --working-directory /root/gitlab-runner --user root > /root/gitlab-runner/runner.log 2>&1 &
  • 关于GraphQL,现在用到SpringDataJPA就会遇到一个问题,query对象和entity对象的转换问题,如果用上GraphQL是不是能够不用这么麻烦地转来转去?

  • JPA 一对多的级联新增,对象之前还是要互相进行关联才行,还是要遵循基本原理,没有黑魔法

  • JPA 真的是各种坑啊,JSON序列化死循环。

1
2
3

@JsonIgnore

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

/**
* 级联添加:保存一个客户的同时,保存客户的所有联系人
* 需要在操作主体的实体类上,配置casacde属性
*/
@Test
@Transactional //配置事务
@Rollback(false) //不自动回滚
public void testCascadeAdd() {
Customer customer = new Customer();
customer.setCustName("百度1");

LinkMan linkMan = new LinkMan();
linkMan.setLkmName("小李1");

linkMan.setCustomer(customer);
customer.getLinkMans().add(linkMan);

customerDao.save(customer);
}

reference-site-list

GitLab Runner

Linux Shell

JPA 外键

 评论