Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0617022
add Dockerfile
aimestereo May 21, 2022
0edceff
Add GitHubActions docker build
aimestereo May 21, 2022
e3052b0
parametrize image name
aimestereo May 21, 2022
9471d1e
parametrize image name (2)
aimestereo May 21, 2022
c48c5aa
Make it better
aimestereo May 21, 2022
a59531b
Don't push docker image in PR builds
aimestereo May 21, 2022
ffa473e
fix Dockerfile
aimestereo May 22, 2022
b9cfb51
New script and configs
aimestereo May 22, 2022
9e6d01d
Update documentation
aimestereo May 22, 2022
d682cbb
Docker: use official python:3.10.4-slim
aimestereo May 22, 2022
5295e32
fix ./release script params
aimestereo May 22, 2022
75927f7
fix ci params
aimestereo May 22, 2022
b652d6e
update pre-commit hooks
aimestereo May 22, 2022
2aacf29
lock poetry
aimestereo May 22, 2022
909ce4e
Simplify make targets
aimestereo May 31, 2022
562a9b2
Add shell command to release tools
aimestereo May 31, 2022
7d5167b
Add .gitignore_global inside container
aimestereo May 31, 2022
8993701
Add .ssh inside container
aimestereo May 31, 2022
10a8cc0
Fix set-version
aimestereo May 31, 2022
646f52f
Fix git commin
aimestereo May 31, 2022
f6da23e
SM-3835 release-tool unify docker arguments
aimestereo Jun 2, 2022
85eb63f
Global git config
aimestereo Jun 2, 2022
399e7ac
Allow to skip git fetch
aimestereo Jun 2, 2022
5b8e23e
rename trvis -> ci
aimestereo Jun 2, 2022
64d2139
Fix --skip-git-fetch arg
aimestereo Jun 2, 2022
22fc5af
SM-3835 release-tool add logging
aimestereo Jun 2, 2022
d7be854
Disable some pep formatting rules
aimestereo Jun 2, 2022
62a9e1a
Fix check Github repo
aimestereo Jun 2, 2022
113cfd0
Add example github action
aimestereo Jun 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
44 changes: 44 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI

on:
push:
branches:
- 'master'
# run it during any pull request
pull_request:

jobs:
build-and-push-docker-image:
name: Build Docker image and push to DockerHub
runs-on: ubuntu-latest

steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_LOGIN }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
-
name: Build image and push to Docker Hub
uses: docker/build-push-action@v3
with:
context: .
file: ./docker/Dockerfile
tags: ${{ secrets.DOCKER_HUB_LOGIN }}/${{ secrets.DOCKER_IMAGE_NAME }}:latest
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/master' }}

# GitHubActions cache
cache-from: type=gha
cache-to: type=gha,mode=max
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
34 changes: 19 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
repos:
- repo: https://github.com/ambv/black
rev: stable
- repo: https://github.com/ambv/black
rev: 22.3.0
hooks:
- id: black
language_version: python3.7
- id: black

- repo: https://github.com/timothycrosley/isort
rev: master
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
entry: isort
language: system
types: [python]
- id: isort
args: [ "--profile", "black" ]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.7
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
language_version: python3.7
- id: flake8

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-added-large-files
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
login:
docker login -u $(DOCKER_LOGIN) -p $(DOCKER_TOKEN)

build:
docker build -t statusmoney/release-tool:latest -f docker/Dockerfile .

push:
docker push statusmoney/release-tool:latest

shell:
# to run bash shell inside release-tool docker container
bash examples/release shell
111 changes: 111 additions & 0 deletions README.alternative.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Alternative installation - as a submodule or full installation


> ⚠️ **Not recommended, unless you want to contribute. Use Recommended way to use releaso-tool is [README.md](README.md).**


Table of Contents
=================

* [Alternative installation \- as a submodule or full installation](#alternative-installation---as-a-submodule-or-full-installation)
* [1\. Prerequisites:](#1-prerequisites)
* [1\.1\. Install poetry](#11-install-poetry)
* [1\.2\. Install virtual env manager](#12-install-virtual-env-manager)
* [2\. Initial integration of release\-tool](#2-initial-integration-of-release-tool)
* [3\. Configuration: for each local repository that already has release\-tool integrated as a submodule](#3-configuration-for-each-local-repository-that-already-has-release-tool-integrated-as-a-submodule)
* [3\.1\. Create virtual env](#31-create-virtual-env)
* [3\.2\. Tell git to download submodule](#32-tell-git-to-download-submodule)
* [3\.3\. Install dependencies](#33-install-dependencies)
* [3\.4\. Configure](#34-configure)

Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)

```bash
gh-md-toc README.alternative.md
```


### 1. Prerequisites:

> ⚠️ **Done once per each computer**

#### 1.1. Install poetry

Install [poetry](https://github.com/sdispater/poetry) inside your virtualenv (prone to errors) or in a global python (preferable for python developers)

```shell
pip install poetry==1.0.10
```

#### 1.2. Install virtual env manager

Install virtual env manager that you are comfortable with (like [pyenv](https://github.com/pyenv/pyenv)).

Example:

```shell
brew install pyenv
brew install pyenv-virtualenv

# this version is officially supports MacBook on M1 chipset
pyenv install 3.8.10
```


### 2. Initial integration of release-tool

> ⚠️ **Done only once per repository, scripts and configs are committed to repo**

To start using release-tool in your project, add it as a git submodule.

```shell
# add release tool as a submodule
git submodule add git@github.com:TangleInc/release-tool.git submodules/release_tool

git add submodules/release_tool
git commit -m "Integrate release_tool"
git push
```

### 3. Configuration: for each local repository that already has release-tool integrated as a submodule

> ⚠️ **Done once per each local repository**

#### 3.1. Create virtual env

```shell
cd {{project folder}}

# choose appropriate ENV_NAME, e.g. socialfeed
pyenv virtualenv 3.8.10 {{ENV_NAME}}
pyenv local {{ENV_NAME}}
```

add `.python-version` to `.gitignore`

#### 3.2. Tell git to download submodule

```shell
git submodule update --init
```

#### 3.3. Install dependencies

```shell
# activate virtual env created in previous step
cd submodules/release_tool
poetry install

# return to project folder
cd -
```

#### 3.4. Configure

Configuration is the same as (See [README.md](README.md#2.2-Configuration)).

After configuration, you will be able to use release-tool as follows:

```bash
./release native [command]
```
Loading