| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __construct(string $envName, string $serviceName, string $registryDomainName, string $projectGroup, string $projectName, string $branch) |
||
| 21 | { |
||
| 22 | parent::__construct($envName, $serviceName); |
||
| 23 | $this->isVariableEnvironment = false; |
||
| 24 | $this->dockerImageName = "$registryDomainName/$projectGroup/$projectName:$branch"; |
||
| 25 | |||
| 26 | $this->image = 'docker:git'; |
||
| 27 | $this->services[] = 'docker:dind'; |
||
| 28 | $this->variables['DOCKER_DRIVER'] = 'overlay2'; |
||
| 29 | $this->script = [ |
||
| 30 | 'docker login -u ${CI_DEPLOY_USER} -p ${CI_DEPLOY_PASSWORD} ${REGISTRY_DOMAIN_NAME}', |
||
| 31 | 'docker build -t ' . $this->dockerImageName . ' .', |
||
| 32 | 'docker push ' . $this->dockerImageName |
||
| 33 | ]; |
||
| 34 | |||
| 35 | $this->addOnly($branch); |
||
| 36 | } |
||
| 38 |