Skip to content

Commit

Permalink
build: replace mirrored images from docker hub (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovsds authored May 31, 2024
1 parent d37ea00 commit d3d0ed4
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 49 deletions.
61 changes: 25 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,15 @@ jobs:
split-pytest-tasks base,fat,ext_public /src /tmp/dl_test_targets.json true true >> "$GITHUB_OUTPUT"
run_tests_base:
runs-on: [ self-hosted, linux, light ]
name: "🐍[pytest]${{ matrix.value }}"
timeout-minutes: 60
needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_base != '[]' }}
runs-on: [ self-hosted, linux, light ]
permissions:
packages: write
contents: read

needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_base != '[]' }}

container:
image: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/datalens_ci_with_code:${{ github.sha }}"
options: -v /var/run/docker.sock:/var/run/docker.sock
Expand All @@ -299,10 +300,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock

timeout-minutes: 60
strategy:
fail-fast: false
matrix:
value: ${{fromJson(needs.pytest_split.outputs.split_base)}}

steps:
- run: echo "Going to run tests for ${{ matrix.value }}"
- run: mkdir /report
Expand Down Expand Up @@ -332,14 +336,15 @@ jobs:
retention-days: 1

run_tests_fat:
runs-on: [ self-hosted, linux, fat ]
name: "🐍[pytest][fat]${{ matrix.value }}"
timeout-minutes: 60
needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_fat != '[]' }}
runs-on: [ self-hosted, linux, fat ]
permissions:
packages: write
contents: read

needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_fat != '[]' }}

container:
image: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/datalens_ci_with_code:${{ github.sha }}"
options: -v /var/run/docker.sock:/var/run/docker.sock
Expand All @@ -348,10 +353,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock

timeout-minutes: 60
strategy:
fail-fast: false
matrix:
value: ${{fromJson(needs.pytest_split.outputs.split_fat)}}

steps:
- run: echo "Going to run tests for ${{ matrix.value }}"
- run: mkdir /report
Expand Down Expand Up @@ -381,15 +389,16 @@ jobs:
retention-days: 1

run_tests_ext_public:
name: "🐍[pytest][ext_public]${{ matrix.value }}"
# using light runners for now, TBD: change when we have ext_public
runs-on: [ self-hosted, linux, light ]
name: "🐍[pytest][ext_public]${{ matrix.value }}"
timeout-minutes: 60
needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_ext_public != '[]' }}
permissions:
packages: write
packages: read
contents: read

needs: pytest_split
if: ${{ needs.pytest_split.outputs.split_ext_public != '[]' }}

container:
image: "ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/datalens_ci_with_code:${{ github.sha }}"
options: -v /var/run/docker.sock:/var/run/docker.sock
Expand All @@ -398,10 +407,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock

timeout-minutes: 60
strategy:
fail-fast: false
matrix:
value: ${{fromJson(needs.pytest_split.outputs.split_ext_public)}}

steps:
- run: echo "Going to run tests for ${{ matrix.value }}"
- run: mkdir /report
Expand Down Expand Up @@ -491,29 +503,6 @@ jobs:
echo "All tests passed"
publish-result:
runs-on: [ self-hosted, linux, light ]
needs: [ "run_tests_base", "run_tests_fat", "run_tests_ext_public" ]
if: ${{ !cancelled() && github.event.inputs.run_mypy_only != 'true' && ( needs.run_tests_base.result != 'skipped' || needs.run_tests_fat.result != 'skipped' || needs.run_tests_ext_public.result != 'skipped' )}}
permissions:
contents: read
issues: read
checks: write
pull-requests: write
container: docker:latest
steps:
- uses: actions/download-artifact@v3
with:
path: ./report/
- run: ls -lah ./report
- name: Publish Test Results
uses: datalens-tech/publish-unit-test-result-action@55478522536e0c60b0a4ff0c2bb8ab110d7a0f33
with:
files: |
./report/**/*.xml
event_name: ${{ github.event.workflow_run.event }}
report_individual_runs: "true"

codestyle_all:
runs-on: [ self-hosted, linux, light ]
needs: gh_build_image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM postgres:13-alpine
FROM postgres:13-alpine@sha256:b9f66c57932510574fb17bccd175776535cec9abcfe7ba306315af2f0b7bfbb4
# FROM postgres:13-alpine3.20
FROM ghcr.io/datalens-tech/docker-mirror/postgres:13-alpine3.20

COPY db-postgres/data /common-data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# FROM yandex/clickhouse-server:21.8
# https://github.com/ClickHouse/ClickHouse/blob/master/utils/list-versions/version_date.tsv
# v21.8.7.22-lts @ 2021-09-22
# FROM yandex/clickhouse-server:21.8.7.22
FROM yandex/clickhouse-server:21.8.7.22
FROM ghcr.io/datalens-tech/docker-mirror/yandex/clickhouse-server:21.8.7.22

COPY db-clickhouse/users.xml /etc/clickhouse-server/users.xml

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM postgres:13-alpine
FROM postgres:13-alpine@sha256:b9f66c57932510574fb17bccd175776535cec9abcfe7ba306315af2f0b7bfbb4
# FROM postgres:13-alpine3.20
FROM ghcr.io/datalens-tech/docker-mirror/postgres:13-alpine3.20

COPY db-postgres/data /common-data

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM postgres:13-alpine
FROM postgres:13-alpine@sha256:b9f66c57932510574fb17bccd175776535cec9abcfe7ba306315af2f0b7bfbb4
# FROM postgres:13-alpine3.20
FROM ghcr.io/datalens-tech/docker-mirror/postgres:13-alpine3.20

COPY db-postgres/data /common-data

Expand Down
3 changes: 2 additions & 1 deletion lib/dl_sqlalchemy_postgres/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: '3.7'

services:
db-postgres:
image: "postgres:13-alpine@sha256:b9f66c57932510574fb17bccd175776535cec9abcfe7ba306315af2f0b7bfbb4"
# image: "postgres:13-alpine3.20"
image: "ghcr.io/datalens-tech/docker-mirror/postgres:13-alpine3.20"
environment:
- POSTGRES_DB=test_data
- POSTGRES_USER=datalens
Expand Down
4 changes: 2 additions & 2 deletions lib/testenv-common/images/Dockerfile.pg-us
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM postgres:13-alpine
FROM postgres:13-alpine@sha256:b9f66c57932510574fb17bccd175776535cec9abcfe7ba306315af2f0b7bfbb4
# FROM postgres:13-alpine3.20
FROM ghcr.io/datalens-tech/docker-mirror/postgres:13-alpine3.20

COPY pg-us/docker-entrypoint-initdb.d/extensions.sql /docker-entrypoint-initdb.d/extensions.sql

Expand Down

0 comments on commit d3d0ed4

Please sign in to comment.