mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 00:53:23 +08:00
workflow moved to devops
This commit is contained in:
parent
42f6275818
commit
614272e9fc
1 changed files with 0 additions and 117 deletions
117
.github/workflows/test-artifacts.yml
vendored
117
.github/workflows/test-artifacts.yml
vendored
|
@ -1,117 +0,0 @@
|
|||
name: Build artifacts for deployment testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'testing'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push test
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ghcr.io/${{ github.repository }}:testing
|
||||
build-args: version=testing
|
||||
docker-netclient:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push test
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64, linux/arm64
|
||||
file: ./docker/Dockerfile-netclient-multiarch
|
||||
push: true
|
||||
tags: ghcr.io/gravitl/netclient:testing
|
||||
build-args: version=testing
|
||||
netclient:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: build client
|
||||
run: |
|
||||
cd netclient
|
||||
env CGO_ENABLED=0 go build -ldflags="-X 'main.version=testing'" -o build/netclient
|
||||
- name: deploy
|
||||
uses: mdallasanta/ssh-scp-deploy@v1.1.0
|
||||
with:
|
||||
local: ./netclient/build/netclient # Local file path - REQUIRED false - DEFAULT ./
|
||||
remote: /var/www/files/testing/ # Remote file path - REQUIRED false - DEFAULT ~/
|
||||
host: fileserver.clustercat.com # Remote server address - REQUIRED true
|
||||
#port: ${{secrets.PORT}} # Remote server port - REQUIRED false - DEFAULT 22
|
||||
user: root # Remote server user - REQUIRED true
|
||||
#password: ${{secrets.PASSWORD}} # User password - REQUIRED at least one of "password" or "key"
|
||||
key: ${{secrets.TESTING_SSH_KEY}} # Remote server private key - REQUIRED at least one of "password" or "key"
|
||||
#pre_upload: echo "This will be executed before the upload!" # Command to run via ssh before scp upload - REQUIRED false
|
||||
#post_upload: echo "This will be executed after the upload!" # Command to run via ssh after scp upload - REQUIRED false
|
||||
#ssh_options: -o StrictHostKeyChecking=no # A set of ssh_option separated by -o - REQUIRED false - DEFAULT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
|
||||
#scp_options: -v # Flags to use during scp - REQUIRED false - DEFAULT ''
|
||||
netmaker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: build server
|
||||
run:
|
||||
env CGO_ENABLED=1 go build -ldflags="-X 'main.version=testing'" -o build/netmaker
|
||||
- name: deploy
|
||||
uses: mdallasanta/ssh-scp-deploy@v1.1.0
|
||||
with:
|
||||
local: ./build/netmaker # Local file path - REQUIRED false - DEFAULT ./
|
||||
remote: /var/www/files/testing/ # Remote file path - REQUIRED false - DEFAULT ~/
|
||||
host: fileserver.clustercat.com # Remote server address - REQUIRED true
|
||||
#port: ${{secrets.PORT}} # Remote server port - REQUIRED false - DEFAULT 22
|
||||
user: root # Remote server user - REQUIRED true
|
||||
#password: ${{secrets.PASSWORD}} # User password - REQUIRED at least one of "password" or "key"
|
||||
key: ${{secrets.TESTING_SSH_KEY}} # Remote server private key - REQUIRED at least one of "password" or "key"
|
||||
#pre_upload: echo "This will be executed before the upload!" # Command to run via ssh before scp upload - REQUIRED false
|
||||
#post_upload: echo "This will be executed after the upload!" # Command to run via ssh after scp upload - REQUIRED false
|
||||
#ssh_options: -o StrictHostKeyChecking=no # A set of ssh_option separated by -o - REQUIRED false - DEFAULT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
|
||||
#scp_options: -v # Flags to use during scp - REQUIRED false - DEFAULT ''
|
Loading…
Reference in a new issue