-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
migrate skaraMirror.sh to be a python script #52
Open
gdams
wants to merge
3
commits into
adoptium:master
Choose a base branch
from
gdams:migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
ignore = | ||
# E501 line too long | ||
E501 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
########################### | ||
########################### | ||
## Markdown Linter rules ## | ||
########################### | ||
########################### | ||
|
||
# Linter rules doc: | ||
# - https://github.com/DavidAnson/markdownlint | ||
# | ||
# Note: | ||
# To comment out a single error: | ||
# <!-- markdownlint-disable --> | ||
# any violations you want | ||
# <!-- markdownlint-restore --> | ||
# | ||
|
||
############### | ||
# Rules by id # | ||
############### | ||
MD013: false # Line length is usually not important and the 80 char limit is way too small anyway | ||
MD033: false # Inline HTML is important for multilines and checkboxes within markdown tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
########################### | ||
########################### | ||
## Linter GitHub Actions ## | ||
########################### | ||
########################### | ||
name: Linter | ||
|
||
# | ||
# Documentation: | ||
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | ||
# | ||
|
||
#################################################################### | ||
# Start the job on all pull requests that target the master branch # | ||
#################################################################### | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
############### | ||
# Set the Job # | ||
############### | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linter: | ||
# Name the Job | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment in the wrong place and probably not needed |
||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
statuses: write # for github/super-linter to mark status of each linter run | ||
name: Lint Code Base | ||
# Set the agent to run on | ||
runs-on: ubuntu-latest | ||
|
||
################## | ||
# Load all steps # | ||
################## | ||
steps: | ||
########################## | ||
# Checkout the code base # | ||
########################## | ||
- name: Checkout Code | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
with: | ||
# Full git history is needed to get a proper list of changed files within `super-linter` | ||
fetch-depth: 0 | ||
|
||
################################ | ||
# Run Linter against code base # | ||
################################ | ||
- name: Lint Code Base | ||
uses: github/super-linter@45fc0d88288beee4701c62761281edfee85655d7 # v5.0.0 | ||
env: | ||
VALIDATE_ALL_CODEBASE: false | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Markdown lint complains about the issue templates | ||
FILTER_REGEX_EXCLUDE: .github/ISSUE_TEMPLATE/* | ||
# Lots of shellcheck errors - need fixing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a TODO or a new issue for this. |
||
VALIDATE_BASH: false | ||
# Disable isort | ||
VALIDATE_PYTHON_ISORT: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test_python: | ||
name: Python | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 | ||
with: | ||
python-version: '3' | ||
|
||
- name: Install Python Dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Run Python Tests | ||
run: python -m unittest discover tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ workspace | |
pipelines/.gradle | ||
pipelines/gradle-cache | ||
pipelines/target | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
GitPython==3.1.43 | ||
tqdm==4.66.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# OpenJDK Mirroring Script | ||
|
||
This script automates the process of mirroring OpenJDK repositories from GitHub to Adoptium. It is designed to clone specific JDK versions, add upstream Skara repositories, and perform merges as necessary to keep the Adoptium mirrors up to date with OpenJDK development. | ||
|
||
## Features | ||
|
||
- **Clone Repositories:** Clone OpenJDK repositories for specific JDK versions. | ||
- **Add Skara Upstream:** Configure Skara repository as a remote upstream. | ||
- **Merge Changes:** Merge changes from Skara into the GitHub repository and manage branch merges for release and development purposes. | ||
|
||
## Prerequisites | ||
|
||
Python 3.6 or higher | ||
Ensure you have Git installed and configured on your system. | ||
|
||
## Installation | ||
|
||
Install the required Python dependencies: | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
|
||
The script supports various operations based on command-line arguments: | ||
|
||
```bash | ||
./skaraMirror.py <jdk_version> [repo_url] [branch] | ||
``` | ||
|
||
- `<jdk_version>`: The JDK version to mirror (e.g., jdk8u, jdk17u). | ||
- `[repo_url]`: (Optional) URL of the repository to mirror. Defaults to [email protected]:adoptium. | ||
- `[branch]`: (Optional) Branch to mirror. Defaults to master. | ||
|
||
## Examples | ||
|
||
Mirror the JDK 17 repository: | ||
|
||
```bash | ||
./skaraMirror.py jdk17u | ||
``` | ||
|
||
Mirror the JDK 8 repository from a specific repository and branch: | ||
|
||
```bash | ||
./skaraMirror.py jdk8u [email protected]:custom_org custom_branch | ||
``` | ||
|
||
## Running tests | ||
|
||
The tests for this codebase live in `/tests`. If you want to run them you can use the following command: | ||
|
||
```bash | ||
python -m unittest discover tests | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.