Skip to content

Commit 5034651

Browse files
Support for username and password field while specifying git and hg material.
1 parent 6afe16c commit 5034651

File tree

1 file changed

+44
-10
lines changed

1 file changed

+44
-10
lines changed

README.md

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ you can find examples of correct environments at the [bottom](#environment).
119119

120120
Please note that it is now recommended to declare the _same_ `format_version` in each `*.gopipeline.json` or `*.goenvironment.json` file.
121121

122-
#### GoCD server version from 19.3.0 and beyond
122+
#### GoCD server version from 19.4.0 and beyond
123+
124+
Supports `format_version` value of `5`. In this version, support of `username` and `encrypted_password` for [git](#git-material-update) and [hg](#hg-material-update) material has been added.
125+
126+
Using a newer `format_version` includes all the behavior of the previous versions too.
127+
128+
#### GoCD server version from 19.3.0 to 19.4.0
123129

124130
Supports `format_version` value of `4`. In this version, support has been added to control the [display order of pipelines](#display-order-of-pipelines).
125131

@@ -530,14 +536,30 @@ All scm materials can have filter object:
530536
"shallow_clone": true
531537
}
532538
```
539+
<a name="git-material-update"/>
540+
541+
For **GoCD >= 19.4.0 and `format_version: 5` and above**:
542+
543+
You need to specify `username` and `encrypted_password` explicitly as such
544+
545+
```json
546+
{
547+
"url": "http://my.git.repository.com",
548+
"branch": "feature12",
549+
"username": "user1",
550+
"encrypted_password": "encrypted_value"
551+
}
552+
```
553+
554+
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
533555

534556
## Svn
535557

536558
```json
537559
{
538560
"url": "http://svn",
539561
"username": "user1",
540-
"password": "pass1",
562+
"encrypted_password": "encrypted_value",
541563
"check_externals": true,
542564
"filter": {
543565
"ignore": [
@@ -552,8 +574,7 @@ All scm materials can have filter object:
552574
}
553575
```
554576

555-
Instead of plain `password` you may specify `encrypted_password` with encrypted content
556-
which usually makes more sense considering that value is stored in SCM.
577+
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
557578

558579
## Hg
559580

@@ -572,14 +593,29 @@ which usually makes more sense considering that value is stored in SCM.
572593
"type": "hg"
573594
}
574595
```
596+
<a name="hg-material-update"/>
597+
598+
For **GoCD >= 19.4.0 and `format_version: 5` and above**:
599+
600+
You need to specify `username` and `encrypted_password` explicitly as such
601+
602+
```json
603+
{
604+
"url": "repos/myhg",
605+
"username": "user1",
606+
"encrypted_password": "encrypted_value"
607+
}
608+
```
609+
610+
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
575611

576612
## Perforce
577613

578614
```json
579615
{
580616
"port": "10.18.3.102:1666",
581617
"username": "user1",
582-
"password": "pass1",
618+
"encrypted_password": "encrypted_value",
583619
"use_tickets": false,
584620
"view": "//depot/dev/src... //anything/src/...",
585621
"filter": {
@@ -595,8 +631,7 @@ which usually makes more sense considering that value is stored in SCM.
595631
}
596632
```
597633

598-
Instead of plain `password` you may specify `encrypted_password` with encrypted content
599-
which usually makes more sense considering that value is stored in SCM.
634+
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
600635

601636
## Tfs
602637

@@ -605,7 +640,7 @@ which usually makes more sense considering that value is stored in SCM.
605640
"url": "url3",
606641
"username": "user4",
607642
"domain": "example.com",
608-
"password": "pass",
643+
"encrypted_password": "encrypted_value",
609644
"project": "projectDir",
610645
"filter": {
611646
"ignore": [
@@ -620,8 +655,7 @@ which usually makes more sense considering that value is stored in SCM.
620655
}
621656
```
622657

623-
Instead of plain `password` you may specify `encrypted_password` with encrypted content
624-
which usually makes more sense considering that value is stored in SCM.
658+
Instead of `encrypted_password` you may specify `password` but `encrypted_password` makes more sense considering that the value is stored in SCM.
625659

626660
## Dependency
627661

0 commit comments

Comments
 (0)