Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #36 from splunk/test/common-template-changes-for-u…
Browse files Browse the repository at this point in the history
…nit-modinput

test: sync for policy
  • Loading branch information
zahrasidhpuri-crest authored Jan 20, 2021
2 parents 743f64b + 3b63c22 commit bd9f24d
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 45 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ orbs:
command: |
git remote set-url origin https://${GH_USER}:${GH_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git
./semtag <<parameters.tag_level>>
merge-to-master:
merge-to-main:
steps:
- run:
name: Merge
command: |
git remote set-url origin https://${GH_USER}:${GH_TOKEN}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git
git config --global user.email "[email protected]"
git config --global user.name "Add on release service"
git pull origin master
git merge master -m "Merge from master"
git checkout master
git pull origin main
git merge main -m "Merge from main"
git checkout main
git merge develop
git push
jobs:
Expand All @@ -107,11 +107,11 @@ orbs:
- checkout
- tag:
tag_level: <<parameters.tag_level>>
merge-to-master:
merge-to-main:
executor: python37
steps:
- checkout
- merge-to-master
- merge-to-main

jobs:
splunk-app-inspect:
Expand Down Expand Up @@ -635,11 +635,14 @@ workflows:
filters:
branches:
only:
- master
- main
- develop
- release:
requires:
- approval-release
- splunk-app-inspect
- splunk-app-unit-test
- splunk-app-backend-test
context:
- gdi-github
publish:
Expand Down
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/tests"
directory: "/package/lib"
target-branch: "develop"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/package/lib/py2"
target-branch: "develop"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/package/lib/py3"
target-branch: "develop"
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
path-to-signatures: ".github/signatures/version1/cla.json"
path-to-document: "https://github.com/splunk/addonfactory-test-releaseci/blob/main/CLA.md" # e.g. a CLA or a DCO document
# branch should not be protected
branch: "master"
branch: "main"
allowlist: dependabot
#below are the optional inputs - If the optional inputs are not given, then default values will be taken
#remote-organization-name: enter the remote organization name where the signatures should be stored (Default is storing the signatures in the same repository)
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
issue_comment:
types: [created]
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.comment.author_association == 'MEMBER' && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release-Notes-Preview

on:
pull_request:
branches: [master, develop]
branches: [main, develop]
issue_comment:
types: [edited]

Expand All @@ -15,7 +15,7 @@ jobs:
git fetch --unshallow --tags
- uses: snyk/[email protected]
with:
releaseBranch: master
releaseBranch: main
env:
GITHUB_PR_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "deps/apps/Splunk_SA_CIM"]
path = deps/apps/Splunk_SA_CIM
url = [email protected]:splunk/addonfactory-splunk_sa_cim.git
[submodule "deps/apps/splunk_env_indexer"]
path = deps/apps/splunk_env_indexer
url = [email protected]:splunk/addonfactory-splunk_env_indexer.git
2 changes: 2 additions & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3.7.8
2.7.18
2 changes: 1 addition & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
branches:
- "+([0-9])?(.{+([0-9]),x}).x"
- master
- main
- name: develop
channel: beta
prerelease: true
Expand Down
1 change: 0 additions & 1 deletion deps/apps/splunk_env_indexer
Submodule splunk_env_indexer deleted from b40bb6
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ services:
environment:
- SPLUNK_PASSWORD=${SPLUNK_PASSWORD}
- SPLUNK_HEC_TOKEN=${SPLUNK_HEC_TOKEN}
- SPLUNK_START_ARGS=--accept-license
- SPLUNK_START_ARGS=--accept-license
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[pytest]
norecursedirs = .git .venv venv build deps tests/deps node_modules package
addopts = -v --tb=long
--splunk-data-generator=tests/data
--splunk-data-generator=tests/knowledge
--splunk-type=docker
--sc4s-host=sc4s
-n 1
Expand Down
8 changes: 4 additions & 4 deletions semtag
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Commands:
getcurrent Returns the current version, based on the latest one, if there are uncommited or
unstaged changes, they will be reflected in the version, adding the number of
pending commits, current branch and commit hash.
final Tags the current build as a final version, this only can be done on the master branch.
final Tags the current build as a final version, this only can be done on the main branch.
candidate Tags the current build as a release candidate, the tag will contain all
the commits from the last final version.
alpha Tags the current build as an alpha version, the tag will contain all
Expand Down Expand Up @@ -533,7 +533,7 @@ function get_current {
else
local __buildinfo="$(git rev-parse --short HEAD)"
local __currentbranch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$__currentbranch" != "master" ]; then
if [ "$__currentbranch" != "main" ]; then
__buildinfo="$__currentbranch.$__buildinfo"
fi

Expand Down Expand Up @@ -582,10 +582,10 @@ case $ACTION in
;;
final)
init
diff=$(git diff master | cat)
diff=$(git diff main | cat)
if [ "$forcetag" == "false" ]; then
if [ -n "$diff" ]; then
echo "ERROR: Branch must be updated with master for final versions"
echo "ERROR: Branch must be updated with main for final versions"
exit 1
fi
fi
Expand Down
23 changes: 0 additions & 23 deletions splver.py

This file was deleted.

1 change: 1 addition & 0 deletions tests/knowledge/test_addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
class Test_App(Basic):
def empty_method(self):
pass

0 comments on commit bd9f24d

Please sign in to comment.