-
Notifications
You must be signed in to change notification settings - Fork 32
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 #519 from linear-b/new-gitlab-workflow
Simplified GitLab workflow
- Loading branch information
Showing
2 changed files
with
11 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
# Code generated by gitStream - DO NOT EDIT | ||
stages: | ||
- gitstream-main | ||
image: docker:latest | ||
services: | ||
- docker:dind | ||
before_script: | ||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY | ||
|
||
gitstream-job: | ||
stage: gitstream-main | ||
image: gitstream/rules-engine:latest | ||
only: | ||
variables: | ||
- $GITSTREAM_MAIN_JOB | ||
except: | ||
variables: | ||
- $GITSTREAM_BLOCK_MERGE | ||
script: | ||
- apk update && apk add git && apk add docker | ||
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}${repoUrl} gitstream/repo | ||
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}${cmUrl} gitstream/cm | ||
- cd gitstream && cd repo && git fetch --all && git checkout $base_ref && git pull && ls && git checkout $head_ref && git pull && ls | ||
- docker pull gitstream/rules-engine:latest | ||
- apk update && apk add git | ||
- mkdir /code | ||
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}${repoUrl} /code/repo | ||
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}${cmUrl} /code/cm | ||
- cd /code && cd repo && git fetch --all && git checkout $base_ref && git pull && ls && git checkout $head_ref && git pull && ls | ||
- | | ||
docker run -v $CI_PROJECT_DIR/gitstream:/code \ | ||
-e HEAD_REF=$head_ref \ | ||
-e BASE_REF=$base_ref \ | ||
-e CLIENT_PAYLOAD="$client_payload" \ | ||
-e RULES_RESOLVER_URL=$resolver_url \ | ||
-e RULES_RESOLVER_TOKEN=$resolver_token \ | ||
-e DEBUG_MODE=true gitstream/rules-engine:latest | ||
HEAD_REF=$head_ref BASE_REF=$base_ref CLIENT_PAYLOAD="$client_payload" RULES_RESOLVER_URL=$resolver_url \ | ||
RULES_RESOLVER_TOKEN=$resolver_token DEBUG_MODE=true npm run start |