Skip to content

Commit

Permalink
implement folding for Gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Dec 15, 2019
1 parent 6292988 commit 0de374b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions gitlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DIR_THIS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export TARGET_REPO_PATH=$CI_PROJECT_DIR
export TARGET_REPO_NAME=$CI_PROJECT_NAME
export _FOLDING_TYPE=gitlab

if [ -n "$SSH_PRIVATE_KEY" ]; then
if [ "$CI_DISPOSABLE_ENVIRONMENT" != true ] && ! [ -f /.dockerenv ] ; then
Expand Down
31 changes: 31 additions & 0 deletions industrial_ci/src/folding/gitlab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Copyright (c) 2019, Mathias Lüdtke
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

function ici_start_fold() {
shift
local name=$1; shift
local start=$1; shift
ici_ansi_cleared_line "section_start:${start::-9}:$name"
}

function ici_end_fold() {
shift
local name=$1; shift
shift
local end=$1; shift
ici_ansi_cleared_line "section_end:${end::-9}:$name"
}

0 comments on commit 0de374b

Please sign in to comment.