-
Yes, you can define job property and secret in project build setting, and then reference them in remote url and certificate. Check the inline help of these fields on how to use variables
-
Previous Value Current Value Open
Closed
-
The userName field doesn't seem to be able to use Job Properties
-
Previous Value Current Value Closed
Open
-
name: Mirrors Repositorys remoteUrl: '@property:Mirrors_Repositories_Url@' userName: '@property:Mirrors_Repositories_username@' passwordSecret: Mirrors_Repositories_Password certificate: '@property:Mirrors_Repositories_Cert@'
13:18:28 Running step "Mirrors Repositorys"... 13:18:28 fatal: unable to access 'https://property:Mirrors_Repositories_username@:*****@test.git.local/test/test.git/': URL rejected: Port number was not a decimal number between 0 and 65535 13:18:28 Command execution failed (command: git -c http.sslCAInfo=/opt/onedev/temp/server/certificate14399940181085312798pem push --force https://@property:Mirrors_Repositories_username@:*****@test.git.local/test/test.git 89abb753441ead65933eae6a37de9c8f42e3b60a:refs/heads/rc, exit code: 128)
-
Is it possible to decouple userName?
-
Is it possible to decouple userName?
Will be addressed via OD-2450. Also recommed to use secret instead of property for certficate field, as property does not accept multi-line values.
-
OK, thanks for your help.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Question 1: Can configure the remote URL through Job Secrets? Reason: When the URL of the upstream repository (such as the middle-tier OneDev instance) is different in different environments (testing, production), if the URL is hard-coded in the build script, the synchronization operation is likely to fail. Putting it in Job Secrets will be more flexible. Modifying the remote URL does not require adding a commit, and the same configuration task can be easily reused according to different instances
Question 2.: Can configure a self-signed certificate through Job Secrets? Reason: Self-signed certificates may need to be rotated and updated frequently. Hard-coded certificates make the configuration less flexible. Every time you change the certificate, you need to manually modify the build file, which will increase unnecessary commits in the git repository
Can the contents of the remote URL and self-signed certificate options be decoupled from .onedev-buildspec.yml.