github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/.gitlab-ci.yml (about)

     1  stages:
     2    - prepare
     3    - test
     4    - pre-release
     5    - build
     6    - release-snapshot
     7    - release-tag
     8    - post-release
     9  
    10  variables:
    11    BUILD_COMMIT: $CI_COMMIT_SHORT_SHA
    12    BUILD_BRANCH: $CI_COMMIT_REF_NAME
    13    BUILD_BRANCH_SAFE: $CI_COMMIT_REF_SLUG
    14    BUILD_TAG: $CI_COMMIT_TAG
    15    BUILD_NUMBER: $CI_PIPELINE_ID
    16    GITHUB_OWNER: mysteriumnetwork
    17    GITHUB_REPO: node
    18    GITHUB_SNAPSHOT_REPO: node-builds
    19  
    20    GO_PACKAGE: github.com/mysteriumnetwork/node
    21    GIT_CLONE_PATH: /home/gitlab-runner/go/src/$GO_PACKAGE
    22    GOFLAGS: "-count=1" # Supersedes GOCACHE=off, see: https://github.com/golang/go/issues/29378#issuecomment-449383809
    23  
    24  before_script:
    25    # load vars generated by prepare:env
    26    - source build/env.sh
    27    - echo "${DOCKERHUB_PASSWORD}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin || true
    28  
    29  after_script:
    30    # docker based jobs leave files owned by root
    31    - sudo chown -R gitlab-runner:gitlab-runner $GOPATH
    32  
    33  env:
    34    stage: prepare
    35    tags: [go]
    36    artifacts:
    37      paths: [build/env.sh]
    38    before_script:
    39      - ''
    40    script: go run mage.go -v GenerateEnvFile
    41  
    42  checks:
    43    stage: test
    44    tags: [go]
    45    retry: 2
    46    script:
    47      - go run mage.go -v Check
    48  
    49  test:
    50    stage: test
    51    tags: [go]
    52    retry: 2
    53    script:
    54      - go run mage.go -v TestWithCoverage
    55      - touch $CI_PROJECT_DIR/success
    56    after_script:
    57      - |
    58        if [ -e success ]; then
    59          bash <(curl -s https://codecov.io/bash)
    60        fi
    61  
    62  test-e2e-basic:
    63    stage: test
    64    tags: [go,high_performance]
    65    retry: 2
    66    script: go run mage.go -v TestE2EBasic
    67  
    68  test-e2e-nat:
    69    stage: test
    70    tags: [go,high_performance]
    71    retry: 2
    72    script: go run mage.go -v TestE2ENAT
    73  
    74  # with the new payments, we're making a breaking change, so no compatibility for now
    75  # test-e2e-compatibility:
    76  #   stage: test
    77  #   tags: [go,high_performance]
    78  #   script: go run mage.go -v TestE2ECompatibility
    79  
    80  #test-install-script:
    81  #  stage: test
    82  #  tags: [go,dedicated]
    83  #  script: go run mage.go -v TestInstallScript
    84  #  only:
    85  #    - master
    86  
    87  create-bucket:
    88    stage: pre-release
    89    tags: [go]
    90    script: go run mage.go -v MakeBucket
    91  
    92  package:linux-amd64:
    93    stage: build
    94    tags: [go]
    95    script: go run mage.go -v PackageLinuxAmd64
    96  
    97  package:linux-arm:
    98    stage: build
    99    tags: [go]
   100    script: go run mage.go -v PackageLinuxArm
   101  
   102  package:linux-debian-amd64:
   103    stage: build
   104    tags: [go]
   105    script: go run mage.go -v PackageLinuxDebianAmd64
   106  
   107  package:linux-debian-arm:
   108    stage: build
   109    tags: [go]
   110    script: go run mage.go -v PackageLinuxDebianArm
   111  
   112  package:linux-debian-armv6l:
   113    stage: build
   114    tags: [go]
   115    script: go run mage.go -v PackageLinuxDebianArmv6l
   116  
   117  package:linux-debian-arm64:
   118    stage: build
   119    tags: [go]
   120    script: go run mage.go -v PackageLinuxDebianArm64
   121  
   122  package:linux-raspberry-image:
   123    stage: build
   124    tags: [go,high_performance]
   125    script: go run mage.go -v PackageLinuxRaspberryImage
   126  
   127  package:macos-amd64:
   128    stage: build
   129    tags: [go]
   130    script: go run mage.go -v PackageMacOSAmd64
   131  
   132  package:macos-arm64:
   133    stage: build
   134    tags: [go]
   135    script: go run mage.go -v PackageMacOSArm64
   136  
   137  package:windows-amd64:
   138     stage: build
   139     tags: [go]
   140     script: go run mage.go -v PackageWindowsAmd64
   141  
   142  package:android:
   143    stage: build
   144    tags: [go]
   145    script: go run mage.go -v PackageAndroid
   146  
   147  package:android-provider:
   148    stage: build
   149    tags: [go]
   150    script: go run mage.go -v PackageAndroidProvider
   151  
   152  package:swagger-redoc-docker:
   153    stage: build
   154    tags: [go]
   155    script: go run mage.go -v PackageDockerSwaggerRedoc
   156  
   157  release-snapshot:release:
   158    stage: release-snapshot
   159    tags: [go]
   160    script: go run mage.go -v ReleaseGithubSnapshot
   161  
   162  release-snapshot:docker:
   163    stage: release-snapshot
   164    tags: [go]
   165    script: go run mage.go -v ReleaseDockerSnapshot
   166  
   167  release-snapshot:debian-ppa:
   168    stage: release-snapshot
   169    tags: [go]
   170    retry: 2
   171    script: go run mage.go -v ReleaseDebianPPASnapshot
   172    only:
   173      - master
   174  
   175  release-snapshot:goreport:
   176    stage: release-snapshot
   177    tags: [go]
   178    retry: 2
   179    script: bin/release_goreport
   180    only:
   181      - master
   182  
   183  release-nightly:node:
   184    stage: release-snapshot
   185    tags: [go]
   186    script: go run mage.go -v ReleaseGithubNightly
   187    only:
   188      - master
   189  
   190  
   191  release-tag:release:
   192    stage: release-tag
   193    tags: [go]
   194    script: go run mage.go -v ReleaseGithubTag
   195  
   196  release-tag:docker:
   197    stage: release-tag
   198    tags: [go,high_performance]
   199    script: go run mage.go -v ReleaseDockerTag
   200  
   201  release-tag:debian-ppa:
   202    stage: release-tag
   203    tags: [go]
   204    script: go run mage.go -v ReleaseDebianPPAPreRelease
   205  
   206  release-tag:android-sdk:
   207    stage: release-tag
   208    tags: [go]
   209    script: go run mage.go -v ReleaseAndroidSDK
   210  
   211  release-tag:android-provider-sdk:
   212    stage: release-tag
   213    tags: [go]
   214    script: go run mage.go -v ReleaseAndroidProviderSDK
   215  
   216  remove-bucket:
   217    stage: post-release
   218    tags: [go]
   219    script: go run mage.go -v RemoveBucket
   220  
   221  notify-uptimerobot:
   222    stage: post-release
   223    tags: [go]
   224    script:
   225      - |
   226        if [ "$NIGHTLY_BUILD" = "1" -o "$NIGHTLY_BUILD" = "T" -o "$NIGHTLY_BUILD" = "true" -o "$NIGHTLY_BUILD" = "True" -o "$NIGHTLY_BUILD" = "TRUE" ]; then
   227          curl -so /dev/null -I "$NIGHTLY_UPTIMEROBOT"
   228        fi
   229    only:
   230      - master
   231  
   232  pr-avado:
   233    stage: post-release
   234    tags: [go]
   235    script: go run mage.go -v CreateAvadoPR