-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from daystram/dev
- Loading branch information
Showing
7 changed files
with
248 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Nightly | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
image: | ||
name: Publish Image | ||
environment: Development | ||
runs-on: Ubuntu-20.04 | ||
env: | ||
APPLICATION: cut | ||
strategy: | ||
matrix: | ||
service: [be, fe] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Set Development Version | ||
run: echo "RELEASE_VERSION=v0.0.0-development" >> $GITHUB_ENV | ||
- name: Provide Env File | ||
run: | | ||
echo "${{ secrets.FE_ENV_FILE }}" > ${{ env.APPLICATION }}-${{ matrix.service }}/.env.production | ||
echo "VUE_APP_VERSION=${{ env.RELEASE_VERSION }}" >> ${{ env.APPLICATION }}-${{ matrix.service }}/.env.production | ||
- name: Build and Push Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ${{ env.APPLICATION }}-${{ matrix.service }} | ||
platforms: linux/amd64 | ||
tags: daystram/${{ env.APPLICATION }}:${{ matrix.service }}-dev | ||
push: true | ||
chart: | ||
name: Publish Helm Chart | ||
environment: Development | ||
runs-on: Ubuntu-20.04 | ||
container: daystram/k8s-tools:latest | ||
needs: [image] | ||
env: | ||
APPLICATION: cut | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Set Development Version | ||
run: echo "RELEASE_VERSION=v0.0.0-development" >> $GITHUB_ENV | ||
- name: Initialize Git Credentials | ||
run: | | ||
git config --global user.name "${{ secrets.BOTDAYSTRAM_NAME }}" | ||
git config --global user.email "${{ secrets.BOTDAYSTRAM_EMAIL }}" | ||
mkdir -p /root/.ssh && echo "${{ secrets.BOTDAYSTRAM_KEY_FILE }}" > /root/.ssh/id_rsa.github && chmod 600 /root/.ssh/id_rsa.github | ||
cat >> /etc/ssh/ssh_config <<EOF | ||
Host github.com | ||
HostName github.com | ||
IdentityFile /root/.ssh/id_rsa.github | ||
IdentitiesOnly yes | ||
StrictHostKeyChecking no | ||
EOF | ||
echo "${{ secrets.KUBECONFIG_FILE }}" > $KUBECONFIG && chmod 700 $KUBECONFIG | ||
- name: Build and Deploy Chart | ||
run: | | ||
eval `ssh-agent -s` | ||
git clone ssh://git@github.com/daystram/helm-charts.git | ||
cp -r .daystram helm-charts/docs/ | ||
cd helm-charts/docs/ | ||
curl -sfL https://charts.daystram.com/build.sh | sh -s - ${{ env.APPLICATION }} ${{ env.RELEASE_VERSION }} | ||
rm -rf .daystram/ | ||
git add . | ||
git commit -m "feat: added chart for ${{ env.APPLICATION }}@${{ env.RELEASE_VERSION }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Build | ||
on: push | ||
jobs: | ||
build-be: | ||
name: Build cut-be | ||
runs-on: Ubuntu-20.04 | ||
defaults: | ||
run: | ||
working-directory: cut-be | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --all-features --manifest-path cut-be/Cargo.toml | ||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-be | ||
path: | | ||
cut-be/target/release/cut-be | ||
lint-fe: | ||
name: Lint cut-fe | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: cut-fe | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2.1.5 | ||
with: | ||
node-version: 12.x | ||
- name: Install Dependencies | ||
run: yarn install | ||
- name: eslint | ||
run: yarn lint | ||
build-fe: | ||
name: Build cut-fe | ||
runs-on: Ubuntu-20.04 | ||
defaults: | ||
run: | ||
working-directory: cut-fe | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2.1.5 | ||
with: | ||
node-version: 12.x | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build | ||
run: yarn build | ||
- name: Archive Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-fe | ||
path: | | ||
cut-fe/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
image: | ||
name: Publish Image | ||
environment: Production | ||
runs-on: Ubuntu-20.04 | ||
env: | ||
APPLICATION: cut | ||
strategy: | ||
matrix: | ||
service: [be, fe] | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
- name: Get Release Version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Provide Env File | ||
run: | | ||
echo "${{ secrets.FE_ENV_FILE }}" > ${{ env.APPLICATION }}-${{ matrix.service }}/.env.production | ||
echo "VUE_APP_VERSION=${{ env.RELEASE_VERSION }}" >> ${{ env.APPLICATION }}-${{ matrix.service }}/.env.production | ||
- name: Build and Push Image | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ${{ env.APPLICATION }}-${{ matrix.service }} | ||
platforms: linux/amd64 | ||
tags: | | ||
daystram/${{ env.APPLICATION }}:${{ matrix.service }} | ||
daystram/${{ env.APPLICATION }}:${{ matrix.service }}-${{ env.RELEASE_VERSION }} | ||
push: true | ||
chart: | ||
name: Publish Helm Chart | ||
environment: Production | ||
runs-on: Ubuntu-20.04 | ||
container: daystram/k8s-tools:latest | ||
needs: [image] | ||
env: | ||
APPLICATION: cut | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Get Release Version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||
- name: Initialize Git Credentials | ||
run: | | ||
git config --global user.name "${{ secrets.BOTDAYSTRAM_NAME }}" | ||
git config --global user.email "${{ secrets.BOTDAYSTRAM_EMAIL }}" | ||
mkdir -p /root/.ssh && echo "${{ secrets.BOTDAYSTRAM_KEY_FILE }}" > /root/.ssh/id_rsa.github && chmod 600 /root/.ssh/id_rsa.github | ||
cat >> /etc/ssh/ssh_config <<EOF | ||
Host github.com | ||
HostName github.com | ||
IdentityFile /root/.ssh/id_rsa.github | ||
IdentitiesOnly yes | ||
StrictHostKeyChecking no | ||
EOF | ||
echo "${{ secrets.KUBECONFIG_FILE }}" > $KUBECONFIG && chmod 700 $KUBECONFIG | ||
- name: Build and Deploy Chart | ||
run: | | ||
eval `ssh-agent -s` | ||
git clone ssh://git@github.com/daystram/helm-charts.git | ||
cp -r .daystram helm-charts/docs/ | ||
cd helm-charts/docs/ | ||
curl -sfL https://charts.daystram.com/build.sh | sh -s - ${{ env.APPLICATION }} ${{ env.RELEASE_VERSION }} | ||
rm -rf .daystram/ | ||
git add . | ||
git commit -m "feat: added chart for ${{ env.APPLICATION }}@${{ env.RELEASE_VERSION }}" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
NODE_ENV=development | ||
BASE_URL=localhost | ||
VUE_APP_TITLE=Cut | ||
VUE_APP_CLIENT_ID=client_id_from_ratify_be | ||
VUE_APP_OAUTH_ISSUER=https://ratify.daystram.com | ||
VUE_APP_VERSION=v0.0.0-development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters