Skip to content

Commit

Permalink
[jenkins]: add Jenkins build job
Browse files Browse the repository at this point in the history
problem: there is no Jenkins job
solution: add Jenkins job files plus add dependabot
  • Loading branch information
Wayonb authored May 23, 2024
1 parent 8826e7a commit 1ba573f
Show file tree
Hide file tree
Showing 14 changed files with 143 additions and 408 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:

- package-ecosystem: pip
directory: /
schedule:
interval: weekly
day: sunday
target-branch: dev
labels: [dependencies]
versioning-strategy: increase-if-necessary
commit-message:
prefix: '[dependency]'
48 changes: 48 additions & 0 deletions .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Code Scanning - Action

'on':
push:
branches: [dev, main]
pull_request:
branches: [dev]
schedule:
# yamllint disable-line rule:quoted-strings
- cron: '44 11 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [python]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{matrix.language}}
47 changes: 47 additions & 0 deletions .github/workflows/combine-dependabot-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Combine PRs

'on':
schedule:
# yamllint disable-line rule:quoted-strings
- cron: '0 2 * * 1' # Monday at 02:00 AM
workflow_dispatch: # allows you to manually trigger the workflow
inputs:
logLevel:
description: Log level
required: true
default: warning
type: choice
options:
- info
- warning
- debug

# The minimum permissions required to run this Action
permissions:
contents: write
pull-requests: write
repository-projects: write
checks: read

jobs:
combine-prs:
runs-on: ubuntu-latest

steps:
- name: combine dependabot prs
id: combine-prs
uses: github/[email protected]
with:
pr_title: '[dependency]: Combine dependabot PRs'
ci_required: true
branch_prefix: dependabot
labels: dependencies
pr_body_header: '# Combined Dependabot PRs ➡️📦⬅️'

- name: Enable auto-merge for Dependabot PRs
if: ${{ steps.combine-prs.outputs.pr_url }}
run: gh pr merge --auto --squash --subject "$PR_TITLE" "$PR_URL"
env:
PR_URL: ${{ steps.combine-prs.outputs.pr_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_TITLE: '[dependency]: Combine dependabot PRs'
1 change: 1 addition & 0 deletions .gitlintmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
miscellaneous
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "_symbol"]
path = _symbol
url = https://github.com/symbol/symbol.git
branch = dev
9 changes: 9 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defaultCiPipeline {
// First OS is the default for CI
operatingSystem = ['ubuntu']
instanceSize = 'medium'

environment = 'python'

packageId = 'miscellaneous-scripts'
}
1 change: 1 addition & 0 deletions _symbol
Submodule _symbol added at 170332
9 changes: 9 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -ex

git submodule update --init
git -C _symbol config core.sparseCheckout true
echo 'jenkins/*' >>.git/modules/_symbol/info/sparse-checkout
echo 'linters/*' >>.git/modules/_symbol/info/sparse-checkout
git submodule update --force --checkout _symbol
1 change: 1 addition & 0 deletions jenkins
1 change: 1 addition & 0 deletions linters
3 changes: 0 additions & 3 deletions linters/python/.pycodestyle

This file was deleted.

Loading

0 comments on commit 1ba573f

Please sign in to comment.