Skip to content

Commit

Permalink
QD-4594 Fix base images builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Mar 4, 2024
1 parent b46396d commit 887a5b2
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 167 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- '**/base/*.Dockerfile'
- '**/base/*.hcl'
pull_request:
paths:
- '**/base/*.hcl'
schedule:
- cron: '0 0 * * 1'

Expand All @@ -15,9 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ next, 2024.1, 2023.3, 2023.2 ]
version: [ "next", "2024.1", "2023.3", "2023.2" ]
group: [ "default", "more" ]
runs-on: ubuntu-latest
steps:
- name: Clean up
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
Expand All @@ -34,3 +44,7 @@ jobs:
with:
push: ${{ github.ref == 'refs/heads/main' }}
workdir: ${{ matrix.version }}/base
targets: ${{ matrix.group }}
set: |
*.cache-from=type=gha,scope=provenance
*.cache-to=type=gha,scope=provenance,mode=max
82 changes: 9 additions & 73 deletions 2023.2/base/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
group "all" {
targets = ["debian", "debian-js", "python", "python-js", "dotnet", "go", "js", "php", "rust", "ruby", "cpp", "cdnet"]
}

group "default" {
targets = ["debian", "debian-js", "python", "python-js", "dotnet", "go", "js", "php"]
targets = ["debian", "debian-js", "python", "python-js"]
}

group "more" {
targets = ["dotnet", "go", "js", "php"]
}

variable "NODE_TAG" {
Expand All @@ -20,12 +28,6 @@ target "debian" {
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian",
]
cache-to = [
"type=local,dest=docker_cache/debian,mode=max",
]
}

target "debian-js" {
Expand All @@ -40,12 +42,6 @@ target "debian-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian_js",
]
cache-to = [
"type=local,dest=docker_cache/debian_js,mode=max",
]
}

target "python" {
Expand All @@ -57,12 +53,6 @@ target "python" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python",
]
cache-to = [
"type=local,dest=docker_cache/python,mode=max",
]
}

target "python-js" {
Expand All @@ -77,12 +67,6 @@ target "python-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python_js",
]
cache-to = [
"type=local,dest=docker_cache/python_js,mode=max",
]
}

target "dotnet" {
Expand All @@ -95,12 +79,6 @@ target "dotnet" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "dotnet.Dockerfile"
cache-from = [
"type=local,src=docker_cache/dotnet",
]
cache-to = [
"type=local,dest=docker_cache/dotnet,mode=max",
]
}

target "go" {
Expand All @@ -113,12 +91,6 @@ target "go" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "go.Dockerfile"
cache-from = [
"type=local,src=docker_cache/go",
]
cache-to = [
"type=local,dest=docker_cache/go,mode=max",
]
}

target "js" {
Expand All @@ -130,12 +102,6 @@ target "js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/js",
]
cache-to = [
"type=local,dest=docker_cache/js,mode=max",
]
}

target "php" {
Expand All @@ -149,12 +115,6 @@ target "php" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "php.Dockerfile"
cache-from = [
"type=local,src=docker_cache/php",
]
cache-to = [
"type=local,dest=docker_cache/php,mode=max",
]
}

target "rust" {
Expand All @@ -167,12 +127,6 @@ target "rust" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "rust.Dockerfile"
cache-from = [
"type=local,src=docker_cache/rust",
]
cache-to = [
"type=local,dest=docker_cache/rust,mode=max",
]
}

target "ruby" {
Expand All @@ -185,12 +139,6 @@ target "ruby" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "ruby.Dockerfile"
cache-from = [
"type=local,src=docker_cache/ruby",
]
cache-to = [
"type=local,dest=docker_cache/ruby,mode=max",
]
}

target "cpp" {
Expand All @@ -202,12 +150,6 @@ target "cpp" {
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "cpp.Dockerfile"
cache-from = [
"type=local,src=docker_cache/cpp",
]
cache-to = [
"type=local,dest=docker_cache/cpp,mode=max",
]
}

target "cdnet" {
Expand All @@ -219,10 +161,4 @@ target "cdnet" {
}
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "dotnet.community.Dockerfile"
cache-from = [
"type=local,src=docker_cache/cdnet",
]
cache-to = [
"type=local,dest=docker_cache/cdnet,mode=max",
]
}
40 changes: 9 additions & 31 deletions 2023.3/base/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
group "default" {
group "all" {
targets = ["debian", "debian-js", "python", "python-js", "other"]
}

group "default" {
targets = ["debian", "debian-js", "python", "python-js"]
}

group "more" {
targets = ["other"]
}

target "debian" {
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:debian-base-233"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian",
]
cache-to = [
"type=local,dest=docker_cache/debian,mode=max",
]
}

target "debian-js" {
Expand All @@ -25,12 +27,6 @@ target "debian-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian_js",
]
cache-to = [
"type=local,dest=docker_cache/debian_js,mode=max",
]
}

target "python" {
Expand All @@ -42,12 +38,6 @@ target "python" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python",
]
cache-to = [
"type=local,dest=docker_cache/python,mode=max",
]
}

target "python-js" {
Expand All @@ -59,12 +49,6 @@ target "python-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python_js",
]
cache-to = [
"type=local,dest=docker_cache/python_js,mode=max",
]
}

target "other" {
Expand All @@ -77,10 +61,4 @@ target "other" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "${edition}.Dockerfile"
cache-from = [
"type=local,src=docker_cache/other",
]
cache-to = [
"type=local,dest=docker_cache/other,mode=max",
]
}
40 changes: 9 additions & 31 deletions 2024.1/base/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
group "default" {
group "all" {
targets = ["debian", "debian-js", "python", "python-js", "other"]
}

group "default" {
targets = ["debian", "debian-js", "python", "python-js"]
}

group "more" {
targets = ["other"]
}

target "debian" {
tags = [
"registry.jetbrains.team/p/sa/containers/qodana:debian-base-241"
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian",
]
cache-to = [
"type=local,dest=docker_cache/debian,mode=max",
]
}

target "debian-js" {
Expand All @@ -25,12 +27,6 @@ target "debian-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "debian.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/debian_js",
]
cache-to = [
"type=local,dest=docker_cache/debian_js,mode=max",
]
}

target "python" {
Expand All @@ -42,12 +38,6 @@ target "python" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python",
]
cache-to = [
"type=local,dest=docker_cache/python,mode=max",
]
}

target "python-js" {
Expand All @@ -59,12 +49,6 @@ target "python-js" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "python.js.Dockerfile"
cache-from = [
"type=local,src=docker_cache/python_js",
]
cache-to = [
"type=local,dest=docker_cache/python_js,mode=max",
]
}

target "other" {
Expand All @@ -77,10 +61,4 @@ target "other" {
]
platforms = ["linux/amd64", "linux/arm64"]
dockerfile = "${edition}.Dockerfile"
cache-from = [
"type=local,src=docker_cache/other",
]
cache-to = [
"type=local,dest=docker_cache/other,mode=max",
]
}
Loading

0 comments on commit 887a5b2

Please sign in to comment.