...
 
Commits (13)
......@@ -3,10 +3,8 @@ build_image:
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2375
services:
- docker:dind
script:
- docker info
- docker login --username gitlab-ci-token --password $CI_BUILD_TOKEN $CI_REGISTRY
# Default tag to branch or tag name
......@@ -37,10 +35,10 @@ build_image:
- tags
variables:
- $CI_COMMIT_MESSAGE =~ /\[ci-release\]/
tags:
- docker
# skip artifacts and cache download for this job
dependencies: []
tags:
- docker
cache:
key: $CI_COMMIT_REF_SLUG
paths:
......
......@@ -30,6 +30,4 @@ e2e-tests-review:
when: always
expire_in: 1 week
paths:
- cypress/screenshots
tags:
- e2e
\ No newline at end of file
- cypress/screenshots
\ No newline at end of file
......@@ -29,6 +29,4 @@ e2e-tests-staging:
when: always
expire_in: 1 week
paths:
- cypress/screenshots
tags:
- e2e
\ No newline at end of file
- cypress/screenshots
\ No newline at end of file
......@@ -14,6 +14,8 @@ tag:
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
only:
- tags
tags:
- docker
# skip artifacts and cache download for this job
dependencies: []
cache: {}
......@@ -39,24 +41,26 @@ production:
}
}
module "bbk_deploy" {
source = "git::https://git.brickblock.sh/devops/tf-deploy.git"
release_name = "${CI_PROJECT_PATH_SLUG}"
namespace = "${NAMESPACE_SLUG}"
port = "${APP_PORT}"
host = "${PRODUCTION_SUBDOMAIN}.${PRODUCTION_DOMAIN}"
image_repo = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_TAG}"
db = "${HAS_DB}"
db_should_delete = "${DB_SHOULD_DELETE}"
ingress = "${HAS_INGRESS}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
project = "${CI_PROJECT_NAME}"
ref = "${CI_COMMIT_TAG}"
ganache = "${HAS_GANACHE}"
replicas = "${REPLICAS}"
path = "${INGRESS_PATH}"
basic_auth = "${BASIC_AUTH}"
module "deployment" {
source = "git::https://git.brickblock.sh/devops/infrastructure/terraform-brickblock-deploy.git?ref=v1.0.0"
app {
name = "${CI_PROJECT_NAME}"
group = "${NAMESPACE_SLUG}"
image = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_REF_SLUG}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
replicas = "${REPLICAS}"
port = "${APP_PORT}"
}
ingress {
enabled = ${HAS_INGRESS}
host = "${PRODUCTION_SUBDOMAIN}.${PRODUCTION_DOMAIN}"
path = "${INGRESS_PATH}"
}
db {
enabled = ${HAS_DB}
should_delete = ${DB_SHOULD_DELETE}
}
}
EOF
- kubectl create namespace ${NAMESPACE_SLUG} --dry-run -o yaml | kubectl apply -f -
......
......@@ -20,24 +20,26 @@ review:
}
}
module "bbk_deploy" {
source = "git::https://git.brickblock.sh/devops/tf-deploy.git"
release_name = "${CI_ENVIRONMENT_SLUG}"
namespace = "${NAMESPACE_SLUG}"
port = "${APP_PORT}"
host = "${CI_ENVIRONMENT_SLUG}.${REVIEW_DOMAIN}"
image_repo = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_REF_SLUG}"
db = "${HAS_DB}"
db_should_delete = "${DB_SHOULD_DELETE}"
ingress = "${HAS_INGRESS}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
project = "${CI_PROJECT_NAME}"
ref = "${CI_COMMIT_REF_SLUG}"
ganache = "${HAS_GANACHE}"
replicas = "${REPLICAS}"
path = "${INGRESS_PATH}"
basic_auth = "${BASIC_AUTH}"
module "deployment" {
source = "git::https://git.brickblock.sh/devops/infrastructure/terraform-brickblock-deploy.git?ref=v1.0.0"
app {
name = "${CI_PROJECT_NAME}"
group = "${NAMESPACE_SLUG}"
image = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_REF_SLUG}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
replicas = "${REPLICAS}"
port = "${APP_PORT}"
}
ingress {
enabled = ${HAS_INGRESS}
host = "${CI_ENVIRONMENT_SLUG}.${REVIEW_DOMAIN}"
path = "${INGRESS_PATH}"
}
db {
enabled = ${HAS_DB}
should_delete = ${DB_SHOULD_DELETE}
}
}
EOF
- kubectl create namespace ${NAMESPACE_SLUG} --dry-run -o yaml | kubectl apply -f -
......
......@@ -19,24 +19,26 @@ staging:
}
}
module "bbk_deploy" {
source = "git::https://git.brickblock.sh/devops/tf-deploy.git"
release_name = "${CI_PROJECT_PATH_SLUG}"
namespace = "${NAMESPACE_SLUG}"
port = "${APP_PORT}"
host = "${STAGING_SUBDOMAIN}.${STAGING_DOMAIN}"
image_repo = "${CI_REGISTRY_IMAGE}"
image_tag = "latest"
db = "${HAS_DB}"
db_should_delete = "${DB_SHOULD_DELETE}"
ingress = "${HAS_INGRESS}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
project = "${CI_PROJECT_NAME}"
ref = "${CI_COMMIT_REF_SLUG}"
ganache = "${HAS_GANACHE}"
replicas = "${REPLICAS}"
path = "${INGRESS_PATH}"
basic_auth = "${BASIC_AUTH}"
module "deployment" {
source = "git::https://git.brickblock.sh/devops/infrastructure/terraform-brickblock-deploy.git?ref=v1.0.0"
app {
name = "${CI_PROJECT_NAME}"
group = "${NAMESPACE_SLUG}"
image = "${CI_REGISTRY_IMAGE}"
image_tag = "${CI_COMMIT_REF_SLUG}"
runtime_environment = "${BBK_RUNTIME_ENVIRONMENT}"
replicas = "${REPLICAS}"
port = "${APP_PORT}"
}
ingress {
enabled = ${HAS_INGRESS}
host = "${STAGING_SUBDOMAIN}.${STAGING_DOMAIN}"
path = "${INGRESS_PATH}"
}
db {
enabled = ${HAS_DB}
should_delete = ${DB_SHOULD_DELETE}
}
}
EOF
- kubectl create namespace ${NAMESPACE_SLUG} --dry-run -o yaml | kubectl apply -f -
......
......@@ -31,13 +31,13 @@
"husky": {
"hooks": {
"commit-msg:comment": "Ensure that commit messages adhere to the conventionalcommits.org standard",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"commit-msg": "yarn commitlint -E HUSKY_GIT_PARAMS",
"post-merge:comment": "Automatically run 'yarn install' on post-merge if `yarn.lock` changed",
"post-merge": "$(pwd)/scripts/post-merge-or-rebase-githook.sh",
"post-rewrite:comment": "Automatically run 'yarn install' on post-rewrite if `yarn.lock` changed",
"post-rewrite": "$(pwd)/scripts/post-merge-or-rebase-githook.sh",
"pre-commit:comment": "Makes sure we don't commit bad code",
"pre-commit": "lint-staged",
"pre-commit": "yarn lint-staged",
"pre-push:comment": "Run healthcheck on prepush to ensure no bad code makes it to GitLab",
"pre-push": "yarn health"
}
......