Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: set the default version for remote docker #6818

Merged
merged 2 commits into from Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions .circleci/ci/src/commands/cmd-setup-remote-docker.ts
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { commands } from '@circleci/circleci-config-sdk';
import { SetupRemoteDocker } from '@circleci/circleci-config-sdk/dist/src/lib/Components/Commands/exports/Native/SetupRemoteDocker';

export class SetupRemoteDockerCommand {
private static commandName = 'cmd-create-docker-context';

public static get(): SetupRemoteDocker {
return new commands.SetupRemoteDocker({ version: 'default' });
}
}
3 changes: 2 additions & 1 deletion .circleci/ci/src/jobs/frontend/job-webui-build.ts
Expand Up @@ -21,6 +21,7 @@ import { BuildUiImageCommand, NotifyOnFailureCommand, WebuiInstallCommand } from
import { CircleCIEnvironment } from '../../pipelines';
import { computeApimVersion } from '../../utils';
import { config } from '../../config';
import { SetupRemoteDockerCommand } from '../../commands/cmd-setup-remote-docker';

export class WebuiBuildJob {
private static jobName = 'job-webui-build';
Expand All @@ -46,7 +47,7 @@ export class WebuiBuildJob {
const steps: Command[] = [
new commands.Checkout(),
new commands.workspace.Attach({ at: '.' }),
new commands.SetupRemoteDocker(),
SetupRemoteDockerCommand.get(),
new reusable.ReusedCommand(webUiInstallCommand, { 'apim-ui-project': '<< parameters.apim-ui-project >>' }),
new commands.Run({
name: 'Update Build version',
Expand Down
3 changes: 2 additions & 1 deletion .circleci/ci/src/jobs/job-build-backend-images.ts
Expand Up @@ -21,6 +21,7 @@ import { CircleCIEnvironment } from '../pipelines';
import { AddDockerImageInSnykCommand, CreateDockerContextCommand, DockerAzureLoginCommand, DockerAzureLogoutCommand } from '../commands';
import { orbs } from '../orbs';
import { config } from '../config';
import { SetupRemoteDockerCommand } from '../commands/cmd-setup-remote-docker';

export class BuildBackendImagesJob {
public static create(dynamicConfig: Config, environment: CircleCIEnvironment): Job {
Expand All @@ -38,7 +39,7 @@ export class BuildBackendImagesJob {
const steps: Command[] = [
new commands.Checkout(),
new commands.workspace.Attach({ at: '.' }),
new commands.SetupRemoteDocker(),
SetupRemoteDockerCommand.get(),
new reusable.ReusedCommand(createDockerContextCmd),
new reusable.ReusedCommand(dockerAzureLoginCmd),
new commands.Run({
Expand Down
3 changes: 2 additions & 1 deletion .circleci/ci/src/jobs/job-publish-prod-docker-images.ts
Expand Up @@ -21,6 +21,7 @@ import { config } from '../config';
import { GraviteeioVersion, isBlank, parse } from '../utils';
import { CreateDockerContextCommand } from '../commands';
import { BaseExecutor } from '../executors';
import { SetupRemoteDockerCommand } from '../commands/cmd-setup-remote-docker';

export class PublishProdDockerImagesJob {
private static jobName = 'job-publish-prod-docker-images';
Expand All @@ -33,7 +34,7 @@ export class PublishProdDockerImagesJob {
const parsedGraviteeioVersion = parse(environment.graviteeioVersion);

const steps: Command[] = [
new commands.SetupRemoteDocker(),
SetupRemoteDockerCommand.get(),
new commands.Checkout(),
new reusable.ReusedCommand(keeper.commands['env-export'], {
'secret-url': config.secrets.dockerhubBotUserName,
Expand Down
Expand Up @@ -61,7 +61,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -61,7 +61,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -61,7 +61,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -61,7 +61,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -61,7 +61,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -465,7 +465,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -471,7 +471,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -465,7 +465,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -465,7 +465,7 @@ jobs:
resource_class: medium
steps:
- setup_remote_docker:
version: 20.10.6
version: default
- checkout
- keeper/env-export:
secret-url: keeper://cooU9UoXIk8Kj0hsP2rkBw/field/login
Expand Down
Expand Up @@ -224,7 +224,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -191,7 +191,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -224,7 +224,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down Expand Up @@ -275,7 +275,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -567,7 +567,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -676,7 +676,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down
Expand Up @@ -199,7 +199,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -199,7 +199,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -534,7 +534,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -567,7 +567,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -676,7 +676,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down
Expand Up @@ -534,7 +534,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -534,7 +534,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down Expand Up @@ -651,7 +651,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-create-docker-context
- cmd-docker-azure-login
- run:
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down
Expand Up @@ -242,7 +242,7 @@ jobs:
- attach_workspace:
at: .
- setup_remote_docker:
version: 20.10.6
version: default
- cmd-webui-install:
apim-ui-project: << parameters.apim-ui-project >>
- run:
Expand Down