-
Notifications
You must be signed in to change notification settings - Fork 3
Home
eldesh edited this page Jul 13, 2022
·
10 revisions
Welcome to the gatekeeper wiki!
- Read official document
- Put your API token to
~/.cargo/credentials
- Make a release branch
- Bump up version
- Update
Cargo.toml > version
-
cargo build
(updatingCargo.lock
)
- Update
- Check test passing
$ cargo build $ cargo doc $ cargo test # expensive test $ docker-compose build $ docker-compose up -d $ cargo test -- --ignored
- Build and push latest docker image
- on ARMv7 machine:
$ cd /path/to/gatekeeper $ git checkout release/x.y.z && git pull origin release/x.y.z $ docker build -t idein/gatekeeper:latest-arm32v6 -f Dockerfile.arm32v6 . $ docker push idein/gatekeeper:latest-arm32v6 $ docker build -t idein/gatekeeper:latest-arm32v7 -f Dockerfile.arm32v7 . $ docker push idein/gatekeeper:latest-arm32v7
- on ARMv7 machine:
- Check docker image working
- on ARMv6 machine:
$ docker pull idein/gatekeeper:latest-arm32v6 && docker run -itd --rm --network=host --userns=host --name=gatekeeper idein/gatekeeper:latest-arm32v6 && sleep 3 && curl -LI google.com --proxy socks5h://127.0.0.1:1080 && docker stop gatekeeper
- on ARMv7 machine:
$ docker pull idein/gatekeeper:latest-arm32v7 && docker run -itd --rm --network=host --userns=host --name=gatekeeper idein/gatekeeper:latest-arm32v7 && sleep 3 && curl -LI google.com --proxy socks5h://127.0.0.1:1080 && docker stop gatekeeper
- on ARMv6 machine:
- Check packaging passing
$ cargo package
- Push the branch
$ git push release/x.y.z
- Make a pull request
- Merge the pull request
- Sync to master
$ git checkout master $ git pull origin/master
- Add a new tag like
vX.Y.Z
$ git tag vX.Y.Z $ git push origin vX.Y.Z
- Deploy docker images for
arm32v6
,arm32v7
$ ssh <Raspberry PI> rpi:~$ cd /path/to/gatekeeper rpi:gatekeeper$ git checkout vX.Y.Z rpi:gatekeeper$ MAJOR=X rpi:gatekeeper$ MINOR=Y rpi:gatekeeper$ PATCH=Z rpi:gatekeeper$ echo ${MAJOR}.${MINOR}.${PATCH} rpi:gatekeeper$ TARGET=arm32v6 rpi:gatekeeper$ docker build -t idein/gatekeeper:${MAJOR}-${TARGET} -t idein/gatekeeper:${MAJOR}.${MINOR}-${TARGET} -t idein/gatekeeper:${MAJOR}.${MINOR}.${PATCH}-${TARGET} -f Dockerfile.${TARGET} . rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}-${TARGET} rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}.${MINOR}-${TARGET} rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}.${MINOR}.${PATCH}-${TARGET} rpi:gatekeeper$ TARGET=arm32v7 rpi:gatekeeper$ docker build -t idein/gatekeeper:${MAJOR}-${TARGET} -t idein/gatekeeper:${MAJOR}.${MINOR}-${TARGET} -t idein/gatekeeper:${MAJOR}.${MINOR}.${PATCH}-${TARGET} -f Dockerfile.${TARGET} . rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}-${TARGET} rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}.${MINOR}-${TARGET} rpi:gatekeeper$ docker push idein/gatekeeper:${MAJOR}.${MINOR}.${PATCH}-${TARGET}
- Update Readme of the docker image on hub.docker.com:idein/gatekeeper.
- Clone to the new working directory
$ git clone file:///home/idein/gatekeeper newkeeper $ cd newkeeper $ git checkout vX.Y.Z
- Packaging (at new working dir)
newkeeper$ cargo package
- Calm down
(This is subtly different from
newkeeper$ cargo publish --dry-run
cargo package
) - Publish (at new working dir)
newkeeper$ cargo publish
- Add owner (only for the 1st time)
newkeeper$ cargo owner --add github:Idein:Engineers
- 🎉