-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Crola1702/improve-outdatedjob-strategy
- Loading branch information
Showing
15 changed files
with
916 additions
and
828 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,73 @@ | ||
name: DSL logs and checks | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'jenkins-scripts/dsl/**' | ||
|
||
jobs: | ||
xml_generation: | ||
runs-on: ubuntu-latest | ||
name: Generate XML config from DSL | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: Download and setup job dsl jar | ||
run: ./jenkins-scripts/dsl/tools/setup_local_generation.bash | ||
- name: Generate XML files | ||
run: | | ||
# Remove existing logs files. Code is adding content to them but not re-generating | ||
# simulate token for brew_release | ||
sudo mkdir -p /var/lib/jenkins/ && sudo touch /var/lib/jenkins/remote_token | ||
sudo chown -R ${USER} /var/lib/jenkins | ||
pushd jenkins-scripts/dsl | ||
rm -fr logs && mkdir logs | ||
WRITE_JOB_LOG=1 java -jar tools/jobdsl.jar *.dsl | ||
find logs/* -exec sort {} -o {} \; | ||
popd | ||
- name: Checks for DSL Code | ||
run: | | ||
cd jenkins-scripts/dsl | ||
./dsl_checks.bash | ||
- name: Export XML generated configuration for diff | ||
run: | | ||
cd jenkins-scripts/dsl | ||
# export files for later diff | ||
mkdir /tmp/pr_xml_configuration | ||
mv *.xml /tmp/pr_xml_configuration/ | ||
- name: Update and commit logs generated | ||
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5 sha | ||
with: | ||
file_pattern: jenkins-scripts/dsl/logs/ | ||
commit_message: 'Automated change: update logs [skip ci]' | ||
- name: Generate master DSL files | ||
run: | | ||
git clean -f -e jobdsl.jar | ||
git checkout master | ||
cd jenkins-scripts/dsl | ||
WRITE_JOB_LOG=1 java -jar tools/jobdsl.jar *.dsl | ||
mkdir /tmp/current_xml_configuration | ||
mv *.xml /tmp/current_xml_configuration/ | ||
- name: Generating diffs | ||
run: | | ||
# somehow the Jenkins views changed the portlet_ id on every run. | ||
diff -qr -I '.*<id>dashboard_portlet_.*</id>.*' /tmp/current_xml_configuration /tmp/pr_xml_configuration | sort > /tmp/xml_config_files_changed.diff || true | ||
diff -ur -I '.*<id>dashboard_portlet_.*</id>.*' /tmp/current_xml_configuration /tmp/pr_xml_configuration > /tmp/xml_config_content_changed.diff || true | ||
- name: Archive files changes | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: xml_config_files_changed | ||
path: /tmp/xml_config_files_changed.diff | ||
- name: Archive content changes | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: xml_config_content_changed | ||
path: /tmp/xml_config_content_changed.diff |
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,18 @@ | ||
name: Releasing tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- release.py | ||
|
||
jobs: | ||
dsl_ci: | ||
runs-on: ubuntu-latest | ||
name: release.py checks | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run release.py script tests | ||
run: ./check_releasepy.bash |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.