Sign inSign up

betomorrow/ci-python

By betomorrow

Updated about 2 months ago

Convenience image for CI/CD pipelines on Gitlab

Buildkit cache
Image
0

10K+

betomorrow/ci-python repository overview

ci-python

Latest tags

  • 3.11_v12
  • 3.13_v6
  • 3.14_v6

Included utilities and available environment variables

Shell

  • Bash
  • Curl
  • OpenSSH
  • jq
  • zip
  • git
  • python3
  • AWS CLI
  • Google Cloud CLI

SSH

Note: ssh client is preconfigured with gitlab.com and github.com ssh host keys. (See here)

VariableDescription
CIBTO_SSH_KEY_[...]Variables with that prefix will be dumped to disk and a new variable CIBTO_SSH_KEY_[...]_PATH will be created containing path to that file. Also the key is automatically added to ssh-agent.
CIBTO_SSH_KNOWN_HOST_[...]Variables with that prefix will be dumped to sshd known hosts.

Git

VariableDescription
CIBTO_GIT_USER_EMAILSet git global user email
CIBTO_GIT_USER_NAMESet git global user name
CommandDescription
git-set-key <key_path>Configure git to use ssh with provided key and disable StrictHostKeyChecking

Amazon Web Service CLI

Note: If no AWS_DEFAULT_REGION is provided, this image will default it to eu-west-1.

VariableDescription
CIBTO_AWS_ECR_AUTO_LOGINEnable automatic login against ECR (default: 0)
CIBTO_AWS_S3_ENDPOINTSet S3 endpoint to use (like https://cellar-c2.services.clever-cloud.com)
CommandDescription
aws-ecr-login <region>Login against ECR in provided region
OIDC Token authentification

If a variable named CIBTO_AWS_OIDC_TOKEN is provided (ie. GitlabCI's id_tokens), the content is automaticaly used as AWS_WEB_IDENTITY_TOKEN_FILE to authenticate the AWS CLI.

Azure CLI

VariableDescription
CIBTO_AZURE_RM_SUBSCRIPTION_IDSet azure subscription id
CIBTO_AZURE_RM_TENANT_IDSet azure subscription tenant id
CIBTO_AZURE_RM_CLIENT_IDSet service principal app id
CIBTO_AZURE_RM_CLIENT_SECRETSet service principal secret

Google Cloud CLI

VariableDescription
CIBTO_GCLOUD_AR_AUTO_LOGINEnable automatic login against Artifact Registry (default: 0)

Previews

| Command | Description | | :------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | push_web_preview <src_path\ | docker_tag> <app_name> | Deploy a web preview. To deploy a static website (SSG) provide directory need files (typically where the index.html is). To handle errors in SPAs clone your index.html as _errors.html before pushing the preview. For deploying a docker image provide the tag of the image to be deployed, note that docker image MUST serve traffic on port 8080 for this to work. app_name is an arbitrary field to provide hints (backend/frontend, storybook, etc.) | | push_mobile_preview <filename> <filepath> <app_name> | Deploy a mobile app preview. filename is an arbitrary name for the file when downloaded by someone. filepath is the system path to the built application. app_name is an arbitrary field to provide hints (ie. android/ios) |

VariableDescription
CIBTO_PREVIEWS_SERVER_URLPreview server URL (ie. https://branches.domain.tld).
CIBTO_PREVIEWS_TOKENPreview server JWT token for authentication. In GitLab, use an OIDC ID Token variable with this name.
CIBTO_PREVIEWS_SLACK_HOOK_URL(Optional) Slack hook url to push notifications to.

Dependency Track

VariableDescription
CIBTO_DTRACK_HOSTSet Dependency Track Host
CIBTO_DTRACK_API_KEYSet Dependency Track API Key
CommandDescription
dtrack-upload -g <GROUP_NAME> -p <PROJECT_NAME> -b <BOM.json>Upload Bom file to Dependency Track

Debugging

VariableDescription
CIBTO_DEBUGCan be set to any value to enable some debugging information in scripts or commands provided by this image

Tag summary

Content type

Image

Digest

sha256:943d043c6

Size

924.3 MB

Last updated

about 2 months ago

docker pull betomorrow/ci-python:3.14_v6