mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-28 15:21:29 +05:30
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 54f0238b6b | |||
| 2bf42cfd47 | |||
| 1c9f7ede70 | |||
| 87c80bfba5 | |||
| 680ca48e6d | |||
| f6d4261609 | |||
| f755519945 | |||
| 11d9f9dba7 | |||
| beda055c57 | |||
| 22b8706efa |
Vendored
+81
@@ -0,0 +1,81 @@
|
|||||||
|
pipeline {
|
||||||
|
agent none
|
||||||
|
options {
|
||||||
|
checkoutToSubdirectory('src/github.com/docker/docker-credential-helpers')
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('build') {
|
||||||
|
parallel {
|
||||||
|
stage('linux') {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
label 'declarative'
|
||||||
|
containerTemplate {
|
||||||
|
name 'golang'
|
||||||
|
image 'golang:1.12.4'
|
||||||
|
ttyEnabled true
|
||||||
|
command 'cat'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
GOPATH = pwd()
|
||||||
|
PATH = "/usr/local/go/bin:${GOPATH}/bin:$PATH"
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
container('golang') {
|
||||||
|
dir('src/github.com/docker/docker-credential-helpers') {
|
||||||
|
sh 'apt-get update && apt-get install -y libsecret-1-dev pass'
|
||||||
|
sh 'make deps fmt lint test'
|
||||||
|
sh 'make pass secretservice'
|
||||||
|
archiveArtifacts 'bin/docker-credential-*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('mac') {
|
||||||
|
agent {
|
||||||
|
label 'mac-build && go1.12.4'
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
PATH = "/usr/local/go/bin:${GOPATH}/bin:$PATH"
|
||||||
|
GOPATH = pwd()
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir('src/github.com/docker/docker-credential-helpers') {
|
||||||
|
sh 'make deps fmt lint test'
|
||||||
|
sh 'make osxcodesign'
|
||||||
|
archiveArtifacts 'bin/docker-credential-*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('windows') {
|
||||||
|
agent {
|
||||||
|
label 'win-build && go1.12.4'
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
GOPATH = pwd()
|
||||||
|
PATH = "${pwd()}/bin;$PATH"
|
||||||
|
PFX = credentials('windows-build-pfx-sanitize')
|
||||||
|
PFXPASSWORD = credentials('windows-build-pfx-password')
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
dir('src/github.com/docker/docker-credential-helpers') {
|
||||||
|
sh 'echo ${PFX} | base64 -d > pfx'
|
||||||
|
|
||||||
|
sh 'make deps fmt lint test'
|
||||||
|
sh 'make wincred'
|
||||||
|
bat """ "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86\\signtool.exe" sign /fd SHA256 /a /f pfx /p ${PFXPASSWORD} /d Docker /du https://www.docker.com /t http://timestamp.verisign.com/scripts/timestamp.dll bin\\docker-credential-wincred.exe """
|
||||||
|
archiveArtifacts 'bin/docker-credential-*'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh 'rm -f pfx'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package credentials
|
package credentials
|
||||||
|
|
||||||
// Version holds a string describing the current version
|
// Version holds a string describing the current version
|
||||||
const Version = "0.6.2"
|
const Version = "0.6.3"
|
||||||
|
|||||||
@@ -224,5 +224,4 @@ void freeListData(char *** data, unsigned int length) {
|
|||||||
for(int i=0; i<length; i++) {
|
for(int i=0; i<length; i++) {
|
||||||
free((*data)[i]);
|
free((*data)[i]);
|
||||||
}
|
}
|
||||||
free(*data);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ func (h Osxkeychain) List() (map[string]string, error) {
|
|||||||
defer C.free(unsafe.Pointer(acctsC))
|
defer C.free(unsafe.Pointer(acctsC))
|
||||||
var listLenC C.uint
|
var listLenC C.uint
|
||||||
errMsg := C.keychain_list(credsLabelC, &pathsC, &acctsC, &listLenC)
|
errMsg := C.keychain_list(credsLabelC, &pathsC, &acctsC, &listLenC)
|
||||||
|
defer C.freeListData(&pathsC, listLenC)
|
||||||
|
defer C.freeListData(&acctsC, listLenC)
|
||||||
if errMsg != nil {
|
if errMsg != nil {
|
||||||
defer C.free(unsafe.Pointer(errMsg))
|
defer C.free(unsafe.Pointer(errMsg))
|
||||||
goMsg := C.GoString(errMsg)
|
goMsg := C.GoString(errMsg)
|
||||||
@@ -119,9 +121,6 @@ func (h Osxkeychain) List() (map[string]string, error) {
|
|||||||
return nil, errors.New(goMsg)
|
return nil, errors.New(goMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer C.freeListData(&pathsC, listLenC)
|
|
||||||
defer C.freeListData(&acctsC, listLenC)
|
|
||||||
|
|
||||||
var listLen int
|
var listLen int
|
||||||
listLen = int(listLenC)
|
listLen = int(listLenC)
|
||||||
pathTmp := (*[1 << 30]*C.char)(unsafe.Pointer(pathsC))[:listLen:listLen]
|
pathTmp := (*[1 << 30]*C.char)(unsafe.Pointer(pathsC))[:listLen:listLen]
|
||||||
|
|||||||
@@ -158,5 +158,4 @@ void freeListData(char *** data, unsigned int length) {
|
|||||||
for(i=0; i<length; i++) {
|
for(i=0; i<length; i++) {
|
||||||
free((*data)[i]);
|
free((*data)[i]);
|
||||||
}
|
}
|
||||||
free(*data);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,12 +92,12 @@ func (h Secretservice) List() (map[string]string, error) {
|
|||||||
defer C.free(unsafe.Pointer(acctsC))
|
defer C.free(unsafe.Pointer(acctsC))
|
||||||
var listLenC C.uint
|
var listLenC C.uint
|
||||||
err := C.list(credsLabelC, &pathsC, &acctsC, &listLenC)
|
err := C.list(credsLabelC, &pathsC, &acctsC, &listLenC)
|
||||||
|
defer C.freeListData(&pathsC, listLenC)
|
||||||
|
defer C.freeListData(&acctsC, listLenC)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
defer C.g_error_free(err)
|
defer C.g_error_free(err)
|
||||||
return nil, errors.New("Error from list function in secretservice_linux.c likely due to error in secretservice library")
|
return nil, errors.New("Error from list function in secretservice_linux.c likely due to error in secretservice library")
|
||||||
}
|
}
|
||||||
defer C.freeListData(&pathsC, listLenC)
|
|
||||||
defer C.freeListData(&acctsC, listLenC)
|
|
||||||
|
|
||||||
resp := make(map[string]string)
|
resp := make(map[string]string)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user