[v8.2.x] CI: Update Dockerfile (#42529)

* Update Dockerfile

* Run apt-get update before download service clients
This commit is contained in:
Dimitris Sotirakis
2021-11-30 16:29:37 +01:00
committed by GitHub
parent 288621b68a
commit 7bcc44e44e
3 changed files with 25 additions and 1 deletions
+17 -1
View File
@@ -191,6 +191,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -207,6 +208,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -490,6 +492,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -506,6 +509,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -906,6 +910,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -922,6 +927,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -1293,6 +1299,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -1309,6 +1316,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -1830,6 +1838,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -1846,6 +1855,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -2206,6 +2216,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -2222,6 +2233,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -2739,6 +2751,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -2755,6 +2768,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -3093,6 +3107,7 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
@@ -3109,6 +3124,7 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.3
commands:
- apt-get update
- apt-get install -yq default-mysql-client
- dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
@@ -3430,6 +3446,6 @@ get:
---
kind: signature
hmac: a63230a1a54a9c53c72a38bc69c6495f5b1199b5b21324b6cb00d1fd416628a2
hmac: c27ac8c63440e97000f65b80e9fa1a19bb65a09114203ad257b41371481ff626
...
+6
View File
@@ -96,6 +96,11 @@ RUN curl -fLO https://github.com/cuelang/cue/releases/download/v${CUE_VERSION}/c
RUN echo $CUE_CHKSUM cue_${CUE_VERSION}_Linux_x86_64.tar.gz | sha256sum --check --strict --status
RUN tar xf cue_${CUE_VERSION}_Linux_x86_64.tar.gz -C /tmp cue
ARG DOCKERIZE_VERSION=0.6.1
RUN curl -fLO https://github.com/jwilder/dockerize/releases/download/v${DOCKERIZE_VERSION}/dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz
RUN tar -xzvf dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz -C /tmp/
RUN rm dockerize-linux-amd64-v${DOCKERIZE_VERSION}.tar.gz
# Base image to crossbuild grafana.
# Use old Debian (this has support into 2022) in order to ensure binary compatibility with older glibc's.
FROM debian:stretch-20210208
@@ -113,6 +118,7 @@ COPY --from=toolchain /tmp/x86_64-centos6-linux-gnu.tar.xz /tmp/osxcross.tar.xz
COPY --from=toolchain /tmp/golangci-lint /usr/local/bin/
COPY --from=toolchain /tmp/shellcheck /usr/local/bin/
COPY --from=toolchain /tmp/cue /usr/local/bin/
COPY --from=toolchain /tmp/dockerize /usr/local/bin/
RUN apt-get update && \
apt-get install -yq \
+2
View File
@@ -686,6 +686,7 @@ def postgres_integration_tests_step():
'POSTGRES_HOST': 'postgres',
},
'commands': [
'apt-get update',
'apt-get install -yq postgresql-client',
'dockerize -wait tcp://postgres:5432 -timeout 120s',
'psql -p 5432 -h postgres -U grafanatest -d grafanatest -f ' +
@@ -709,6 +710,7 @@ def mysql_integration_tests_step():
'MYSQL_HOST': 'mysql',
},
'commands': [
'apt-get update',
'apt-get install -yq default-mysql-client',
'dockerize -wait tcp://mysql:3306 -timeout 120s',
'cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass',