Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drone: Fix push to Docker step #469

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ steps:
name: security-scan
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc
- ./scripts/package_target.sh linux-x64-glibc
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc || true
- sh scripts/archive_target.sh linux-x64-glibc
- ./scripts/archive_target.sh linux-x64-glibc
depends_on:
- yarn-build
environment:
Expand All @@ -63,9 +63,9 @@ steps:
name: package-linux-x64-glibc
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh darwin-x64-unknown
- ./scripts/package_target.sh darwin-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-darwin-x64-unknown || true
- sh scripts/archive_target.sh darwin-x64-unknown
- ./scripts/archive_target.sh darwin-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -75,9 +75,9 @@ steps:
name: package-darwin-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh win32-x64-unknown
- ./scripts/package_target.sh win32-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-win32-x64-unknown || true
- sh scripts/archive_target.sh win32-x64-unknown
- ./scripts/archive_target.sh win32-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -87,10 +87,10 @@ steps:
name: package-win32-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- ./scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc-no-chromium ||
true
- sh scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
- ./scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
depends_on:
- yarn-build
environment:
Expand Down Expand Up @@ -159,9 +159,9 @@ steps:
name: security-scan
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc
- ./scripts/package_target.sh linux-x64-glibc
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc
- sh scripts/archive_target.sh linux-x64-glibc
- ./scripts/archive_target.sh linux-x64-glibc
depends_on:
- yarn-build
environment:
Expand All @@ -171,9 +171,9 @@ steps:
name: package-linux-x64-glibc
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh darwin-x64-unknown
- ./scripts/package_target.sh darwin-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-darwin-x64-unknown
- sh scripts/archive_target.sh darwin-x64-unknown
- ./scripts/archive_target.sh darwin-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -183,9 +183,9 @@ steps:
name: package-darwin-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh win32-x64-unknown
- ./scripts/package_target.sh win32-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-win32-x64-unknown
- sh scripts/archive_target.sh win32-x64-unknown
- ./scripts/archive_target.sh win32-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -195,9 +195,9 @@ steps:
name: package-win32-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- ./scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc-no-chromium
- sh scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
- ./scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
depends_on:
- yarn-build
environment:
Expand All @@ -206,7 +206,7 @@ steps:
image: grafana/grafana-plugin-ci:1.9.0
name: package-linux-x64-glibc-no-chromium
- commands:
- sh scripts/build_push_docker.sh master
- ./scripts/build_push_docker.sh master
environment:
DOCKER_PASS:
from_secret: docker_pass
Expand Down Expand Up @@ -281,9 +281,9 @@ steps:
name: security-scan
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc
- ./scripts/package_target.sh linux-x64-glibc
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc
- sh scripts/archive_target.sh linux-x64-glibc
- ./scripts/archive_target.sh linux-x64-glibc
depends_on:
- yarn-build
environment:
Expand All @@ -293,9 +293,9 @@ steps:
name: package-linux-x64-glibc
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh darwin-x64-unknown
- ./scripts/package_target.sh darwin-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-darwin-x64-unknown
- sh scripts/archive_target.sh darwin-x64-unknown
- ./scripts/archive_target.sh darwin-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -305,9 +305,9 @@ steps:
name: package-darwin-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh win32-x64-unknown
- ./scripts/package_target.sh win32-x64-unknown
- bin/grabpl build-plugin-manifest ./dist/plugin-win32-x64-unknown
- sh scripts/archive_target.sh win32-x64-unknown
- ./scripts/archive_target.sh win32-x64-unknown
depends_on:
- yarn-build
environment:
Expand All @@ -317,9 +317,9 @@ steps:
name: package-win32-x64-unknown
- commands:
- . ~/.init-nvm.sh
- sh scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- ./scripts/package_target.sh linux-x64-glibc true plugin-linux-x64-glibc-no-chromium
- bin/grabpl build-plugin-manifest ./dist/plugin-linux-x64-glibc-no-chromium
- sh scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
- ./scripts/archive_target.sh linux-x64-glibc plugin-linux-x64-glibc-no-chromium
depends_on:
- yarn-build
environment:
Expand All @@ -328,8 +328,8 @@ steps:
image: grafana/grafana-plugin-ci:1.9.0
name: package-linux-x64-glibc-no-chromium
- commands:
- sh scripts/generate_md5sum.sh
- sh scripts/publish_github_release.sh
- ./scripts/generate_md5sum.sh
- ./scripts/publish_github_release.sh
depends_on:
- package-linux-x64-glibc
- package-darwin-x64-unknown
Expand All @@ -341,7 +341,7 @@ steps:
image: cibuilds/github:0.13.0
name: publish_to_github
- commands:
- sh scripts/build_push_docker.sh
- ./scripts/build_push_docker.sh
depends_on:
- publish_to_github
environment:
Expand All @@ -358,7 +358,7 @@ steps:
- commands:
- . ~/.init-nvm.sh
- yarn run create-gcom-plugin-json ${DRONE_COMMIT}
- sh scripts/push-to-gcom.sh
- ./scripts/push-to-gcom.sh
depends_on:
- publish_to_github
environment:
Expand Down Expand Up @@ -414,6 +414,6 @@ kind: secret
name: srcclr_api_token
---
kind: signature
hmac: e6b99f052740c6862015a124564b85182f9877f4eccc159334a40000faf3a008
hmac: f130230eb86344632de732a9fa4fe1155c622537fbe3c61d9fc1d8b17a4cacea

