NiFi: updated cogstack avsc schema & references II. #328
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docker-elasticsearch-stack | |
on: | |
push: | |
branches: [ master ] | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: [ master ] | |
tags: | |
- 'v*.*.*' | |
release: | |
types: [published] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: ./services/ | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
images: cogstacksystems/cogstack-kibana:latest | |
- uses: actions/checkout@v2 | |
- name: Get and set release version env var | |
id: release_version | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
echo "::set-output name=RELEASE_VERSION::$RELEASE_VERSION" | |
- name: output test | |
run: | | |
echo ${{ env.RELEASE_VERSION }} | |
echo $RELEASE_VERSION | |
- name: set docker release tag name | |
id: set_release_version | |
if: ${{ env.RELEASE_VERSION != 'master' }} | |
run: echo "RELEASE_VERSION=${RELEASE_VERSION#?}" >> $GITHUB_ENV | |
- name: set docker release tag name | |
id: set_release_version_latest | |
if: ${{ env.RELEASE_VERSION == 'master' }} | |
run: echo "RELEASE_VERSION=latest" >> $GITHUB_ENV | |
- name: Output release tag version | |
run: | | |
echo $RELEASE_VERSION | |
- name: Build and push Docker Kibana image | |
uses: docker/build-push-action@v2 | |
with: | |
context : ./services/kibana | |
file : "./services/kibana/Dockerfile_native" | |
allow: network.host | |
github-token: ${{ github.token }} | |
tags: cogstacksystems/cogstack-kibana:${{ env.RELEASE_VERSION }} | |
push: true | |
- name: Build and push Docker Elasticsearch image | |
uses: docker/build-push-action@v2 | |
with: | |
context : ./services/elasticsearch | |
file : "./services/elasticsearch/Dockerfile_native" | |
allow: network.host | |
github-token: ${{ github.token }} | |
tags: cogstacksystems/cogstack-elasticsearch:${{ env.RELEASE_VERSION }} | |
push: true | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |