This commit is contained in:
Philipp Kunz 2016-06-06 00:00:50 +02:00
parent 832031a02a
commit 47aac2f7c5
2 changed files with 6 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ let docker = function(){
plugins.beautylog.error("You have to specify Login Data to the Docker Registry"); plugins.beautylog.error("You have to specify Login Data to the Docker Registry");
process.exit(1); process.exit(1);
} }
plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + ciBuildToken + " " + "registry.gitlab.com"); // Always also login to GitLab Registry plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com"); // Always also login to GitLab Registry
let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER); let dockerRegexResultArray = dockerRegex.exec(process.env.NPMCI_LOGIN_DOCKER);
let username = dockerRegexResultArray[1]; let username = dockerRegexResultArray[1];
let password = dockerRegexResultArray[2]; let password = dockerRegexResultArray[2];
@ -41,8 +41,7 @@ let docker = function(){
let dockerGitlab = function(){ let dockerGitlab = function(){
let done = plugins.q.defer(); let done = plugins.q.defer();
env.dockerRegistry = "registry.gitlab.com"; env.dockerRegistry = "registry.gitlab.com";
let ciBuildToken = process.env.CI_BUILD_TOKEN plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + process.env.CI_BUILD_TOKEN + " " + "registry.gitlab.com");
plugins.shelljs.exec("docker login -u gitlab-ci-token -p " + ciBuildToken + " " + "registry.gitlab.com");
done.resolve(); done.resolve();
return done.promise; return done.promise;
} }