feature/improve-drone-config #2637

Merged
konrad merged 5 commits from dpschen/frontend:feature/improve-drone-config into main 2022-11-08 14:56:46 +00:00
Member

Some possible improvements / fixes of our drone config.
I'm not 100% sure with everything but explained respectively why I changed the values.

Some possible improvements / fixes of our drone config. I'm not 100% sure with everything but explained respectively why I changed the values.
dpschen added the
area/internal-code
label 2022-11-05 13:35:49 +00:00
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2637-feature-improve-drone-config--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2637-feature-improve-drone-config--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
dpschen changed title from WIP: feature/improve-drone-config to feature/improve-drone-config 2022-11-05 16:00:36 +00:00
dpschen requested review from konrad 2022-11-05 16:00:39 +00:00
konrad was assigned by dpschen 2022-11-05 16:00:43 +00:00
dpschen reviewed 2022-11-05 16:04:49 +00:00
.drone.yml Outdated
@ -376,4 +378,2 @@
ref:
- refs/heads/main
depends_on:
- clone
Author
Member

We do not have a clone step.

We do not have a `clone` step.

We do. Drone always creates a clone step if no other is specified.

We do. Drone always creates a `clone` step if no other is specified.

In this case here though the depends_on is redundant because the step is the first one (right after the clone step).

In this case here though the `depends_on` is redundant because the step is the first one (right after the `clone` step).
Author
Member

Makes still sense to keep it here then, to make it explicit.

Makes still sense to keep it here then, to make it explicit.
dpschen marked this conversation as resolved
.drone.yml Outdated
@ -198,4 +200,2 @@
- name: build
image: node:18-alpine
pull: true
group: build-static
Author
Member

A group property doesn't seem to exist in drone.

A `group` property doesn't seem to exist in drone.

That's probably a relic from Drone 1

That's probably a relic from Drone 1
dpschen marked this conversation as resolved
.drone.yml Outdated
@ -1,5 +1,6 @@
---
kind: pipeline
type: docker
Author
Member

Is docker the default? I was unsure here, but my drone linter in vscode told me that not declaring a type is also wrong.

Is `docker` the default? I was unsure here, but my drone linter in vscode told me that not declaring a type is also wrong.

Docker is the default, yes.

Docker is the default, yes.
dpschen marked this conversation as resolved
.drone.yml Outdated
@ -42,3 +43,3 @@
- name: dependencies
image: node:18-alpine
pull: true
pull: always
Author
Member

I forgot (and couldn't find out) if always is the default value either way. If so we could also remove the pull property.

I forgot (and couldn't find out) if `always` is the default value either way. If so we could also remove the `pull` property.
Author
Member

Do you know where to find the default config of drone?

Do you know where to find the default config of drone?

There's a reference somewhere.

I think for this particular case this is the relevant part of the docs: https://docs.drone.io/pipeline/kubernetes/syntax/images/#pulling-images

There's a reference somewhere. I think for this particular case this is the relevant part of the docs: https://docs.drone.io/pipeline/kubernetes/syntax/images/#pulling-images
Author
Member

Yes, sadly they don't mention the default setting.

Yes, sadly they don't mention the default setting.

But they say:

If the image is tagged with latest, Drone will always attempt to pull the latest version of the image. Configure the runner to only pull the image if not found in the local cache:

But they say: > If the image is tagged with latest, Drone will always attempt to pull the latest version of the image. Configure the runner to only pull the image if not found in the local cache:
Author
Member

Ahh, and ours are tagged with latest, so it will pull the latest anyway?

Ahh, and ours are tagged with latest, so it will pull the latest anyway?

This particular one has a tag of 18-alpine so it won't pull it always.

This particular one has a tag of `18-alpine` so it won't pull it always.
.drone.yml Outdated
@ -204,3 +205,3 @@
commands:
- apk add git
- corepack enable && pnpm config set store-dir .cache/.pnp
- corepack enable && pnpm config set store-dir .cache/.pnpm
Author
Member

This cache folder was wrong. Maybe this decreases our build time?

This cache folder was wrong. Maybe this decreases our build time?
dpschen marked this conversation as resolved
konrad reviewed 2022-11-07 12:03:19 +00:00
.drone.yml Outdated
@ -415,4 +413,2 @@
ref:
- refs/heads/main
depends_on:
- clone

This one is required though, otherwise all steps will be processed sequentially.

This one is required though, otherwise all steps will be processed sequentially.
Author
Member

Is clone a hidden step? The reason I deleted is that I couldn't find the step? Or what does it refer to? The drone API reference is not really good here :/

Is `clone` a hidden step? The reason I deleted is that I couldn't find the step? Or what does it refer to? The drone API reference is not really good here :/
Author
Member

Ahh just saw the comment above!

Ahh just saw the comment above!
dpschen marked this conversation as resolved
konrad reviewed 2022-11-07 12:03:37 +00:00
.drone.yml Outdated
@ -435,4 +431,2 @@
ref:
- "refs/tags/**"
depends_on:
- clone

This one is required as well.

This one is required as well.
dpschen marked this conversation as resolved
konrad requested changes 2022-11-07 12:04:34 +00:00
konrad left a comment
Owner

Can you re-add the required depends_on for the clone steps?

Can you re-add the required `depends_on` for the clone steps?
Author
Member

Does our Drone support Jsonnet?
Would be cool for the releases.

Does our Drone support [Jsonnet](https://docs.drone.io/pipeline/scripting/jsonnet/)? Would be cool for the releases.
dpschen force-pushed feature/improve-drone-config from f79fd1df94 to 612ef96dec 2022-11-07 13:44:50 +00:00 Compare
dpschen requested review from konrad 2022-11-07 13:45:07 +00:00
Owner

Does our Drone support Jsonnet?
Would be cool for the releases.

Our instance supports it. How would jsonnet help with releases?

> Does our Drone support Jsonnet? Would be cool for the releases. Our instance supports it. How would jsonnet help with releases?
Author
Member
See https://docs.drone.io/pipeline/docker/examples/languages/rust/#test-multiple-versions
Owner

Makes sense. I think that's something we could do in a different PR though.

Makes sense. I think that's something we could do in a different PR though.
Author
Member

Yes, just wanted to mention it here, while we are on it :)

Yes, just wanted to mention it here, while we are on it :)
konrad force-pushed feature/improve-drone-config from 60aac3ea25 to f82558c717 2022-11-08 14:41:08 +00:00 Compare
konrad force-pushed feature/improve-drone-config from f82558c717 to d5efe9f656 2022-11-08 14:42:49 +00:00 Compare
konrad scheduled this pull request to auto merge when all checks succeed 2022-11-08 14:43:38 +00:00
konrad merged commit 1a329464ab into main 2022-11-08 14:56:46 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.