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

Prepare for the removal of artifacts directories next #79

Closed

Conversation

JohnNiang
Copy link
Member

@JohnNiang JohnNiang commented Apr 22, 2021

I removed artifacts/m2 folder according to this instruction: https://docs.github.com/en/github/authenticating-to-github/removing-sensitive-data-from-a-repository.

This PR is aimed to prepare for the removal of artifacts directories next.

What needs to be noted here is what needs to be done after the merge:

  1. Clone devops-java-sample with mirror flag.
git clone --mirror git@github.com:kubesphere/devops-java-sample.git
  1. Download https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar
wget -c https://repo1.maven.org/maven2/com/madgag/bfg/1.14.0/bfg-1.14.0.jar -P ~/Downloads
  1. Go into devops-java-sample repo
  2. Delete artifacts folder
java -jar ~/Downloads/bfg-1.14.0.jar --delete-folders artifacts --delete-files artifacts --no-blob-protection .
  1. Garbage collection
git reflog expire --expire=now --all && git gc --prune=now --aggressive
  1. Push and update all refs on remote server
git push

Before:

--- /home/johnniang/Workspaces/johnniang/devops-java-sample --------
  114.9 MiB [##########] /artifacts                                                                      
   69.2 MiB [######    ] /.git
   64.0 KiB [          ] /deploy
   56.0 KiB [          ] /src
   12.0 KiB [          ]  LICENSE
    8.0 KiB [          ]  README.md
    8.0 KiB [          ] /configuration
    8.0 KiB [          ] /.s2i
    8.0 KiB [          ]  pom.xml
    4.0 KiB [          ]  Jenkinsfile-on-prem
    4.0 KiB [          ]  Jenkinsfile-online
    4.0 KiB [          ]  Dockerfile-on-prem
    4.0 KiB [          ]  Dockerfile-online
    4.0 KiB [          ]  OWNERS
    4.0 KiB [          ]  .gitignore

The result:

--- /home/johnniang/workspace/kubesphere/devops-java-sample ---------
  272.0 KiB [##########] /.git
   64.0 KiB [##        ] /deploy
   56.0 KiB [##        ] /src
   12.0 KiB [          ]  LICENSE
    8.0 KiB [          ]  README.md
    8.0 KiB [          ] /configuration
    8.0 KiB [          ] /.s2i
    8.0 KiB [          ]  pom.xml
    4.0 KiB [          ]  Jenkinsfile-on-prem
    4.0 KiB [          ]  Jenkinsfile-online
    4.0 KiB [          ]  Dockerfile-on-prem
    4.0 KiB [          ]  OWNERS
    4.0 KiB [          ]  Dockerfile-online
    4.0 KiB [          ]  .gitignore

Close #76
Close #74

/kind optimization

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JohnNiang
To complete the pull request process, please assign shaowenchen
You can assign the PR to them by writing /assign @shaowenchen in a comment when ready.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JohnNiang JohnNiang changed the title Perf/remove artifacts folder Remove artifacts folder for performance Apr 22, 2021
@ks-ci-bot
Copy link
Collaborator

The following users are mentioned in OWNERS file(s) but are not members of the kubesphere org.

Once all users have been added as members of the org, you can trigger verification by writing /verify-owners in a comment.

  • runzexia
    • OWNERS

Copy link
Member

@LinuxSuRen LinuxSuRen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments. And please fix the conflicts.

Dockerfile-cache Outdated Show resolved Hide resolved

COPY target/*.jar /home

ENTRYPOINT java -jar *.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using wildcards here?

@@ -0,0 +1,9 @@
FROM harbor.devops.kubesphere.local:30280/library/java:openjdk-8-jre-alpine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend that providing some description about the purpose of this file here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does the base image harbor.devops.kubesphere.local:30280/library/java:openjdk-8-jre-alpine comes from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make a tutorial about devops hand's lab in offline mode.


COPY target/*.jar /home

ENTRYPOINT java -jar *.jar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using wildcards here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cause we couldn't know the specific jar name directly. If you have any better suggestions, you can come up with them.

configuration/settings.xml Outdated Show resolved Hide resolved
@JohnNiang
Copy link
Member Author

Thanks for your review. I'll fix them as soon as possible.

Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
Signed-off-by: johnniang <johnniang@fastmail.com>
@JohnNiang JohnNiang changed the title Remove artifacts folder for performance Prepare to remove artifacts folder for performance Apr 29, 2021
@JohnNiang JohnNiang changed the title Prepare to remove artifacts folder for performance Prepare for the removal of artifacts directories next Apr 29, 2021
@LinuxSuRen
Copy link
Member

There're too many people who are creating PRs for test purposes. I'm going to close all PRs. And try to disable the PR feature.

And we can maintain the sample project in another ways.

@LinuxSuRen LinuxSuRen closed this Sep 25, 2021
@JohnNiang JohnNiang deleted the perf/remove-artifacts-folder branch September 25, 2021 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants