Skip to content

Commit

Permalink
Merge branch 'master' into external-MR
Browse files Browse the repository at this point in the history
  • Loading branch information
Jellby committed Dec 5, 2019
2 parents 67d06e1 + b1c9e0a commit 7e05469
Show file tree
Hide file tree
Showing 46 changed files with 2,181 additions and 602 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ENV/
.cache
*.egg-info
.coverage
.pytest_cache

# nix stuff
result
result-*
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ services:
language: nix
deploy:
provider: script
script: make dockerize && make docker-push
script: make dockerize && make docker-push VERSION="$TRAVIS_BRANCH"
on:
repo: smarkets/marge-bot
tags: true
condition: "$TRAVIS_TAG = $(cat version)"
all_branches: true
condition: "$TRAVIS_BRANCH = $(cat version) || $TRAVIS_BRANCH = master"
env:
global:
# smarkets ci docker username
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
* 0.9.1:
- Feature: support passing a timezone with the embargo #228
- Fix: fix not checking the target project for MRs from forked projects #218
* 0.9.0:
- Feature: support rebasing through GitLab's API #160
- Feature: allow restrict source branches #206
- Fix: only fetch projects with min access level #166
- Fix: bump all dependencies (getting rid of vulnerable packages) #179
- Fix: support multiple assignees #186, #192
- Fix: fetch pipelines by merge request instead of branch #212
- Fix: fix unassign when author is Marge #211
- Enhancement: ignore archived projects #177
- Enhancement: add a timeout to all gitlab requests #200
- Enhancement: smaller docker image size #199
* 0.8.1
- Feature: allow merging in order of last-update time #149
* 0.8.0
- Feature: allow reference repository in git clone #129
- Feature: add new stable/master tags for docker images #142
- Fix: fix TypeError when fetching source project #122
- Fix: handle CI status 'skipped' #127
- Fix: handle merging when source branch is master #127
- Fix: handle error on pushing to protected branches #127
- Enhancement: add appropriate error if unresolved discussions on merge request #136
- Enhancement: ensure reviewer and commit author aren't the same #137
* 0.7.0:
- Feature: add `--batch` to better support repos with many daily MRs and slow-ish CI (#84, #116)
- Fix: fix fuse() call when using experimental --use-merge-strategy to update source branch #102
- Fix: Get latest CI status of a commit filtered by branch #96 (thanks to benjamb)
- Enhancement: Check MR is mergeable before accepting MR #117
* 0.6.1:
- Fix when target SHA is retrieved #92.
- Replace word "gitlab" with "GitLab" #93.
Expand Down
48 changes: 32 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
requirements_frozen.txt requirements.nix requirements_override.nix: requirements.txt
pypi2nix -V 3.6 -r $^
VERSION?=$$(git rev-parse --abbrev-ref HEAD)

.PHONY: all
all: requirements_frozen.txt requirements.nix requirements_override.nix default.nix
nix-build -K .
all: requirements_frozen.txt requirements.nix requirements_override.nix marge-bot dockerize

.PHONY: marge-bot
marge-bot:
nix-build --keep-failed --attr marge-bot default.nix

.PHONY: clean
clean:
rm -rf .cache result requirements_frozen.txt
rm -rf .cache result result-* requirements_frozen.txt

.PHONY: bump
bump: bump-requirements bump-sources

.PHONY: bump-sources
bump-sources:
nix-shell --run niv update

.PHONY: bump-requirements
bump-requirements: clean requirements_frozen.txt

.PHONY: dockerize
dockerize: dockerize.nix
docker load --input $$(nix-build dockerize.nix)
requirements_frozen.txt requirements.nix requirements_override.nix: requirements.txt
pypi2nix -V 3.6 -r $^

.PHONY: dockerize
dockerize:
docker load --input $$(nix-build --attr docker-image default.nix)

.PHONY: docker-push
docker-push:
if [ -n "$$DOCKER_USERNAME" -a -n "$$DOCKER_PASSWORD" ]; then \
docker login -u "$${DOCKER_USERNAME}" -p "$${DOCKER_PASSWORD}"; \
docker login -u "$${DOCKER_USERNAME}" -p "$${DOCKER_PASSWORD}"; \
else \
docker login; \
docker login; \
fi
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:$(VERSION)
if [ "$(VERSION)" = "$$(cat version)" ]; then \
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:latest; \
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:stable; \
docker push smarkets/marge-bot:stable; \
docker push smarkets/marge-bot:latest; \
fi
docker tag smarkets/marge-bot:$$(cat version) smarkets/marge-bot:latest
docker push smarkets/marge-bot:$$(cat version)
docker push smarkets/marge-bot:latest
docker push smarkets/marge-bot:$(VERSION)
# for backwards compatibility push to previous location
docker tag smarkets/marge-bot:latest smarketshq/marge-bot:latest
docker tag smarkets/marge-bot:latest smarketshq/marge-bot:$$(cat version)
docker push smarketshq/marge-bot:$$(cat version)
docker tag smarkets/marge-bot:$$(cat version) smarketshq/marge-bot:latest
docker tag smarkets/marge-bot:$$(cat version) smarketshq/marge-bot:$(VERSION)
docker push smarketshq/marge-bot:$(VERSION)
docker push smarketshq/marge-bot:latest
Loading

0 comments on commit 7e05469

Please sign in to comment.