From 2d60c0123b51401f781f6c553c711eb6727d6575 Mon Sep 17 00:00:00 2001 From: Fabrizio <135109076+fabrizio-grafana@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:27:29 +0100 Subject: [PATCH] Chore: Improve how we install Python (#81695) --- .drone.yml | 35 ++++++++++++----------------------- scripts/drone/steps/lib.star | 2 +- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.drone.yml b/.drone.yml index 47ff54c004d..a7112bfabae 100644 --- a/.drone.yml +++ b/.drone.yml @@ -123,8 +123,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -226,8 +225,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -539,8 +537,7 @@ steps: image: golang:1.21.6-alpine name: wire-install - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -1050,8 +1047,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -1411,8 +1407,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -1489,8 +1484,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -1549,8 +1543,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -1813,8 +1806,7 @@ steps: image: golang:1.21.6-alpine name: wire-install - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -2730,8 +2722,7 @@ steps: image: golang:1.21.6-alpine name: compile-build-cmd - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -3005,8 +2996,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -3430,8 +3420,7 @@ steps: image: alpine:3.18.5 name: identify-runner - commands: - - apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 - /usr/bin/python + - apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python - yarn install --immutable depends_on: [] image: node:20.9.0-alpine @@ -4799,6 +4788,6 @@ kind: secret name: gcr_credentials --- kind: signature -hmac: 88526f5c0dd7e3e225914c39c331b827eb7846fd83be24d9e055c0aff72a7e67 +hmac: c04928dc37abd22bc2d48c971f4f1fdfd722d38629016139fd0304e2aef60213 ... diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index e3c153e31cd..218b25e6028 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -36,7 +36,7 @@ def yarn_install_step(): "image": images["node"], "commands": [ # Python is needed to build `esfx`, which is needed by `msagl` - "apk add --no-cache --virtual .gyp python3 make g++ && ln -sf /usr/bin/python3 /usr/bin/python", + "apk add --update g++ make python3 && ln -sf /usr/bin/python3 /usr/bin/python", "yarn install --immutable", ], "depends_on": [],