[v8.2.x] CI: Update Dockerfile (#42529)
* Update Dockerfile * Run apt-get update before download service clients
This commit is contained in:
+17
-1
@@ -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
|
||||
|
||||
...
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user