Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
M1083 committed Jan 27, 2024
1 parent e636052 commit f1b466f
Show file tree
Hide file tree
Showing 38 changed files with 3,307 additions and 3,295 deletions.
106 changes: 53 additions & 53 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
// "context": "."
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080
],
"customizations": {
"vscode": {
"extensions": [
"innoverio.vscode-dbt-power-user",
"ms-python.python",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github",
"nemesv.copy-file-name"
]
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "automatic",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
},

// "runArgs": ["--env-file",".env"]

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
// "context": "."
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8080
],
"customizations": {
"vscode": {
"extensions": [
"innoverio.vscode-dbt-power-user",
"ms-python.python",
"eamodio.gitlens",
"GitHub.vscode-pull-request-github",
"nemesv.copy-file-name"
]
}
},
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "automatic",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
},

// "runArgs": ["--env-file",".env"]

// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CLICKHOUSE_USER=admin
CLICKHOUSE_USER=admin1
TF_VAR_clickhouse_password=clickhouse
80 changes: 40 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: Build and push image

on:
# pull_request:
# branches: [ main ]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/kzzzr/dbt_clickhouse_lab:ci
labels: ${{ steps.meta.outputs.labels }}
name: Build and push image

on:
# pull_request:
# branches: [ main ]
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:

build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/kzzzr/dbt_clickhouse_lab:ci
labels: ${{ steps.meta.outputs.labels }}
60 changes: 30 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: Continuous Integration Tests

on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:

ci_test:
name: Clickhouse CI
timeout-minutes: 5
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:23.3
ports:
- 9000:9000
- 8123:8123
container:
image: ghcr.io/kzzzr/dbt_clickhouse_lab:ci
steps:
- uses: actions/checkout@v3
- run: dbt --version
- run: dbt debug --target ci
- run: dbt deps --target ci
- run: dbt run-operation init_s3_sources --target ci
- run: dbt build --target ci
name: Continuous Integration Tests

on:
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:

ci_test:
name: Clickhouse CI
timeout-minutes: 5
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:23.3
ports:
- 9000:9000
- 8123:8123
container:
image: ghcr.io/kzzzr/dbt_clickhouse_lab:ci
steps:
- uses: actions/checkout@v3
- run: dbt --version
- run: dbt debug --target ci
- run: dbt deps --target ci
- run: dbt run-operation init_s3_sources --target ci
- run: dbt build --target ci
86 changes: 43 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
target/
dbt_packages/
logs/

.env

# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc

.terraform.lock.hcl

target/
dbt_packages/
logs/

.env

# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# Ignore CLI configuration files
.terraformrc
terraform.rc

.terraform.lock.hcl

.DS_Store
1 change: 1 addition & 0 deletions .user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 5cab8abc-a560-49ec-b59c-d4deb5c9905d
Loading

0 comments on commit f1b466f

Please sign in to comment.