As per CircleCI Server 3.x and 4.x documentation, CircleCI Server uses Velero (and Restic) to manage backups.
CircleCI Server admins install Velero and Restic via the command:
# --use-restic will install Restic
version: 2.1 | |
commands: | |
# Requires: | |
# - CircleCI API token (via $CIRCLE_TOKEN env var) | |
# - curl & jq (assumes the executor will have curl and jq pre-installed) | |
validate-approval: | |
description: "Validate whether deployment was properly approved." | |
steps: | |
- run: | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
printf("Process is aborting\n"); | |
abort(); | |
printf("Control not reaching here\n"); | |
return 0; | |
} |
# Set your Docker registry mirror via the DOCKERHUB_REGISTRY_MIRROR env var. | |
$registryMirror = echo $Env:DOCKERHUB_REGISTRY_MIRROR | |
if (-Not $registryMirror) { | |
Write-Host "No registry mirror set. Exiting early." | |
exit | |
} | |
# Check if Docker service is running | |
$dockerService = Get-Service -Name Docker -ErrorAction SilentlyContinue |
# NOTE: This script requires: | |
# - curl | |
# - jq | |
# - your CircleCI API token (to be set via the $CIRCLE_TOKEN environment variable) | |
# Usage: sh ./calculate.sh <workflow ID> | |
get_job_numbers_in_workflow () { | |
echo "For Workflow ID ${1}:" | |
curl -s -H "Circle-Token: $CIRCLE_TOKEN" \ |
apiVersion: troubleshoot.sh/v1beta2 | |
kind: Preflight | |
metadata: | |
name: circleci-server | |
spec: | |
analyzers: | |
- clusterVersion: | |
outcomes: | |
- fail: | |
when: "< 1.22.0" |
This output of the Telegraf custom config is from a Server 4.x setup where my telegraf.config.custom_config_file
is set to empty string.
# parse and save Telegraf config as TOML
$ kubectl -n circleci get cm/telegraf-custom-config -o=yaml | yq '.data."telegraf_custom.conf"' > default.toml
# run through a TOML linter
$ docker run -i ghcr.io/pelletier/go-toml:v2 tomll < default.toml
[agent]
Finding diff in circleci/path-filtering Orb source code
# steps
$ circleci orb source circleci/[email protected] > path-filter-013.yaml
$ circleci orb source circleci/[email protected] > path-filter-014.yaml
$ git diff --no-index path-filter-013.yaml path-filter-014.yaml
This shows the decision tree on which solutions is possible, for customers facing the known limitation of IP ranges not working with Remote Docker on CircleCI.
This document assumes you want to
flowchart TD
job[Your Job using Remote Docker & IP Ranges] --> only_docker{Is job only about building and/or pushing Docker images?}
only_docker -- "NO (e.g., run E2E tests with built images)" --> ip_ranges_needed_when_docker{Is IP ranges required when building and pushing the Docker image?}
import os | |
from time import sleep | |
import requests | |
from typing import Any | |
class CircleCI: | |
def __init__(self, token: str, project_username: str, project_reponame: str): | |
self._token = token | |
self._project = f'{project_username}/{project_reponame}' |