diff --git a/.drone.yml b/.drone.yml index a656319af37..f893b0e88d9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,8 +17,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -230,32 +231,6 @@ trigger: event: - pull_request ---- -kind: pipeline -type: docker -name: windows-pr - -platform: - os: windows - arch: amd64 - version: 1809 - -steps: -- name: identify-runner - image: mcr.microsoft.com/windows:1809 - commands: - - echo $env:DRONE_RUNNER_NAME - -- name: initialize - image: grafana/ci-wix:0.1.1 - commands: - - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe - -trigger: - event: - - pull_request - --- kind: pipeline type: docker @@ -275,8 +250,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -596,7 +572,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - name: build-windows-installer image: grafana/ci-wix:0.1.1 @@ -645,8 +622,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone environment: DOCKERIZE_VERSION: 0.6.1 @@ -720,8 +698,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version ${DRONE_TAG} - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -1014,7 +993,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - name: build-windows-installer image: grafana/ci-wix:0.1.1 @@ -1064,7 +1044,7 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -1082,6 +1062,7 @@ steps: - /tmp/grabpl init-enterprise /tmp/grafana-enterprise ${DRONE_TAG} - mkdir bin - mv /tmp/grabpl bin/ + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version ${DRONE_TAG} - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -1347,7 +1328,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout ${DRONE_TAG} @@ -1412,8 +1394,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version ${DRONE_TAG} environment: DOCKERIZE_VERSION: 0.6.1 @@ -1489,8 +1472,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version v7.3.0-test - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -1773,7 +1757,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - name: build-windows-installer image: grafana/ci-wix:0.1.1 @@ -1823,7 +1808,7 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -1841,6 +1826,7 @@ steps: - /tmp/grabpl init-enterprise /tmp/grafana-enterprise - mkdir bin - mv /tmp/grabpl bin/ + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version v7.3.0-test - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -2100,7 +2086,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout master @@ -2165,8 +2152,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - ./bin/grabpl verify-version v7.3.0-test environment: DOCKERIZE_VERSION: 0.6.1 @@ -2251,8 +2239,9 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl + - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -2489,7 +2478,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - name: build-windows-installer image: grafana/ci-wix:0.1.1 @@ -2535,7 +2525,7 @@ steps: image: grafana/build-container:1.2.28 commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/grabpl - chmod +x bin/grabpl - git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2553,6 +2543,7 @@ steps: - /tmp/grabpl init-enterprise /tmp/grafana-enterprise - mkdir bin - mv /tmp/grabpl bin/ + - ./bin/grabpl verify-drone - curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz - rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz @@ -2794,7 +2785,8 @@ steps: image: grafana/ci-wix:0.1.1 commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.25/windows/grabpl.exe -OutFile grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.26/windows/grabpl.exe -OutFile grabpl.exe + - .\grabpl.exe verify-drone - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise - git checkout $$env:DRONE_BRANCH diff --git a/scripts/lib.star b/scripts/lib.star index 2302424ab47..1c3671d2805 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -1,4 +1,4 @@ -grabpl_version = '0.5.25' +grabpl_version = '0.5.26' build_image = 'grafana/build-container:1.2.28' publish_image = 'grafana/grafana-ci-deploy:1.2.6' grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2' @@ -94,8 +94,9 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr ), 'chmod +x bin/grabpl', ] - common_cmds = [] - pre_cmds = [] + common_cmds = [ + './bin/grabpl verify-drone', + ] if ver_mode == 'release': common_cmds.append('./bin/grabpl verify-version ${DRONE_TAG}') @@ -140,7 +141,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr 'from_secret': 'github_token', }, }, - 'commands': download_grabpl_cmds + pre_cmds + [ + 'commands': download_grabpl_cmds + [ 'git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"', 'cd grafana-enterprise', 'git checkout {}'.format(committish), @@ -155,7 +156,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr 'depends_on': [ 'clone', ], - 'commands': pre_cmds + [ + 'commands': [ 'mv bin/grabpl /tmp/', 'rmdir bin', 'mv grafana-enterprise /tmp/', @@ -176,7 +177,7 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr 'environment': { 'DOCKERIZE_VERSION': dockerize_version, }, - 'commands': download_grabpl_cmds + pre_cmds + common_cmds, + 'commands': download_grabpl_cmds + common_cmds, }, ] @@ -839,7 +840,6 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): else: source_commit = ' $$env:SOURCE_COMMIT' - pre_cmds = [] sfx = '' if edition == 'enterprise': sfx = '-enterprise' @@ -848,6 +848,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): init_cmds.extend([ '$$ProgressPreference = "SilentlyContinue"', 'Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v{}/windows/grabpl.exe -OutFile grabpl.exe'.format(grabpl_version), + '.\\grabpl.exe verify-drone', ]) steps = [ { @@ -902,7 +903,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'from_secret': 'gcp_key', }, }, - 'commands': pre_cmds + installer_commands, + 'commands': installer_commands, 'depends_on': [ 'initialize', ], @@ -923,6 +924,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v{}/windows/grabpl.exe -OutFile grabpl.exe'.format(grabpl_version), ] clone_cmds = [ + '.\\grabpl.exe verify-drone', 'git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"', ] if not is_downstream: @@ -938,7 +940,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'from_secret': 'github_token', }, }, - 'commands': download_grabpl_cmds + pre_cmds + clone_cmds, + 'commands': download_grabpl_cmds + clone_cmds, }) steps[1]['depends_on'] = [ 'clone', diff --git a/scripts/pr.star b/scripts/pr.star index de8330bc5e4..7189db22d32 100644 --- a/scripts/pr.star +++ b/scripts/pr.star @@ -19,7 +19,6 @@ load( 'build_docker_images_step', 'postgres_integration_tests_step', 'mysql_integration_tests_step', - 'get_windows_steps', 'benchmark_ldap_step', 'ldap_service', 'integration_test_services', @@ -50,7 +49,6 @@ def pr_pipelines(edition): postgres_integration_tests_step(), mysql_integration_tests_step(), ] - windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode) if edition == 'enterprise': steps.append(benchmark_ldap_step()) services.append(ldap_service()) @@ -62,8 +60,4 @@ def pr_pipelines(edition): name='test-pr', edition=edition, trigger=trigger, services=services, steps=steps, ver_mode=ver_mode, ), - pipeline( - name='windows-pr', edition=edition, trigger=trigger, steps=windows_steps, platform='windows', - ver_mode=ver_mode, - ), ]