~poldi1405/BackUploader

0330db26cd4222f5b5f1e0e581324c01df74a45c — Moritz Poldrack 2 years ago f637940
setup mirroring to GitHub
3 files changed, 15 insertions(+), 110 deletions(-)

A .build.yml
D .github/workflows/go.yml
D Jenkinsfile
A .build.yml => .build.yml +15 -0
@@ 0,0 1,15 @@
image: alpine/edge
packages:
  - git
secrets:
  - a4a77b05-94e0-443c-9408-b2d81f7263fe
  - b15309e0-8156-44c8-aa7c-58c0f0b7d503
shell: false
sources:
- https://git.sr.ht/~poldi1405/glog
tasks:
  - mirror-to-github: |
      git clone --mirror https://git.sr.ht/~poldi1405/BackUploader/
      cd BackUploader.git
      git for-each-ref --format 'delete %(refname)' refs/pull | git update-ref --stdin
      git push --mirror git@github.com:mpldr/BackUploader.git

D .github/workflows/go.yml => .github/workflows/go.yml +0 -28
@@ 1,28 0,0 @@
name: Go
on: [push, pull_request]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Set up Go 1.13
      uses: actions/setup-go@v1
      with:
        go-version: 1.13
      id: go

    - name: Check out code into the Go module directory
      uses: actions/checkout@v2

    - name: Get dependencies
      run: |
        go get -v -t -d ./...
        if [ -f Gopkg.toml ]; then
            curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
            dep ensure
        fi

    - name: Build
      run: make build

D Jenkinsfile => Jenkinsfile +0 -82
@@ 1,82 0,0 @@
pipeline {
  agent any
  stages {
    stage('Linux64') {
      parallel {
        stage('Linux64') {
          environment {
            GOOS = 'linux'
            GOARCH = 'amd64'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(onlyIfSuccessful: true, artifacts: 'BackUploader.linux.amd64', caseSensitive: true)
          }
        }

        stage('Linux32') {
          environment {
            GOOS = 'linux'
            GOARCH = '386'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(artifacts: 'BackUploader.linux.386', caseSensitive: true, onlyIfSuccessful: true)
          }
        }

        stage('LinuxARM') {
          environment {
            GOOS = 'linux'
            GOARCH = 'arm'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(artifacts: 'BackUploader.linux.arm', caseSensitive: true, onlyIfSuccessful: true)
          }
        }

        stage('Windows64') {
          environment {
            GOOS = 'windows'
            GOARCH = 'amd64'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(artifacts: 'BackUploader.windows.amd64.exe', caseSensitive: true, onlyIfSuccessful: true)
          }
        }

        stage('OSX64') {
          environment {
            GOOS = 'darwin'
            GOARCH = 'amd64'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(artifacts: 'BackUploader.darwin.amd64', caseSensitive: true, onlyIfSuccessful: true)
          }
        }

        stage('OSX32') {
          environment {
            GOOS = 'darwin'
            GOARCH = '386'
          }
          steps {
            sh '''make prepare
make jenkins'''
            archiveArtifacts(caseSensitive: true, artifacts: 'BackUploader.darwin.386', onlyIfSuccessful: true)
          }
        }

      }
    }

  }
}