...
2 changes: 1 addition & 1 deletion scripts/build_push_docker.sh
AgnesToulet marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ if [ -z "$(echo $TAG | grep -E "beta|master")" ]; then
tags+={IMAGE_NAME}:latest
fi

docker buildx build --platform linux/amd64,linux/arm64 --push -t ${tags[@]} .
# docker buildx build --platform linux/amd64,linux/arm64 --push -t ${tags[@]} .
AgnesToulet marked this conversation as resolved.
Show resolved Hide resolved
AgnesToulet marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions scripts/drone/common.star
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def build_step():
}

def package_step(arch, name='', skip_chromium=False, override_output='', skip_errors=True):
pkg_cmd = 'sh scripts/package_target.sh {}'.format(arch)
pkg_cmd = './scripts/package_target.sh {}'.format(arch)
bpm_cmd = 'bin/grabpl build-plugin-manifest ./dist/'
arc_cmd = 'sh scripts/archive_target.sh {}'.format(arch)
arc_cmd = './scripts/archive_target.sh {}'.format(arch)

if skip_chromium:
pkg_cmd += ' true {}'.format(override_output)
Expand Down
8 changes: 4 additions & 4 deletions scripts/drone/promotion.star
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def publish_gh_release():
'name': 'publish_to_github',
'image': 'cibuilds/github:0.13.0',
'commands': [
'sh scripts/generate_md5sum.sh',
'sh scripts/publish_github_release.sh',
'./scripts/generate_md5sum.sh',
'./scripts/publish_github_release.sh',
],
'environment': {
'GITHUB_TOKEN': from_secret('github_token'),
Expand Down Expand Up @@ -40,7 +40,7 @@ def publish_to_docker():
'DOCKER_USER': from_secret('docker_user'),
'DOCKER_PASS': from_secret('docker_pass'),
},
'commands': ['sh scripts/build_push_docker.sh'],
'commands': ['./scripts/build_push_docker.sh'],
'volumes': [{'name': 'docker', 'path': '/var/run/docker.sock'}],
}

Expand All @@ -51,7 +51,7 @@ def publish_to_gcom():
'commands': [
'. ~/.init-nvm.sh',
'yarn run create-gcom-plugin-json ${DRONE_COMMIT}',
'sh scripts/push-to-gcom.sh',
'./scripts/push-to-gcom.sh',
],
'environment': {
'GCOM_URL': from_secret('gcom_url'),
Expand Down
Loading