1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(services): add the ability to pull latest image when updating a … (#1984)

* feat(services): add the ability to pull latest image when updating a service

* feat(services): update version header value

* refactor(services): remove TODO

* feat(services): rollback version header value to 1.29
This commit is contained in:
Anthony Lapenna 2018-06-20 15:53:58 +02:00 committed by GitHub
parent 0da9e564b9
commit 61c74e22f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 24 deletions

View file

@ -10,10 +10,24 @@ function ServiceFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, Htt
query: { method: 'GET', isArray: true, params: {filters: '@filters'} },
create: {
method: 'POST', params: {action: 'create'},
headers: { 'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader },
headers: {
'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader,
// TODO: This is a temporary work-around that allows us to leverage digest pinning on
// the Docker daemon side. It has been moved client-side since Docker API version > 1.29.
// We should introduce digest pinning in Portainer as well.
'version': '1.29'
},
ignoreLoadingBar: true
},
update: { method: 'POST', params: {id: '@id', action: 'update', version: '@version'} },
update: {
method: 'POST', params: { id: '@id', action: 'update', version: '@version' },
headers: {
// TODO: This is a temporary work-around that allows us to leverage digest pinning on
// the Docker daemon side. It has been moved client-side since Docker API version > 1.29.
// We should introduce digest pinning in Portainer as well.
'version': '1.29'
}
},
remove: { method: 'DELETE', params: {id: '@id'} },
logs: {
method: 'GET', params: { id: '@id', action: 'logs' },