mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
CI: Remove drone steps for building windows because it's done in grafana-… (#95373)
Remove drone steps for building windows because it's done in grafana-build now
This commit is contained in:
parent
5e3e7cca0e
commit
67b3848fd9
@ -27,10 +27,6 @@ load(
|
||||
"rgm",
|
||||
)
|
||||
load("scripts/drone/vault.star", "secrets")
|
||||
load(
|
||||
"scripts/drone/windows.star",
|
||||
"windows_manual_pipeline",
|
||||
)
|
||||
|
||||
def main(_ctx):
|
||||
return (
|
||||
@ -44,6 +40,5 @@ def main(_ctx):
|
||||
rgm() +
|
||||
integration_test_pipelines() +
|
||||
cronjobs() +
|
||||
[windows_manual_pipeline()] +
|
||||
secrets()
|
||||
)
|
||||
|
161
.drone.yml
161
.drone.yml
@ -4338,89 +4338,6 @@ image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: prerelease-windows-msi
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- curl -L0 https://nssm.cc/release/nssm-2.24.zip -o nssm-2.24.zip
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: downlad-nssm
|
||||
- commands:
|
||||
- mkdir wix3 && cd wix3
|
||||
- curl -L0 https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip
|
||||
-o wix3.zip
|
||||
- unzip wix3.zip
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: download-wix3
|
||||
- commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- bash -c 'gcloud storage cp gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release/grafana-$${DRONE_TAG:1}.windows-amd64.zip
|
||||
grafana.zip'
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_key_base64
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: download-zip
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.1.1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
- commands:
|
||||
- export WINEPATH=$(winepath ./wix3)
|
||||
- ./bin/grabpl windows-installer --target grafana.zip --edition oss
|
||||
depends_on:
|
||||
- downlad-nssm
|
||||
- download-wix3
|
||||
- grabpl
|
||||
- download-zip
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
image: scottyhardy/docker-wine:stable-9.0
|
||||
name: build-msi
|
||||
- commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- bash -c 'gcloud storage cp *.msi gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release'
|
||||
- bash -c 'gcloud storage cp *.msi.sha256 gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release'
|
||||
depends_on:
|
||||
- build-msi
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_key_base64
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: upload-msi-installer
|
||||
trigger:
|
||||
event:
|
||||
exclude:
|
||||
- promote
|
||||
ref:
|
||||
exclude:
|
||||
- refs/tags/*-cloud*
|
||||
include:
|
||||
- refs/tags/v*
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on:
|
||||
- prerelease-windows-msi
|
||||
- rgm-tag-prerelease
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: rgm-tag-verify-prerelease-assets
|
||||
node:
|
||||
type: no-parallel
|
||||
@ -5662,82 +5579,6 @@ volumes:
|
||||
- name: config
|
||||
temp: {}
|
||||
---
|
||||
clone:
|
||||
retries: 3
|
||||
depends_on: []
|
||||
image_pull_secrets:
|
||||
- gcr
|
||||
- gar
|
||||
kind: pipeline
|
||||
name: windows-pipeline-manual
|
||||
node:
|
||||
type: no-parallel
|
||||
platform:
|
||||
arch: amd64
|
||||
os: linux
|
||||
services: []
|
||||
steps:
|
||||
- commands:
|
||||
- curl -L0 https://nssm.cc/release/nssm-2.24.zip -o nssm-2.24.zip
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: downlad-nssm
|
||||
- commands:
|
||||
- mkdir wix3 && cd wix3
|
||||
- curl -L0 https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip
|
||||
-o wix3.zip
|
||||
- unzip wix3.zip
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: download-wix3
|
||||
- commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- bash -c 'gcloud storage cp gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release/grafana-$${DRONE_TAG:1}.windows-amd64.zip
|
||||
grafana.zip'
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_key_base64
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: download-zip
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.1.1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
- commands:
|
||||
- export WINEPATH=$(winepath ./wix3)
|
||||
- ./bin/grabpl windows-installer --target grafana.zip --edition oss
|
||||
depends_on:
|
||||
- downlad-nssm
|
||||
- download-wix3
|
||||
- grabpl
|
||||
- download-zip
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
image: scottyhardy/docker-wine:stable-9.0
|
||||
name: build-msi
|
||||
- commands:
|
||||
- printenv GCP_KEY | base64 -d > /tmp/key.json
|
||||
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
||||
- bash -c 'gcloud storage cp *.msi gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release'
|
||||
- bash -c 'gcloud storage cp *.msi.sha256 gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release'
|
||||
depends_on:
|
||||
- build-msi
|
||||
environment:
|
||||
GCP_KEY:
|
||||
from_secret: gcp_key_base64
|
||||
image: google/cloud-sdk:431.0.0
|
||||
name: upload-msi-installer
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target: build-msi
|
||||
type: docker
|
||||
volumes:
|
||||
- host:
|
||||
path: /var/run/docker.sock
|
||||
name: docker
|
||||
---
|
||||
get:
|
||||
name: credentials.json
|
||||
path: infra/data/ci/grafana-release-eng/grafanauploads
|
||||
@ -5937,6 +5778,6 @@ kind: secret
|
||||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 54085f152d1aeb8bd67a69de6a253a75f7c1d2c2a842f9a467ce4a75e218aa84
|
||||
hmac: f49fe1151910b4a42835e0779c676649e2e7ec76ca50fdf522ffea72e60638cc
|
||||
|
||||
...
|
||||
|
@ -310,7 +310,6 @@ def verify_release_pipeline(
|
||||
trigger = {},
|
||||
depends_on = [
|
||||
"release-build-e2e-publish",
|
||||
"release-windows",
|
||||
]):
|
||||
"""
|
||||
Runs a script that 'gsutil stat's every artifact that should have been produced by the pre-release process.
|
||||
|
@ -45,10 +45,6 @@ load(
|
||||
"rgm_github_token",
|
||||
"rgm_storybook_destination",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/windows.star",
|
||||
"windows_pipeline_release",
|
||||
)
|
||||
|
||||
docs_paths = {
|
||||
"exclude": [
|
||||
@ -289,20 +285,14 @@ def rgm_nightly_pipeline():
|
||||
def rgm_tag_pipeline():
|
||||
build = rgm_tag()
|
||||
|
||||
# the Windows step requires an uploaded .zip file to base its compilation on
|
||||
windows = windows_pipeline_release(trigger = tag_trigger, depends_on = [
|
||||
build["name"],
|
||||
])
|
||||
return [
|
||||
build,
|
||||
whats_new_checker_pipeline(tag_trigger),
|
||||
windows,
|
||||
verify_release_pipeline(
|
||||
trigger = tag_trigger,
|
||||
name = "rgm-tag-verify-prerelease-assets",
|
||||
bucket = "grafana-prerelease",
|
||||
depends_on = [
|
||||
windows["name"],
|
||||
build["name"],
|
||||
],
|
||||
),
|
||||
|
@ -1,149 +0,0 @@
|
||||
"""
|
||||
This module is a library of Drone steps that exclusively run on windows machines.
|
||||
"""
|
||||
|
||||
load(
|
||||
"scripts/drone/steps/lib.star",
|
||||
"download_grabpl_step",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/utils/images.star",
|
||||
"images",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/utils/utils.star",
|
||||
"pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/vault.star",
|
||||
"from_secret",
|
||||
"rgm_gcp_key_base64",
|
||||
)
|
||||
|
||||
def download_nssm_step():
|
||||
return {
|
||||
"name": "downlad-nssm",
|
||||
"image": images["curl"],
|
||||
"commands": [
|
||||
# We don't need to extract nssm-2.24 because the wix / build process extracts it. It just needs to be in
|
||||
# PWD and be named `nssm-2.24`.
|
||||
"curl -L0 https://nssm.cc/release/nssm-2.24.zip -o nssm-2.24.zip",
|
||||
],
|
||||
}
|
||||
|
||||
def download_wix_step():
|
||||
return {
|
||||
"name": "download-wix3",
|
||||
"image": images["curl"],
|
||||
"commands": [
|
||||
"mkdir wix3 && cd wix3",
|
||||
"curl -L0 https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip -o wix3.zip",
|
||||
"unzip wix3.zip",
|
||||
],
|
||||
}
|
||||
|
||||
def download_zip_step(target = ""):
|
||||
path = "{}/grafana-$${{DRONE_TAG:1}}.windows-amd64.zip".format(target)
|
||||
return {
|
||||
"name": "download-zip",
|
||||
"image": images["cloudsdk"],
|
||||
"commands": [
|
||||
"printenv GCP_KEY | base64 -d > /tmp/key.json",
|
||||
"gcloud auth activate-service-account --key-file=/tmp/key.json",
|
||||
"bash -c 'gcloud storage cp {} grafana.zip'".format(path),
|
||||
],
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret(rgm_gcp_key_base64),
|
||||
},
|
||||
}
|
||||
|
||||
def windows_msi_pipeline(target = "", name = "", trigger = {}, depends_on = [], environment = {}):
|
||||
"""windows_msi_pipeline is a pipeline which creates an MSI from a .zip file.
|
||||
|
||||
Args:
|
||||
target: GCS path (with gs:// scheme) to the oflder containing the zip file
|
||||
name: Name of the pipeline, should be unique.
|
||||
trigger: The conditions which trigger the pipeline
|
||||
depends_on: dependencies (strings)
|
||||
environment: map of environment variables
|
||||
Returns:
|
||||
Drone step.
|
||||
"""
|
||||
nssm = download_nssm_step()
|
||||
wix = download_wix_step()
|
||||
grabpl = download_grabpl_step()
|
||||
zip = download_zip_step(target = target)
|
||||
build = build_msi_step(
|
||||
depends_on = [
|
||||
nssm["name"],
|
||||
wix["name"],
|
||||
grabpl["name"],
|
||||
zip["name"],
|
||||
],
|
||||
)
|
||||
upload = upload_msi_step(
|
||||
depends_on = [
|
||||
build["name"],
|
||||
],
|
||||
target = target,
|
||||
)
|
||||
|
||||
return pipeline(
|
||||
name = name,
|
||||
steps = [
|
||||
nssm,
|
||||
wix,
|
||||
zip,
|
||||
grabpl,
|
||||
build,
|
||||
upload,
|
||||
],
|
||||
trigger = trigger,
|
||||
depends_on = depends_on,
|
||||
environment = environment,
|
||||
)
|
||||
|
||||
def windows_pipeline_release(name = "prerelease-windows-msi", depends_on = [], trigger = {}, environment = {}):
|
||||
target = "gs://grafana-prerelease/artifacts/downloads/$${DRONE_TAG}/oss/release"
|
||||
return windows_msi_pipeline(name = name, target = target, depends_on = depends_on, trigger = trigger, environment = environment)
|
||||
|
||||
def windows_pipeline_main(depends_on = [], trigger = {}, environment = {}):
|
||||
target = "gs://grafana-downloads/oss/main"
|
||||
return windows_msi_pipeline(name = "main-windows-msi", target = target, depends_on = depends_on, trigger = trigger, environment = environment)
|
||||
|
||||
def upload_msi_step(depends_on = [], target = ""):
|
||||
return {
|
||||
"name": "upload-msi-installer",
|
||||
"image": images["cloudsdk"],
|
||||
"commands": [
|
||||
"printenv GCP_KEY | base64 -d > /tmp/key.json",
|
||||
"gcloud auth activate-service-account --key-file=/tmp/key.json",
|
||||
"bash -c 'gcloud storage cp *.msi {}'".format(target),
|
||||
"bash -c 'gcloud storage cp *.msi.sha256 {}'".format(target),
|
||||
],
|
||||
"depends_on": depends_on,
|
||||
"environment": {
|
||||
"GCP_KEY": from_secret(rgm_gcp_key_base64),
|
||||
},
|
||||
}
|
||||
|
||||
def build_msi_step(depends_on = []):
|
||||
return {
|
||||
"name": "build-msi",
|
||||
"image": images["wine"],
|
||||
"entrypoint": ["/bin/bash"],
|
||||
"commands": [
|
||||
"export WINEPATH=$(winepath ./wix3)",
|
||||
"./bin/grabpl windows-installer --target grafana.zip --edition oss",
|
||||
],
|
||||
"depends_on": depends_on,
|
||||
}
|
||||
|
||||
def windows_manual_pipeline():
|
||||
return windows_pipeline_release(
|
||||
name = "windows-pipeline-manual",
|
||||
trigger = {
|
||||
"event": ["promote"],
|
||||
"target": "build-msi",
|
||||
},
|
||||
)
|
Loading…
Reference in New Issue
Block a user