diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..f5c088fb --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +### Thank you for making MicroK8s better + +Please reference the issue this PR is fixing, or provide a description of the problem addressed. + +*Also verify you have:* +* [ ] Read the [contributions](https://github.com/ubuntu/microk8s/blob/master/CONTRIBUTING.md) page. +* [ ] Submitted the [CLA form](https://ubuntu.com/legal/contributors/agreement), if you are a first time contributor. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..a9953cb6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..b602baed --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,60 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 330 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 30 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - pinned + - security + - "[Status] Maybe Later" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: false + +# Label to use when marking as stale +staleLabel: inactive + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +# Comment to post when removing the stale label. +# unmarkComment: > +# Your comment here. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed diff --git a/.github/workflows/build-snap.yml b/.github/workflows/build-snap.yml new file mode 100644 index 00000000..8b0e4bbf --- /dev/null +++ b/.github/workflows/build-snap.yml @@ -0,0 +1,52 @@ +name: Build snap on PR and push to master + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Create snap package + runs-on: ubuntu-20.04 + + steps: + - name: Checking out repo + uses: actions/checkout@v2 + - name: Install lxd + run: | + sudo lxd init --auto + sudo usermod --append --groups lxd $USER + sg lxd -c 'lxc version' + - name: Install snapcraft + run: sudo snap install snapcraft --classic + - name: Build snap + run: | + sg lxd -c 'snapcraft --use-lxd' + sudo mv k8s-dqlite*.snap k8s-dqlite.snap + - name: Uploading snap + uses: actions/upload-artifact@v1 + with: + name: .snap + path: k8s-dqlite.snap + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DO NOT FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADDRESSED! + - name: Running test + run: | + set -x + sudo snap install k8s-dqlite.snap --classic --dangerous + sudo snap install go --channel 1.16/stable --classic + sudo apt install git + git clone https://github.com/etcd-io/etcd.git + cd etcd + git checkout release-3.5 + cd tools/benchmark + go build . + ./benchmark --endpoints http://127.0.0.1:12379 range asd + sudo snap remove k8s-dqlite --purge