Skip to content

Commit 14dc2d3

Browse files
committed
Add pipeline to publish gem
Signed-off-by: Lance Albertson <lance@osuosl.org>
1 parent 1e1d669 commit 14dc2d3

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

.gitlab-ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
image: cincproject/omnibus-debian
3+
4+
stages:
5+
- publish
6+
7+
publish-gems:
8+
stage: publish
9+
# Only run if this is triggered from the web
10+
rules:
11+
- if: $CI_PIPELINE_SOURCE == "web"
12+
when: on_success
13+
- when: never
14+
tags:
15+
- docker-x86_64
16+
script:
17+
- bash publish-gems.sh

publish-gems.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash -e
2+
#
3+
# Author:: Lance Albertson <lance@osuosl.org>
4+
# Copyright:: Copyright 2020-2025, Cinc Project
5+
# License:: Apache License, Version 2.0
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
19+
export PATH="/opt/omnibus-toolchain/embedded/bin/:${PATH}"
20+
21+
source /home/omnibus/load-omnibus-toolchain.sh
22+
set -x
23+
gem build chef-cli.gemspec
24+
VERSION="$(cat VERSION)"
25+
gem push chef-cli-${VERSION}.gem --host https://rubygems.cinc.sh

0 commit comments

Comments
 (0)