-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate skaraMirror.sh to be a python script
- Loading branch information
Showing
9 changed files
with
868 additions
and
0 deletions.
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,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,61 @@ | ||
--- | ||
########################### | ||
########################### | ||
## 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 | ||
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 | ||
VALIDATE_BASH: 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 test |
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,49 @@ | ||
# 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 git@github.com: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 repo and branch: | ||
|
||
```bash | ||
./skaraMirror.py jdk8u git@github.com:custom_org custom_branch | ||
``` |
Oops, something went wrong.