Skip to content

Commit

Permalink
Merge pull request #153 from mrceyhun/f-gh-update
Browse files Browse the repository at this point in the history
Add nats-sub dcoker image gh action
  • Loading branch information
vkuznet authored Jun 30, 2022
2 parents 5cee056 + fca44e3 commit a8f7814
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build-nats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build

on:
push:
tags:
- 'go-*.*.*'

jobs:
build:
name: Build nats-sub
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '^1.18'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Get git tag
id: get_tag
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}

- name: Build nats-sub docker image
run: |
echo Image tag: ${{ steps.get_tag.outputs.tag }}
curl -ksLO https://raw.githubusercontent.com/dmwm/CMSKubernetes/master/docker/nats-sub/Dockerfile
sed -i -e "s,ENV CMSMON_TAG=.*,ENV CMSMON_TAG=${{steps.get_tag.outputs.tag}},g" Dockerfile
docker build . --tag docker.pkg.github.com/dmwm/nats-sub/nats-sub
docker tag docker.pkg.github.com/dmwm/nats-sub/nats-sub registry.cern.ch/cmsmonitoring/nats-sub
- name: Login to registry.cern.ch
uses: docker/login-action@v2
with:
registry: registry.cern.ch
username: ${{ secrets.CERN_LOGIN }}
password: ${{ secrets.CERN_TOKEN }}

- name: Publish nats-sub image to registry.cern.ch
uses: docker/build-push-action@v1
with:
username: ${{ secrets.CERN_LOGIN }}
password: ${{ secrets.CERN_TOKEN }}
registry: registry.cern.ch
repository: cmsmonitoring/nats-sub
tag_with_ref: true
4 changes: 1 addition & 3 deletions .github/workflows/build-rucio-mon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ name: Build
on:
push:
tags:
- 'go-*.*.*'
paths:
- 'src/go/rucio-dataset-mon-go/**'
- 'rgo-*.*.*'

jobs:
build:
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ infrastructure.

### Git Workflows

- On tag `go-*.*.*`
- On tag :whale: `go-*.*.*` :rocket:
- Builds go executables and release `cmsmon-tools`
- Builds `cmsmonitoring/cmsmonit-int` docker image and push to registry.cern.ch
- Builds `cmsmonitoring/cmsmonit-alert` docker image and push to registry.cern.ch
- On tag `sqoop-*.*.*`
- Builds `cmsmonitoring/nats-sub` docker image and push to registry.cern.ch
- On tag :whale: `rgo-*.*.*` :rocket:
- Builds `cmsmonitoring/cmsmon-rucio-ds-web` docker image using `src/go/rucio-dataset-mon-go`
- On tag :whale: `sqoop-*.*.*` :rocket:
- Builds `cmsmonitoring/sqoop` docker image and push to registry.cern.ch
- Syntax check on special conditions
- Check validations of json and yaml files only that kind of files are changed

0 comments on commit a8f7814

Please sign in to comment.