diff --git a/.drone.yml b/.drone.yml index 282ece0a950..9baf3e75308 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -112,7 +112,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -337,7 +337,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -417,7 +417,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -822,7 +822,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -843,6 +843,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -873,7 +875,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -969,7 +971,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1340,7 +1342,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -1361,6 +1363,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -1411,7 +1415,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -1432,7 +1436,8 @@ steps: - mv bin/grabpl /tmp/ - rmdir bin - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise /tmp/grafana-enterprise ${DRONE_TAG} + - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise + ${DRONE_TAG} - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - mkdir bin - mv /tmp/grabpl bin/ @@ -1442,6 +1447,9 @@ steps: - yarn install --immutable depends_on: - clone-enterprise + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/build-container:1.4.8 name: initialize - commands: @@ -1858,7 +1866,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -1873,10 +1881,13 @@ steps: - rm -r -force grafana-enterprise - cp grabpl.exe C:\App\grabpl.exe - rm -force grabpl.exe - - C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise + - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise - cp C:\App\grabpl.exe grabpl.exe depends_on: - clone + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/ci-wix:0.1.1 name: initialize - commands: @@ -1896,6 +1907,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -1911,34 +1924,6 @@ volumes: path: /var/run/docker.sock name: docker --- -depends_on: -- oss-build-release -- oss-windows-release -- enterprise-build-release -- enterprise-windows-release -kind: pipeline -name: notify-release -platform: - arch: amd64 - os: linux -steps: -- image: plugins/slack - name: slack - settings: - channel: grafana-ci-notifications - template: |- - Build {{build.number}} failed for commit: : {{build.link}} - Branch: - Author: {{build.author}} - webhook: - from_secret: slack_webhook -trigger: - ref: - - refs/tags/v* - status: - - failure -type: docker ---- depends_on: [] kind: pipeline name: oss-build-test-release @@ -1964,7 +1949,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2315,7 +2300,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -2337,6 +2322,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -2387,7 +2374,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -2408,7 +2395,7 @@ steps: - mv bin/grabpl /tmp/ - rmdir bin - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise /tmp/grafana-enterprise + - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - mkdir bin - mv /tmp/grabpl bin/ @@ -2418,6 +2405,9 @@ steps: - yarn install --immutable depends_on: - clone-enterprise + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/build-container:1.4.8 name: initialize - commands: @@ -2834,7 +2824,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -2849,10 +2839,13 @@ steps: - rm -r -force grafana-enterprise - cp grabpl.exe C:\App\grabpl.exe - rm -force grabpl.exe - - C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise + - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise - cp C:\App\grabpl.exe grabpl.exe depends_on: - clone + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/ci-wix:0.1.1 name: initialize - commands: @@ -2873,6 +2866,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -2904,7 +2899,7 @@ services: [] steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3024,7 +3019,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3357,7 +3352,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe image: grafana/ci-wix:0.1.1 name: initialize @@ -3374,6 +3369,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -3424,7 +3421,7 @@ services: steps: - commands: - mkdir -p bin - - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/grabpl + - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/grabpl - chmod +x bin/grabpl image: byrnedo/alpine-curl:0.1.8 name: grabpl @@ -3445,7 +3442,7 @@ steps: - mv bin/grabpl /tmp/ - rmdir bin - mv grafana-enterprise /tmp/ - - /tmp/grabpl init-enterprise /tmp/grafana-enterprise + - /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise - mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json - mkdir bin - mv /tmp/grabpl bin/ @@ -3454,6 +3451,9 @@ steps: - yarn install --immutable depends_on: - clone-enterprise + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/build-container:1.4.8 name: initialize - commands: @@ -3875,7 +3875,7 @@ steps: name: identify-runner - commands: - $$ProgressPreference = "SilentlyContinue" - - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.4/windows/grabpl.exe + - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.7.5/windows/grabpl.exe -OutFile grabpl.exe - git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git" - cd grafana-enterprise @@ -3890,10 +3890,13 @@ steps: - rm -r -force grafana-enterprise - cp grabpl.exe C:\App\grabpl.exe - rm -force grabpl.exe - - C:\App\grabpl.exe init-enterprise C:\App\grafana-enterprise + - C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise - cp C:\App\grabpl.exe grabpl.exe depends_on: - clone + environment: + GITHUB_TOKEN: + from_secret: github_token image: grafana/ci-wix:0.1.1 name: initialize - commands: @@ -3909,6 +3912,8 @@ steps: environment: GCP_KEY: from_secret: gcp_key + GITHUB_TOKEN: + from_secret: github_token PRERELEASE_BUCKET: from_secret: prerelease_bucket image: grafana/ci-wix:0.1.1 @@ -3924,34 +3929,6 @@ volumes: path: /var/run/docker.sock name: docker --- -depends_on: -- oss-build-release-branch -- oss-windows-release-branch -- enterprise-build-release-branch -- enterprise-windows-release-branch -kind: pipeline -name: notify-release-branch -platform: - arch: amd64 - os: linux -steps: -- image: plugins/slack - name: slack - settings: - channel: grafana-ci-notifications - template: |- - Build {{build.number}} failed for commit: : {{build.link}} - Branch: - Author: {{build.author}} - webhook: - from_secret: slack_webhook -trigger: - ref: - - refs/heads/v[0-9]* - status: - - failure -type: docker ---- kind: pipeline name: scan-docker-images platform: @@ -4012,6 +3989,6 @@ kind: secret name: prerelease_bucket --- kind: signature -hmac: cc3299d9dcd805f37ccd5e224ac2973680d95bc085549009c8dc9be1a54a86dc +hmac: 6ac2bc99903f8daae37ba7485e708cf36afe7ccf60ca884cbae2c393de14b73e ... diff --git a/scripts/drone/pipelines/release.star b/scripts/drone/pipelines/release.star index 6213749fb05..8650da0e531 100644 --- a/scripts/drone/pipelines/release.star +++ b/scripts/drone/pipelines/release.star @@ -262,10 +262,10 @@ def release_pipelines(ver_mode='release', trigger=None): depends_on=[p['name'] for p in oss_pipelines + enterprise_pipelines], ) - pipelines.append(notify_pipeline( - name='notify-{}'.format(ver_mode), slack_channel='grafana-ci-notifications', trigger=trigger, - depends_on=[p['name'] for p in pipelines], - )) + #pipelines.append(notify_pipeline( + # name='notify-{}'.format(ver_mode), slack_channel='grafana-ci-notifications', trigger=trigger, + # depends_on=[p['name'] for p in pipelines], secret='slack_webhook', + #)) return pipelines diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 9e565879ec9..135e2f53955 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -1,6 +1,6 @@ load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket') -grabpl_version = '2.7.4' +grabpl_version = '2.7.5' build_image = 'grafana/build-container:1.4.8' publish_image = 'grafana/grafana-ci-deploy:1.3.1' grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2' @@ -84,11 +84,14 @@ def initialize_step(edition, platform, ver_mode, is_downstream=False, install_de 'depends_on': [ 'clone-enterprise', ], + 'environment': { + 'GITHUB_TOKEN': from_secret(github_token), + }, 'commands': [ 'mv bin/grabpl /tmp/', 'rmdir bin', 'mv grafana-enterprise /tmp/', - '/tmp/grabpl init-enterprise /tmp/grafana-enterprise{}'.format(source_commit), + '/tmp/grabpl init-enterprise --github-token $${{GITHUB_TOKEN}} /tmp/grafana-enterprise{}'.format(source_commit), 'mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json', 'mkdir bin', 'mv /tmp/grabpl bin/' @@ -1064,7 +1067,8 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'image': wix_image, 'environment': { 'GCP_KEY': from_secret('gcp_key'), - 'PRERELEASE_BUCKET': from_secret(prerelease_bucket) + 'PRERELEASE_BUCKET': from_secret(prerelease_bucket), + 'GITHUB_TOKEN': from_secret('github_token') }, 'commands': installer_commands, 'depends_on': [ @@ -1112,9 +1116,13 @@ def get_windows_steps(edition, ver_mode, is_downstream=False): 'rm -r -force grafana-enterprise', 'cp grabpl.exe C:\\App\\grabpl.exe', 'rm -force grabpl.exe', - 'C:\\App\\grabpl.exe init-enterprise C:\\App\\grafana-enterprise{}'.format(source_commit), + 'C:\\App\\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\\App\\grafana-enterprise{}'.format(source_commit), 'cp C:\\App\\grabpl.exe grabpl.exe', ]) + if 'environment' in steps[1]: + steps[1]['environment'] + {'GITHUB_TOKEN': from_secret(github_token)} + else: + steps[1]['environment'] = {'GITHUB_TOKEN': from_secret(github_token)} return steps