Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nats-sub dcoker image gh action #153

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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