-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.cirrus.yml
54 lines (49 loc) · 2.11 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
env:
ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url]
ARTIFACTORY_DEPLOY_REPO: sonarsource-pypi-public-qa
ARTIFACTORY_PRIVATE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-private-reader access_token]
ARTIFACTORY_DEPLOY_USERNAME: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer username]
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
DEPLOY_PULL_REQUEST: 'true'
POETRY_VIRTUALENVS_PATH: ".cache/poetry/venvs"
POETRY_CACHE_DIR: ".cache/poetry/pypoetry"
container_definition: &CONTAINER_DEFINITION
dockerfile: .cirrus/poetry.Dockerfile
cluster_name: ${CIRRUS_CLUSTER_NAME}
region: eu-central-1
namespace: default
builder_role: cirrus-builder
builder_image: docker-builder-v*
builder_instance_type: t3.small
use_in_memory_disk: true
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
cpu: 1
memory: 1G
poetry_cache_template: &POETRY_CACHE
poetry_cache:
folder: .cache/poetry/
fingerprint_script: cat poetry.lock
.poetry_template: &POETRY_TEMPLATE
eks_container:
<<: *CONTAINER_DEFINITION
<<: *POETRY_CACHE
poetry_install_script:
- source set_poetry_build_version "$CI_BUILD_NUMBER"
- echo "PROJECT_VERSION=$PROJECT_VERSION" >> $CIRRUS_ENV
- jfrog config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_PRIVATE_ACCESS_TOKEN"
- jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
- jfrog poetry install --build-name="$CIRRUS_REPO_NAME" --build-number="$CI_BUILD_NUMBER"
build_task:
<<: *POETRY_TEMPLATE
alias: build
name: "Build"
build_script: regular_poetry_build_publish
promote_task:
depends_on:
- build
env:
ARTIFACTORY_PROMOTE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promoter access_token]
GITHUB_TOKEN: VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promotion token]
<<: *POETRY_TEMPLATE
promote_script: cirrus_promote