Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

This repo is too big due to having the maven local cache files #76

Closed
LinuxSuRen opened this issue Apr 19, 2021 · 13 comments · Fixed by #98
Closed

This repo is too big due to having the maven local cache files #76

LinuxSuRen opened this issue Apr 19, 2021 · 13 comments · Fixed by #98
Assignees

Comments

@LinuxSuRen
Copy link
Member

No description provided.

@JohnNiang
Copy link
Member

I want to try to resolve this issue.

@LinuxSuRen
Copy link
Member Author

LinuxSuRen commented Apr 19, 2021

Cool! Please don't forget to describe your solutions before you get it started.

@JohnNiang
Copy link
Member

Alright.

@JohnNiang
Copy link
Member

I'm trying to use this approach to remove artifacts folder.

@JohnNiang
Copy link
Member

#78 Resolve this issue, but may can not be merged into master branch directly.

@LinuxSuRen
Copy link
Member Author

So we can reduce the size of this repo by pushing the changes directly to the master branch. Right?

But there's another thing we need to consider. What do they need to do after we removing the maven local cache files? Please consider providing a solution for people who might also want to use the cache files.

@JohnNiang
Copy link
Member

What kind of scene needs to add offline mode in demo projects, is it reasonable in itself? This may make us more concerned.

@JohnNiang
Copy link
Member

If offline mode is very necessary for someone, we can provide an offline packaging method for him/her.

@LinuxSuRen
Copy link
Member Author

For some users, their environment has no access to the internet. It's very helpful to offer them a solution. The most important thing is that remove the maven files without a solution will be a break change for the users.

@JohnNiang
Copy link
Member

We can guide user to execute the following command:

mvn -gs configuration/settings.xml clean verify
mvn -gs configuration/settings.xml package -DskipTests

The two commands above will result artifacts folder for offline mode use.

And then they can push the artifacts folder into their repo(public or private, online or offline).

@LinuxSuRen
Copy link
Member Author

This is absolutely a good way to collect the cache files. How about we just do this directly? I mean we can run the command in the GitHub actions, then put those files into an image, push the image to the docker hub. So users can reuse it instead of building it every time.

@JohnNiang
Copy link
Member

JohnNiang commented Apr 22, 2021

If this merge request cannot be merged directly, there are some steps we need to do.

  1. Sync kubesphere/devops-java-sample from johnniang/devops-java-sample

    git clone --mirror git@github.com:JohnNiang/devops-java-sample.git
    cd devops-java-sample.git
    git remote add upstream git@github.com:kubesphere/devops-java-sample.git
    git push --mirror upstream
  2. Update offline documentation

    Make sure let offline users known about how to make a maven cache in their offline environment. The following commands need to be executed by offline users.

    docker pull kubespheresig/devops-java-sample-cache
    docker tag kubespheresig/devops-java-sample-cache ${harbor_registry}/library/devops-java-sample-cache
    docker push ${harbor}/library/devops-java-sample-cache

@JohnNiang
Copy link
Member

/cc @LinuxSuRen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants