Merge pull request 'develop' (#50) from develop into main
testing/ogcore-api/pipeline/head This commit looks good Details
ogcore-debian-package/pipeline/head This commit looks good Details
ogcore-debian-package/pipeline/tag This commit looks good Details

Reviewed-on: #50
pull/52/head 0.22.1
Manuel Aranda Rosales 2025-09-03 10:49:49 +02:00
commit 4b09a0c271
5 changed files with 31 additions and 8 deletions

View File

@ -1,4 +1,12 @@
# Changelog
## [0.22.1] - 2025-09-03
### Fixed
- Se ha corregido un typo.
### Improved
- Se ha añadido nueva configuracion a Jenkinsfile para la ejecucion de los test automaticos.
---
## [0.22.0] - 2025-09-03
### Added
- Se han mejorado el control de errores respecto a ogRepository

View File

@ -98,8 +98,21 @@ pipeline {
}
}
post {
success {
script {
// Solo lanzar cuando el build sea exitoso y en la rama main
if (env.BRANCH_NAME == 'main') {
build job: 'Aptly publish nightly repository',
wait: false,
parameters: [
string(name: 'TRIGGERED_BY', value: "${env.JOB_NAME}-${env.BUILD_NUMBER}")
]
}
}
}
always {
notifyBuildStatus('narenas@qindel.com')
notifyBuildStatus('opengnsys@qindel.com')
}
}
}

View File

@ -6,12 +6,8 @@ namespace App\Controller;
use ApiPlatform\Validator\ValidatorInterface;
use App\Dto\Input\DeployImageInput;
use App\Entity\Command;
use App\Entity\Image;
use App\Model\ClientStatus;
use App\Model\ImageStatus;
use App\Entity\ImageImageRepository;
use App\Entity\OrganizationalUnit;
use App\Entity\Partition;
use App\Model\CommandTypes;
use App\Model\DeployMethodTypes;
use App\Model\TraceStatus;
@ -25,6 +21,7 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
class DeployImageAction extends AbstractController
{
@ -46,7 +43,7 @@ class DeployImageAction extends AbstractController
public function __invoke(DeployImageInput $input, ImageImageRepository $image): JsonResponse
{
if ($image->getStatus() !== ImageStatus::SUCCESS) {
return new BadRequestHttpException('Image is not ready to be deployed');
throw new BadRequestHttpException('Image is not ready to be deployed');
}
$this->validator->validate($input);

View File

@ -84,6 +84,7 @@ class UpdateGitImageAction extends AbstractController
'diskNumber' => $partition->getDiskNumber(),
'partitionNumber' => $partition->getPartitionNumber(),
'repositoryName' => $input->gitRepository,
'options' => $input->options ? 'force push' : null,
];
}
}

View File

@ -32,6 +32,10 @@ class UpdateGitImageInput
public ?string $destinationBranch = null;
#[Groups(['git-repository:write'])]
#[ApiProperty(description: 'Whether to queue the update', example: false)]
#[ApiProperty(description: 'Whether to push the image to the Git repository', example: false)]
public ?bool $options = null;
#[Groups(['git-repository:write'])]
#[ApiProperty(description: 'Whether to queue the update for later', example: false)]
public bool $queue = false;
}