Skip to content

Commit

Permalink
Merge pull request #519 from linear-b/new-gitlab-workflow
Browse files Browse the repository at this point in the history
Simplified GitLab workflow
  • Loading branch information
PavelLinearB authored May 23, 2024
2 parents d386bb0 + b304f0d commit b3eeb73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# /:\\ gitStream Changelog
All notable changes to this project will be documented in this file.

### 2024.5.06
- **Simplified GitLab workflow file**: Using the image directly instead of docker Dind

### 2024.5.06

- **Reorganized trigger configuration**: Moved the top-level `on` keyword under a new `triggers` keyword to consolidate all trigger settings.
Expand Down
28 changes: 8 additions & 20 deletions docs/downloads/gitlab-ci.yml
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

0 comments on commit b3eeb73

Please sign in to comment.