kubesphere / devops-agent

Agents for Kubesphere DevOps
Apache License 2.0
64 stars 76 forks source link

Use a specified version of base image instead the latest #22

Closed LinuxSuRen closed 3 years ago

ks-ci-bot commented 3 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LinuxSuRen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubesphere/devops-agent/blob/master/OWNERS)~~ [LinuxSuRen] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
LinuxSuRen commented 3 years ago

/cc @kubesphere/sig-devops

JohnNiang commented 3 years ago

If do that, we have to build and push base docker image before others.

LinuxSuRen commented 3 years ago

If do that, we have to build and push base docker image before others.

Correct. Please see also the following screenshot:

image

https://github.com/kubesphere/devops-agent/actions/runs/873446599

JohnNiang commented 3 years ago

If do that, we have to build and push base docker image before others.

Before building others, we have to change kubespheredev/builder-base:v3.1.0 in Dockerfile.

LinuxSuRen commented 3 years ago

Before building others, we have to change kubespheredev/builder-base:v3.1.0 in Dockerfile.

I didn't get your point. The reason why I create this PR because using the latest base image will lead unpredicted situation.

JohnNiang commented 3 years ago

Before building others, we have to change kubespheredev/builder-base:v3.1.0 in Dockerfile.

I didn't get your point. The reason why I create this PR because using the latest base image will lead unpredicted situation.

If we build agents separately, that's a great point for stable. In fact, agents except base base on base building, so it's no problem to use latest version of base image in Dockerfile.

LinuxSuRen commented 3 years ago

If we build agents separately, that's a great point for stable. In fact, agents except base base on base building, so it's no problem to use latest version of base image in Dockerfile.

What if someone wants to build an old release instead of the latest code base? For example, let's assume the user wants to build v1.0, then he will get the wrong base image for the agents.

JohnNiang commented 3 years ago

If we build agents separately, that's a great point for stable. In fact, agents except base base on base building, so it's no problem to use latest version of base image in Dockerfile.

What if someone wants to build an old release instead of the latest code base? For example, let's assume the user wants to build v1.0, then he will get the wrong base image for the agents.

Whether we specify the version or not, he/she has to modify it according to his/her needs.

LinuxSuRen commented 3 years ago

Whether we specify the version or not, he/she has to modify it according to his/her needs.

I don't think so. Users might just want to build, and don't change the code base.

JohnNiang commented 3 years ago

Whether we specify the version or not, he/she has to modify it according to his/her needs.

I don't think so. Users might just want to build, and don't change the code base.

I don't think we can solve the problem by specifying the version. Also, this increases maintenance costs.

JohnNiang commented 3 years ago

I get your point now.

JohnNiang commented 3 years ago

There's a new problem that we have to change image version manually when we release a new one.

LinuxSuRen commented 3 years ago

No worries. There'e no big deal to change the base image version. And I think we should change it manually instead of automatically. Because we don't have a final solution to make sure the quality of the base image.

JohnNiang commented 3 years ago

/lgtm