diff --git a/contrib/worker-models/README.md b/contrib/worker-models/README.md index a2be229619..8fa25030b0 100644 --- a/contrib/worker-models/README.md +++ b/contrib/worker-models/README.md @@ -8,9 +8,9 @@ See https://ovh.github.io/cds/docs/concepts/worker-model/ ```bash # import a worker model -cdsctl worker model import ./go-official-1.13.yml +cdsctl worker model import ./go-official-1.17.yml # or with a remote file -cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/master/contrib/worker-models/go-official-1.13.yml +cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/master/contrib/worker-models/go-official-1.17.yml ``` diff --git a/contrib/worker-models/go-official-1.13.yml b/contrib/worker-models/go-official-1.17.yml similarity index 73% rename from contrib/worker-models/go-official-1.13.yml rename to contrib/worker-models/go-official-1.17.yml index 13fcbad1b9..8c81b0873d 100644 --- a/contrib/worker-models/go-official-1.13.yml +++ b/contrib/worker-models/go-official-1.17.yml @@ -1,6 +1,6 @@ -name: go-official-1.13 +name: go-official-1.17 group: shared.infra -image: golang:1.13 +image: golang:1.17 description: official from https://hub.docker.com/_/golang/ type: docker pattern_name: basic_unix \ No newline at end of file diff --git a/contrib/workflow-templates/demo-usage-service-postgresql/README.md b/contrib/workflow-templates/demo-usage-service-postgresql/README.md index c0b180ba4f..5bd41f7d33 100644 --- a/contrib/workflow-templates/demo-usage-service-postgresql/README.md +++ b/contrib/workflow-templates/demo-usage-service-postgresql/README.md @@ -17,7 +17,7 @@ If you want to import it, you have to be CDS Administrator on your CDS Instance. This template uses a pre-requisite binary `apt-get`, you need a [worker model](https://ovh.github.io/cds/docs/concepts/worker-model/) with this capability on you CDS Instance. -``` bash +```sh # import from github cdsctl template push https://raw.githubusercontent.com/ovh/cds/master/contrib/workflow-templates/demo-usage-service-postgresql/demo-usage-service-postgresql.yml ``` diff --git a/contrib/workflow-templates/demo-usage-service-postgresql/workflow.yml b/contrib/workflow-templates/demo-usage-service-postgresql/workflow.yml index 890d851741..83ff8e09a1 100644 --- a/contrib/workflow-templates/demo-usage-service-postgresql/workflow.yml +++ b/contrib/workflow-templates/demo-usage-service-postgresql/workflow.yml @@ -1,3 +1,5 @@ name: [[.name]] -version: v1.0 -pipeline: demo-service-postgresql +version: v2.0 +workflow: + demo-service-postgresql: + pipeline: demo-service-postgresql diff --git a/contrib/workflow-templates/demo-workflow-hello-world/README.md b/contrib/workflow-templates/demo-workflow-hello-world/README.md index 8d65a27ebb..b4ee68d94b 100644 --- a/contrib/workflow-templates/demo-workflow-hello-world/README.md +++ b/contrib/workflow-templates/demo-workflow-hello-world/README.md @@ -18,7 +18,7 @@ This template is linked to group: `shared.infra` If you want to import it, you have to be CDS Administrator on your CDS Instance. -``` bash +```sh # import from github cdsctl template push https://raw.githubusercontent.com/ovh/cds/master/contrib/workflow-templates/demo-workflow-hello-world/demo-workflow-hello-world.yml ``` diff --git a/contrib/workflow-templates/demo-workflow-hello-world/workflow.yml b/contrib/workflow-templates/demo-workflow-hello-world/workflow.yml index 3a6ad4c390..571c6f4d9e 100644 --- a/contrib/workflow-templates/demo-workflow-hello-world/workflow.yml +++ b/contrib/workflow-templates/demo-workflow-hello-world/workflow.yml @@ -1,5 +1,5 @@ name: [[.name]] -version: v1.0 +version: v2.0 workflow: build: pipeline: build-[[.id]] @@ -27,10 +27,10 @@ workflow: - success depends_on: - fork - deploy-prod: + deploy-prod: pipeline: deploy-[[.id]] application: [[.name]] - environment: [[.name]]-prod + environment: [[.name]]-prod when: - manual - success diff --git a/contrib/workflow-templates/demo-workflow-skeleton/README.md b/contrib/workflow-templates/demo-workflow-skeleton/README.md index d16cdf3dec..9d51378eb0 100644 --- a/contrib/workflow-templates/demo-workflow-skeleton/README.md +++ b/contrib/workflow-templates/demo-workflow-skeleton/README.md @@ -14,7 +14,7 @@ This template is linked to group: `shared.infra` If you want to import it, you have to be CDS Administrator on your CDS Instance. -``` bash +```sh # import from github cdsctl template push https://raw.githubusercontent.com/ovh/cds/master/contrib/workflow-templates/demo-workflow-skeleton/demo-workflow-skeleton.yml ``` diff --git a/contrib/workflow-templates/demo-workflow-skeleton/workflow.yml b/contrib/workflow-templates/demo-workflow-skeleton/workflow.yml index 3a6ad4c390..571c6f4d9e 100644 --- a/contrib/workflow-templates/demo-workflow-skeleton/workflow.yml +++ b/contrib/workflow-templates/demo-workflow-skeleton/workflow.yml @@ -1,5 +1,5 @@ name: [[.name]] -version: v1.0 +version: v2.0 workflow: build: pipeline: build-[[.id]] @@ -27,10 +27,10 @@ workflow: - success depends_on: - fork - deploy-prod: + deploy-prod: pipeline: deploy-[[.id]] application: [[.name]] - environment: [[.name]]-prod + environment: [[.name]]-prod when: - manual - success diff --git a/docker-compose.yml b/docker-compose.yml index cfdb50f9a2..c1a9aa04a6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,19 +11,22 @@ services: POSTGRES_PASSWORD: cds POSTGRES_USER: cds POSTGRES_DB: cds + volumes: + - cds-postgres-volume:/var/lib/postgresql/data cds-db-init: image: postgres:14.0 command: > - sh -exc " - PGPASSWORD=cds psql -h cds-db -p 5432 -U cds -d cds -c \"CREATE SCHEMA IF NOT EXISTS cdn AUTHORIZATION cds;\";" + sh -exc "PGPASSWORD=cds psql -h cds-db -p 5432 -U cds -d cds -c \"CREATE SCHEMA IF NOT EXISTS cdn AUTHORIZATION cds;\";" links: - cds-db cds-cache: image: redis:alpine - command: redis-server --requirepass cds + command: redis-server --requirepass cds --save 60 1 restart: always + volumes: + - cds-redis-volume:/data elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:6.7.2 @@ -50,7 +53,13 @@ services: cds-prepare: image: ${CDS_DOCKER_IMAGE:-ovhcom/cds-engine:latest} command: > - sh -c " + bash -c " + if [ ! -f /app/conf/conf.toml ]; then + /app/cds-engine-linux-amd64 config new api cdn ui hooks repositories vcs elasticsearch hatchery:local hatchery:swarm > /app/conf/conf.toml; + else + echo '/!\ Config file already exists'; + fi; + chown -R cds:cds /app/conf /app/artifacts /app/repositories /app/cdn-buffer /app/cdn-storage; /app/cds-engine-linux-amd64 config new > /app/conf/conf.toml; mkdir -p /app/artifacts /app/repositories /app/hatchery-local; chown -R cds:cds /app/conf /app/artifacts /app/repositories /app/hatchery-local /app/cdn-buffer /app/cdn-storage; @@ -60,12 +69,7 @@ services: api.cache.redis.password=cds \ api.database.host=cds-db \ api.download.directory=/app \ - api.url.api=http://${HOSTNAME}:8081 \ - api.url.ui=http://${HOSTNAME}:8080 \ api.log.level=info \ - api.smtp.disable=false \ - api.smtp.port=2023 \ - api.smtp.host=smtpmocksrv \ cdn.cache.redis.host=cds-cache:6379 \ cdn.cache.redis.password=cds \ cdn.storageUnits.buffers.redis.redis.host=cds-cache:6379 \ @@ -103,7 +107,6 @@ services: elasticsearch.elasticsearch.indexEvents=cds-index-events \ elasticsearch.elasticsearch.indexMetrics=cds-index-metrics \ elasticsearch.elasticsearch.url=http://elasticsearch:9200 \ - ui.url=http://${HOSTNAME}:8080 \ ui.enableServiceProxy=true \ ui.api.http.url=http://cds-api:8081 \ ui.hooksURL=http://cds-hooks:8083 \ @@ -282,13 +285,6 @@ services: ports: - "127.0.0.1:2375:2375" - smtpmocksrv: - build: - context: ./tools/smtpmock - ports: - - "2023:2023" - - "2024:2024" - kibana: image: docker.elastic.co/kibana/kibana-oss:6.7.2 ports: @@ -297,10 +293,12 @@ services: - elasticsearch volumes: + cds-postgres-volume: + cds-redis-volume: + cds-elasticsearch-volume: + cds-conf-volume: cds-artifacts-volume: cds-repositories-volume: cds-hatchery-local-volume: - cds-conf-volume: - cds-elasticsearch-volume: cds-cdn-buffer-volume: cds-cdn-storage-volume: diff --git a/docs/content/docs/components/cdn.md b/docs/content/docs/components/cdn.md index fd18f457e7..bf8ecdf555 100644 --- a/docs/content/docs/components/cdn.md +++ b/docs/content/docs/components/cdn.md @@ -4,36 +4,138 @@ weight: 3 --- ## What's CDN -CDN is a service dedicated to receive and store CDS's logs. In a near future, it will also be able to manage artifacts and cache used by your jobs. + +CDN is a service dedicated to receive and store CDS's logs and artifacts. CDN stores the list of all known log or artifact items in a Postgres database and communicates with storage backends to store the contents of those items. These backends are call units and there are two types of units in CDN: * Buffer unit: To store logs and artifacts of incoming jobs, these units are designed to be fast for read / write operations, but with limited capacity. -* Storage Unit: to store complete job's logs and artifact. +* Storage Unit: to store complete job's logs and artifacts. -When logs or file are received by CDN, it will first store these items in its buffer. Then, when the item is fully received, it will be moved to one of the configured storage units. +When logs or file are received by CDN from a cds worker, it will first store these items in its buffer. Then, when the item is fully received, it will be moved to one of the configured storage units. If the CDN service is configured with multiple storage units, each unit periodically checks for missing items and synchronizes these items from other units. +CDS UI and CLI communicate with CDN to get entire logs, or stream them. + +## Supported units +* Buffer (type: log): Redis. +* Buffer (type: file): Local, NFS +* Storage: Local, Swift, S3, Webdav ## Configuration -Like any other CDS service, CDN requires to be authenticated with a consumer. The required scopes are Service, Worker and RunExecution. +Like any other CDS service, CDN requires to be authenticated with a consumer. The required scopes are `Service`, `Worker` and `RunExecution`. + +You can generate a configuration file with the `engine` binary: + +```sh +$ engine config new cdn > cds-configuration.toml +``` You must have at least one storage unit, one file buffer and one log buffer to be able to run CDN. -## Supported units -* Buffer (type: log): Redis. -* Buffer (type: file): Local. -* Storage: Local, Swift, S3, Webdav, CDS (cds unit is used for migration purpose and will be removed in future release). +### CDN artifact configuration +#### Storage Unit Buffer -## Use case +You must have a `storageUnits.buffers` , one for the type `log`, another for the type `file`. -Workers and hatcheries communicate with CDN, sending step logs and service log. +Type `log`: -![CDN_RECEIVE](/images/cdn_logs_receive.png?width=600px) +```toml + [cdn.storageUnits.buffers.redis] + bufferType = "log" -CDS UI and CLI communicate with CDN to get entire logs, or stream them. + [cdn.storageUnits.buffers.redis.redis] + host = "aaa@instance0,instance1,instance2" + password = "your-password" +``` + +Type `file`: + +```toml + [cdn.storageUnits.buffers.local-buffer] + + # it can be 'log' to receive logs or 'file' to receive artifacts + bufferType = "file" + + [cdn.storageUnits.buffers.local-buffer.local] + path = "/var/lib/cds-engine/cdn-buffer" +``` + +To multi-instanciate the cdn service, you can use a NFS for the bufferType file, example: + +```toml + [cdn.storageUnits.buffers.buffer-nfs] + bufferType = "file" + + [cdn.storageUnits.buffers.buffer-nfs.nfs] + host = "w.x.y.z" + targetPartition = "/zpool-partition/cdn" + userID = 0 + groupID = 0 + + [[cdn.storageUnits.buffers.buffer-nfs.nfs.encryption]] + Cipher = "aes-gcm" + Identifier = "nfs-buffer-id" + ## enter a key here, 32 lenght + Key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + Sealed = false +``` + +#### Storage Units Storage + +The storage unit 'storage' store the artifacts. +You can use `Local`, `Swift`, `S3`, `Webdav` + +Example of storage unit `local`: + +```toml + [cdn.storageUnits.storages] + + [cdn.storageUnits.storages.local] + + # flag to disabled backend synchronization + disableSync = false + + # global bandwith shared by the sync processes (in Mb) + syncBandwidth = 128 + + # number of parallel sync processes + syncParallel = 2 + + [cdn.storageUnits.storages.local.local] + path = "/tmp/cds/local-storage" + + [[cdn.storageUnits.storages.local.local.encryption]] + Cipher = "aes-gcm" + Identifier = "cdn-storage-local" + LocatorSalt = "xxxxxxxxx" + SecretValue = "xxxxxxxxxxxxxxxxx" + Timestamp = 0 +``` + +Example of storage unit `swift`: +``` + [cdn.storageUnits.storages] + + [cdn.storageUnits.storages.swift] + syncParallel = 6 + syncBandwidth = 1000 + + [cdn.storageUnits.storages.swift.swift] + address = "https://xxx.yyy.zzz/v3" + username = "foo" + password = "your-password-here" + tenant = "your-tenant-here" + domain = "Default" + region = "XXX" + containerPrefix = "prod" -![CDN_GET](/images/cdn_logs_get.png?width=600px) + [[cdn.storageUnits.storages.swift.swift.encryption]] + Cipher = "aes-gcm" + Identifier = "swift-backend-id" + LocatorSalt = "XXXXXXXX" + SecretValue = "XXXXXXXXXXXXXXXX" +``` \ No newline at end of file diff --git a/docs/content/docs/concepts/files/worker_model-syntax.md b/docs/content/docs/concepts/files/worker_model-syntax.md index c903be062f..98ee6837db 100644 --- a/docs/content/docs/concepts/files/worker_model-syntax.md +++ b/docs/content/docs/concepts/files/worker_model-syntax.md @@ -8,9 +8,9 @@ card: Example: ```yml -name: go-official-1.13 +name: go-official-1.17 group: shared.infra -image: golang:1.13 +image: golang:1.17 description: official from https://hub.docker.com/_/golang/ type: docker pattern_name: basic_unix @@ -19,13 +19,13 @@ pattern_name: basic_unix Import a worker model: ```bash -cdsctl worker model import ./go-official-1.13.yml +cdsctl worker model import ./go-official-1.17.yml ``` or with a remote file: ```bash -cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/{{< param "version" "master" >}}/contrib/worker-models/go-official-1.13.yml +cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/{{< param "version" "master" >}}/contrib/worker-models/go-official-1.17.yml ``` {{< note >}} diff --git a/docs/content/hosting/ready-to-run/docker-compose/docker-compose.md b/docs/content/hosting/ready-to-run/docker-compose/docker-compose.md index db42061d2a..f3a619024e 100644 --- a/docs/content/hosting/ready-to-run/docker-compose/docker-compose.md +++ b/docs/content/hosting/ready-to-run/docker-compose/docker-compose.md @@ -36,28 +36,24 @@ $ export CDS_DOCKER_IMAGE=ovhcom/cds-engine:{{< param "version" "latest" >}} $ docker pull ovhcom/cds-engine:{{< param "version" "latest" >}} # Create PostgreSQL database, redis and elasticsearch -$ docker-compose up --no-recreate -d cds-db cds-cache elasticsearch dockerhost +$ docker-compose up -d cds-db cds-cache elasticsearch dockerhost # check if database is up, the logs must contain "LOG: database system is ready to accept connections" $ docker-compose logs| grep 'database system is ready to accept connections' # you should have this line after few seconds: cds-db_1 | LOG: database system is ready to accept connections -$ docker-compose up --no-recreate cds-db-init -$ docker-compose up --no-recreate cds-migrate +$ docker-compose up cds-db-init +$ docker-compose up cds-migrate # You should have this log: "cdstest_cds-migrate_1 exited with code 0" # prepare initial configuration. $ docker-compose up cds-prepare -# disable the smtp server -$ export CDS_EDIT_CONFIG="api.smtp.disable=true" -$ docker-compose up cds-edit-config - # run API $ docker-compose up -d cds-api # the INIT_TOKEN variable will be used by cdsctl to create first admin user -$ TOKEN_CMD=$(docker logs cdstest_cds-prepare_1|grep TOKEN) && $TOKEN_CMD +$ TOKEN_CMD=$(docker logs $(docker-compose ps -q cds-prepare) | grep INIT_TOKEN) && $TOKEN_CMD # if you have this error: "command too long: export INIT_TOKEN=....", # you can manually execute the command "export INIT_TOKEN=...." @@ -69,7 +65,7 @@ $ ./cdsctl signup --api-url http://localhost:8081 --email admin@localhost.local # enter a strong password # verify the user -$ VERIFY_CMD=$(docker-compose logs cds-api|grep 'cdsctl signup verify'|cut -d '$' -f2|xargs) && ./$VERIFY_CMD +$ VERIFY_CMD=$(docker-compose logs cds-api | grep 'cdsctl signup verify' | cut -d '$' -f2 | xargs) && ./$VERIFY_CMD # if you have this error: "such file or directory: ./cdsctl signup verify --api-url...", # you can manually execute the command "./cdsctl signup verify --api-url..." @@ -88,7 +84,7 @@ $ ./cdsctl user me $ docker-compose up -d cds-ui cds-cdn cds-hooks cds-elasticsearch cds-hatchery-swarm # create first worker model -$ ./cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/{{< param "version" "master" >}}/contrib/worker-models/go-official-1.13.yml +$ ./cdsctl worker model import https://raw.githubusercontent.com/ovh/cds/{{< param "version" "master" >}}/contrib/worker-models/go-official-1.17.yml # import Import a workflow template $ ./cdsctl template push https://raw.githubusercontent.com/ovh/cds/{{< param "version" "master" >}}/contrib/workflow-templates/demo-workflow-hello-world/demo-workflow-hello-world.yml diff --git a/docs/content/hosting/ready-to-run/docker-compose/full-example.md b/docs/content/hosting/ready-to-run/docker-compose/full-example.md index 10f3d138de..3fccf3b898 100644 --- a/docs/content/hosting/ready-to-run/docker-compose/full-example.md +++ b/docs/content/hosting/ready-to-run/docker-compose/full-example.md @@ -193,15 +193,13 @@ export HOSTNAME=$(hostname) export CDS_DOCKER_IMAGE=ovhcom/cds-engine:{{< param "version" "latest" >}} docker pull ovhcom/cds-engine:{{< param "version" "latest" >}} -docker-compose up --no-recreate -d cds-db cds-cache elasticsearch dockerhost +docker-compose up -d cds-db cds-cache elasticsearch dockerhost sleep 3 docker-compose logs| grep 'database system is ready to accept connections' -docker-compose up --no-recreate cds-db-init -docker-compose up --no-recreate cds-migrate +docker-compose up cds-db-init +docker-compose up cds-migrate sleep 3 docker-compose up cds-prepare -export CDS_EDIT_CONFIG="api.smtp.disable=true" -docker-compose up cds-edit-config export CDS_EDIT_CONFIG="vcs.servers.github.github.clientId=${CDS_GITHUB_CLIENT_ID} vcs.servers.github.github.clientSecret=${CDS_GITHUB_CLIENT_SECRET} " docker-compose up cds-edit-config export CDS_EDIT_CONFIG="api.url.api=http://localhost:8081 api.url.ui=https://${CDS_DOMAIN_NAME} hatchery.swarm.commonConfiguration.api.http.url=http://cds-api:8081" @@ -210,12 +208,12 @@ export CDS_EDIT_CONFIG="hatchery.swarm.commonConfiguration.api.http.url=https:// docker-compose up cds-edit-config docker-compose up -d cds-api sleep 3 -TOKEN_CMD=$(docker logs debian_cds-prepare_1|grep TOKEN) && $TOKEN_CMD +TOKEN_CMD=$(docker logs $(docker-compose ps -q cds-prepare) | grep INIT_TOKEN) && $TOKEN_CMD curl 'http://localhost:8081/download/cdsctl/linux/amd64?variant=nokeychain' -o cdsctl chmod +x cdsctl # this line will ask a password for admin user ./cdsctl signup --api-url http://localhost:8081 --email admin@localhost.local --username admin --fullname admin -VERIFY_CMD=$(docker-compose logs cds-api|grep 'cdsctl signup verify'|cut -d '$' -f2|xargs) && ./$VERIFY_CMD +VERIFY_CMD=$(docker-compose logs cds-api | grep 'cdsctl signup verify' | cut -d '$' -f2 | xargs) && ./$VERIFY_CMD # this line returns the RING of user, must be ADMIN ./cdsctl user me @@ -319,14 +317,14 @@ openstack security group rule list default export CDS_EDIT_CONFIG="api.auth.local.signupDisabled=true" docker-compose up cds-edit-config -# theh, restart api +# then, restart api export HOSTNAME=$(hostname) docker-compose restart cds-api ``` ### Reinstall all CDS on the same VM -``` bash +```sh # with user debian # delete all containers and volumes docker rm -f `docker ps -aq` && docker volume prune diff --git a/docs/content/hosting/upgrade/migrate_0.50.md b/docs/content/hosting/upgrade/migrate_0.50.md new file mode 100644 index 0000000000..ba8c3c18c6 --- /dev/null +++ b/docs/content/hosting/upgrade/migrate_0.50.md @@ -0,0 +1,121 @@ +--- +title: "Migrate 0.50" +weight: 1 +--- + +## Migrate an existing instance + +Before upgrading your CDS Instance: +- You have to backup your databases: cds and cdn databases. +- You have to install the version 0.49.0 if you use the 0.48 version. +- The backend cds-backend have to be removed from the cdn configuration. + +## PostgreSQL + +PostgreSQL 14 is now recommanded + +## CDN Service + +This release introduced the CDN Artifacts. This means that all artifacts upload / download will be done through the CDN service. +This is not enabled by default, you have to enable that with a feature flipping. The version 0.51 will use the CDN service to manage artifacts by default. + +### How to configure the new CDN artifact service? + +Some configuration have to be added to the cdn service to manage artifacts. + +You have to add a `storageUnits.buffers` with the type "file". +```toml + [cdn.storageUnits.buffers.local-buffer] + + # it can be 'log' to receive logs or 'file' to receive artifacts + bufferType = "file" + + [cdn.storageUnits.buffers.local-buffer.local] + path = "/var/lib/cds-engine/cdn-buffer" +``` + +To multi-instanciate the cdn service, you can use a NFS for the bufferType file, example: + +```toml + [cdn.storageUnits.buffers.buffer-nfs] + bufferType = "file" + + [cdn.storageUnits.buffers.buffer-nfs.nfs] + host = "w.x.y.z" + targetPartition = "/zpool-partition/cdn" + userID = 0 + groupID = 0 + + [[cdn.storageUnits.buffers.buffer-nfs.nfs.encryption]] + Cipher = "aes-gcm" + Identifier = "nfs-buffer-id" + ## enter a key here, 32 lenght + Key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + Sealed = false +``` + +## How to enable the CDS Artifact? + +Make sure you have configured cdn in the paragraph above, then enable it with this command: + +```sh +cat < feature.yaml +name: cdn-artifact +rule: return true +EOF +cdsctl admin feature import feature.yaml +``` + +In the next release (0.51.0), you don't need to use the feature flipping `cdn-artifact` to enable cdn artifact. + +### How to migrate existing artifacts to the new backend? + +If you want to migrate some artifacts to the new backend, you can use cdsctl: +```sh +$ cdsctl workflow artifact cdn-migrate +``` +This command will migrate artifacts for one workflow run. + +## Workflow Runs : Purge and Retention + +The default retention rule have to be added in api configuration: + +```toml + [api.workflow] + + # Default rule for workflow run retention policy, this rule can be overridden on each workflow. + # Example: 'return run_days_before < 365' keeps runs for one year. + defaultRetentionPolicy = "return run_days_before < 365" +``` +Documentation: https://ovh.github.io/cds/docs/concepts/workflow/retention/ + +## Spawning worker : MaxAttemptsNumberBeforeFailure + +A new hatchery configuration attribute is available to control the maximum attempts to start a same job. + +Example on the `hatchery.local`: + +```toml + [hatchery.local.commonConfiguration.provision] + + # Maximum attempts to start a same job. -1 to disable failing jobs when to many attempts + # maxAttemptsNumberBeforeFailure = 5 +``` + +## CDS Binaries lazy loading + +`downloadFromGitHub` and `supportedOSArch` are added. This will allow you to download cds workers / cdsctl from GitHub if it's not in already downloaded into the `directory`. + +```toml + [api.download] + + # this directory contains cds binaries. If it's empty, cds will download binaries from GitHub (property downloadFromGitHub) or from an artifactory instance (property artifactory) to it + directory = "/var/lib/cds-engine" + + # allow downloading binaries from GitHub + downloadFromGitHub = true + + # example: ["darwin/amd64","darwin/arm64","linux/amd64","windows/amd64"]. If empty, all os / arch are supported: windows,darwin,linux,freebsd,openbsd and amd64,arm,386,arm64,ppc64le + supportedOSArch = [] +``` + diff --git a/docs/static/images/cdn_logs_get.png b/docs/static/images/cdn_logs_get.png deleted file mode 100644 index cdaa57373f..0000000000 Binary files a/docs/static/images/cdn_logs_get.png and /dev/null differ diff --git a/docs/static/images/cdn_logs_receive.png b/docs/static/images/cdn_logs_receive.png deleted file mode 100644 index 0373515e6a..0000000000 Binary files a/docs/static/images/cdn_logs_receive.png and /dev/null differ diff --git a/go.mod b/go.mod index 7ab0a80cba..216b687776 100644 --- a/go.mod +++ b/go.mod @@ -136,6 +136,7 @@ require ( github.com/coreos/etcd v3.3.13+incompatible // indirect github.com/coreos/go-semver v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect github.com/docker/go-units v0.3.2 // indirect github.com/donovanhide/eventsource v0.0.0-20170630084216-b8f31a59085e // indirect github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect diff --git a/tests/Makefile b/tests/Makefile index 7229b43c72..0f6f6f67ff 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -40,13 +40,16 @@ minio_reset_bucket: " test-docker-compose: - docker-compose up --no-recreate -d cds-db cds-cache elasticsearch smtpmocksrv && \ + (cd ../tools/smtpmock/ && docker build -t smtpmock . && docker run -d -p 2023:2023 -p 2024:2024 smtpmock) && \ + docker-compose up --no-recreate -d cds-db cds-cache elasticsearch && \ sleep 5 && \ docker-compose up --no-recreate cds-db-init && \ docker-compose up --no-recreate cds-migrate && \ docker-compose up cds-prepare && \ + CDS_EDIT_CONFIG="api.smtp.disable=false api.smtp.port=2023 api.smtp.host=$(HOSTNAME) " docker-compose up cds-edit-config && \ docker-compose up -d cds-api && \ echo "waiting 8s to let cds-api start.." && sleep 8 && \ + docker ps && \ echo "downloading cdsctl from http://localhost:8081/download/cdsctl/$(UNAME_S)/amd64?variant=nokeychain -o cdsctl" && \ curl http://localhost:8081/download/cdsctl/$(UNAME_S)/amd64?variant=nokeychain -o cdsctl && \ chmod +x cdsctl && \ diff --git a/tests/test.sh b/tests/test.sh index 10cf97a441..46ed8e627d 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -122,7 +122,7 @@ initialization_tests() { smoke_tests_services() { echo "Running smoke tests services:" for f in $(ls -1 02_*.yml); do - CMD="${VENOM} run ${VENOM_OPTS} ${f} --var cdsctl=${CDSCTL}--var ui.url=${CDS_UI_URL} --var hatchery.url=${CDS_HATCHERY_URL} --var hooks.url=${CDS_HOOKS_URL}" + CMD="${VENOM} run ${VENOM_OPTS} ${f} --var cdsctl=${CDSCTL} --var ui.url=${CDS_UI_URL} --var hatchery.url=${CDS_HATCHERY_URL} --var hooks.url=${CDS_HOOKS_URL}" echo -e " ${YELLOW}${f} ${DARKGRAY}[${CMD}]${NOCOLOR}" START="$(date +%s)" ${CMD} >${f}.output 2>&1 diff --git a/tools/smtpmock/go.mod b/tools/smtpmock/go.mod index 7fe4793f1f..0b9eff087b 100644 --- a/tools/smtpmock/go.mod +++ b/tools/smtpmock/go.mod @@ -3,9 +3,9 @@ module github.com/ovh/cds/tools/smtpmock go 1.17 require ( - github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/fsamin/smtp v0.0.0-20190904085838-54a7c428d4f9 - github.com/labstack/echo v3.3.10+incompatible + github.com/golang-jwt/jwt v3.2.2+incompatible + github.com/labstack/echo/v4 v4.6.1 github.com/pkg/errors v0.8.1 github.com/satori/go.uuid v1.2.0 github.com/urfave/cli/v2 v2.1.1 @@ -14,17 +14,17 @@ require ( require ( github.com/BurntSushi/toml v0.3.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect - github.com/golang-jwt/jwt v3.2.2+incompatible // indirect - github.com/labstack/gommon v0.3.0 // indirect - github.com/mattn/go-colorable v0.1.2 // indirect - github.com/mattn/go-isatty v0.0.9 // indirect + github.com/labstack/gommon v0.3.1 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect - github.com/valyala/fasttemplate v1.0.1 // indirect - golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect - golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect - golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect - golang.org/x/text v0.3.0 // indirect + github.com/valyala/fasttemplate v1.2.1 // indirect + golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b // indirect + golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 // indirect + golang.org/x/sys v0.0.0-20211214234402-4825e8c3871d // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 // indirect gopkg.in/yaml.v2 v2.2.2 // indirect ) diff --git a/tools/smtpmock/go.sum b/tools/smtpmock/go.sum index 7d798cbcc4..fe5c44c469 100644 --- a/tools/smtpmock/go.sum +++ b/tools/smtpmock/go.sum @@ -2,23 +2,28 @@ github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fsamin/smtp v0.0.0-20190904085838-54a7c428d4f9 h1:mrsrfaVJ42WA/bOYc+TB2/EbSB0W6vEkIrCDXnm/60I= github.com/fsamin/smtp v0.0.0-20190904085838-54a7c428d4f9/go.mod h1:BzEGArrdGbhhTMh5+83jlF5fb/QHfWh0tmBn2iXTouw= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg= -github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= -github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= +github.com/labstack/echo/v4 v4.6.1 h1:OMVsrnNFzYlGSdaiYGHbgWQnr+JM7NG+B9suCPie14M= +github.com/labstack/echo/v4 v4.6.1/go.mod h1:RnjgMWNDB9g/HucVWhQYNQP9PvbYf6adqftqryo7s9k= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= +github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o= +github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -30,27 +35,49 @@ github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdh github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/urfave/cli/v2 v2.1.1 h1:Qt8FeAtxE/vfdrLmR3rxR6JRE0RoVmbXu8+6kZtYU4k= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1 h1:tY9CJiPnMXf1ERmG2EyK7gNUd+c6RKGD0IfU8WdUSz8= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM= -golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b h1:QAqMVf3pSa6eeTsuklijukjXBlj7Es2QQplab+/RbQ4= +golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210913180222-943fd674d43e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9 h1:kmreh1vGI63l2FxOAYS3Yv6ATsi7lSTuwNSVbGfJV9I= +golang.org/x/net v0.0.0-20211215060638-4ddde0e984e9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211214234402-4825e8c3871d h1:1oIt9o40TWWI9FUaveVpUvBe13FNqBNVXy3ue2fcfkw= +golang.org/x/sys v0.0.0-20211214234402-4825e8c3871d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324 h1:Hir2P/De0WpUhtrKGGjvSb2YxUgyZ7EFOSLIcSSpiwE= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/tools/smtpmock/server/api.go b/tools/smtpmock/server/api.go index be2867de2c..35756ae253 100644 --- a/tools/smtpmock/server/api.go +++ b/tools/smtpmock/server/api.go @@ -5,8 +5,8 @@ import ( "fmt" "net/http" - "github.com/labstack/echo" - "github.com/labstack/echo/middleware" + "github.com/labstack/echo/v4" + "github.com/labstack/echo/v4/middleware" "github.com/pkg/errors" "github.com/ovh/cds/tools/smtpmock"