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

Commit

Permalink
Merge pull request #287 from threefoldtech/development_release_improv…
Browse files Browse the repository at this point in the history
…ements

imporve release process
  • Loading branch information
Omarabdul3ziz authored Feb 14, 2023
2 parents 6669f79 + ee8e5a1 commit c320a25
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Go
name: Build and lint the source code

on:
push:
Expand Down
56 changes: 29 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
name: Release workflow
name: Create and publish a Docker image

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
buildAndPush:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Checkout the repo
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/threefoldtech/gridproxy
tags: |
type=semver,pattern={{version}}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 0 additions & 36 deletions .goreleaser.yaml

This file was deleted.

23 changes: 11 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM docker.io/golang:alpine as builder

ARG YGG_VERSION=v0.4.7
ENV CGO_ENABLED=0

WORKDIR /src

ENV CGO_ENABLED=0

RUN apk add git

RUN git clone --depth 1 --branch $YGG_VERSION https://github.com/yggdrasil-network/yggdrasil-go.git .
RUN ./build && go build -o /src/genkeys cmd/genkeys/main.go

RUN git clone https://github.com/threefoldtech/tfgridclient_proxy && cd tfgridclient_proxy/cmds/proxy_server &&\
CGO_ENABLED=0 GOOS=linux go build -ldflags "-w -s -X main.GitCommit=$(shell git describe --tags --abbrev=0) -extldflags '-static'" -o server &&\
chmod +x server

RUN git clone https://github.com/threefoldtech/rmb_go && cd rmb_go/cmds/msgbusd &&\
CGO_ENABLED=0 GOOS=linux go build -ldflags '-w -s -extldflags "-static"' -o msgbusd &&\
chmod +x msgbusd

FROM alpine:3.14

Expand All @@ -18,20 +25,12 @@ RUN apk --update add redis
COPY --from=builder /src/yggdrasil /usr/bin/yggdrasil
COPY --from=builder /src/yggdrasilctl /usr/bin/yggdrasilctl
COPY --from=builder /src/genkeys /usr/bin/genkeys


RUN wget https://github.com/threefoldtech/go-rmb/releases/download/v0.2.1/msgbusd && \
mv msgbusd /usr/bin/msgbusd &&\
chmod +x /usr/bin/msgbusd
COPY --from=builder /src/tfgridclient_proxy/cmds/proxy_server/server /usr/bin/server
COPY --from=builder /src/rmb_go/cmds/msgbusd/msgbusd /usr/bin/msgbusd

RUN wget https://github.com/threefoldtech/zinit/releases/download/v0.2.10/zinit -O /sbin/zinit \
&& chmod +x /sbin/zinit

RUN wget https://github.com/threefoldtech/tfgridclient_proxy/releases/download/v1.7.0-rc1/tfgridclient_proxy_1.7.0-rc1_linux_amd64.tar.gz \
&& tar -xzf tfgridclient_proxy_1.7.0-rc1_linux_amd64.tar.gz \
&& chmod +x server \
&& mv server /usr/bin/server

COPY ygg_entrypoint.sh /etc/ygg_entrypoint.sh
RUN chmod +x /etc/ygg_entrypoint.sh
COPY rootfs /
Expand Down
48 changes: 0 additions & 48 deletions Dockerfile.release

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,10 @@ docker run --name gridproxy -e MNEMONICS="" -e SUBSTRATE="wss://tfchain.dev.grid
```bash
helm install gridproxy/gridproxy
```

## Release
- Update the `appVersion` in `charts/Chart.yaml`. (push, open PR, merge)
- Draft new release with [Github UI Releaser](https://github.com/threefoldtech/tfgridclient_proxy/releases/new)
- In the tags dropdown menu write the new tag `appVersion` and create it.
- Generate release notes
- Mark as release or pre-release and publish
2 changes: 1 addition & 1 deletion charts/gridproxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ version: 1.1.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.7.0-rc1
appVersion: v1.7.0-rc1
4 changes: 2 additions & 2 deletions charts/gridproxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
replicaCount: 1

image:
repository: threefolddev/gridproxy
repository: ghcr.io/threefoldtech/gridproxy
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v1.7.0-rc1"
# tag: "v1.7.0-rc1"

env:
- name: "MNEMONICS"
Expand Down
Binary file removed gridproxy-1.1.0.tgz
Binary file not shown.
14 changes: 0 additions & 14 deletions index.yaml

This file was deleted.

0 comments on commit c320a25

Please sign in to comment.