forked from dfinity/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (42 loc) · 1.16 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
before_script:
- set -euo pipefail
- 'command -v ssh-agent >/dev/null'
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
- chmod 700 ~/.ssh/id_ed25519
- ssh-add ~/.ssh/id_ed25519
- ssh-keyscan -H github.com >> ~/.ssh/known_hosts
- rm ~/.ssh/id_ed25519
- mkdir -p $CI_JOB_STAGE/$CI_JOB_NAME
# Run SDK tests against the upstream repo.
#
# Typically this job is triggered from an upstream pipeline in the upstream
# repo, but this job can still be run manually from within the GitLab pipeline UI.
#
# The following variables indicate which branch and commit in the upstream repo to run
# the SDK tests against.
#
# SDK_TEST_BRANCH_NAME:
# The branch name in the dfinity repo.
# SDK_TEST_COMMIT_SHA:
# The git commit hash.
#
sdk_test:
stage: test
tags:
- cd
rules:
# Only trigger this job from upstream pipelines or manual execution
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
- if: '$CI_PIPELINE_SOURCE == "web"'
when: manual
script:
./scripts/run_sdk_test.sh
artifacts:
when: always
paths:
- $CI_JOB_STAGE/$CI_JOB_NAME
stages:
- test