mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-22 16:56:40 -06:00
inline docker push
This commit is contained in:
parent
a3fe784a4a
commit
f649cc68cb
39
.github/workflows/dockerhub.yml
vendored
39
.github/workflows/dockerhub.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: dockerhub
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
|
||||
docker_push:
|
||||
|
||||
name: docker_push
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
name: checkout nosqlbench
|
||||
- uses: actions/setup-java@v1
|
||||
name: setup java
|
||||
with:
|
||||
java-version: '14'
|
||||
java-package: jdk
|
||||
architecture: x64
|
||||
|
||||
- name: Cache Maven packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.m2
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-m2
|
||||
|
||||
- name: mvn package
|
||||
run: mvn package -DskipTests
|
||||
|
||||
- name: Push to Docker Hub
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: nosqlbench/nosqlbench
|
||||
tag_with_ref: true
|
28
.github/workflows/dockerpub.yml
vendored
28
.github/workflows/dockerpub.yml
vendored
@ -1,28 +0,0 @@
|
||||
name: dockerpub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: master
|
||||
paths:
|
||||
- 'RELEASENOTES.**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Login to DockerHub Registry
|
||||
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
|
||||
- name: Get the version
|
||||
id: vars
|
||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
|
||||
- name: Build the tagged Docker image
|
||||
run: docker build ./nb/ --file Dockerfile --tag nosqlbench/nosqlbench:${{steps.vars.outputs.tag}}
|
||||
- name: Push the tagged Docker image
|
||||
run: docker push nosqlbench/nosqlbench:${{steps.vars.outputs.tag}}
|
||||
- name: Build the latest Docker image
|
||||
run: docker build ./nb/ --file Dockerfile --tag nosqlbench/nosqlbench:latest
|
||||
- name: Push the latest Docker image
|
||||
run: docker push nosqlbench/nosqlbench:latest
|
||||
|
73
.github/workflows/release.yml
vendored
73
.github/workflows/release.yml
vendored
@ -9,8 +9,12 @@ jobs:
|
||||
release:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
|
||||
- name: checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: setup java
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: '14'
|
||||
java-package: jdk
|
||||
@ -21,7 +25,7 @@ jobs:
|
||||
env:
|
||||
GIT_RELEASE_BOT_NAME: "nb-droid"
|
||||
|
||||
- name: capture tty
|
||||
- name: capture tty for gpg
|
||||
run: |
|
||||
echo "::set-env name=TTY::"$(tty)
|
||||
echo "::set-env name=GPG_TTY::"$(tty)
|
||||
@ -37,6 +41,7 @@ jobs:
|
||||
|
||||
- name: set git username
|
||||
run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||
|
||||
- name: set git email
|
||||
run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||
|
||||
@ -69,7 +74,7 @@ jobs:
|
||||
echo "::set-env name=RELEASE_VERSION::${RELEASE_VERSION}"
|
||||
echo "::set-env name=RELEASE_TAGNAME::${RELEASE_TAGNAME}"
|
||||
|
||||
- name: Prepare Summary
|
||||
- name: prepare release summary
|
||||
id: prepare_summary
|
||||
run: |
|
||||
summary=$(scripts/release-notes.sh)
|
||||
@ -111,25 +116,37 @@ jobs:
|
||||
MAVEN_REPO_SERVER_USERNAME: ${{ secrets.MVN_REPO_PRIVATE_REPO_USER }}
|
||||
MAVEN_REPO_SERVER_PASSWORD: ${{ secrets.MVN_REPO_PRIVATE_REPO_PASSWORD }}
|
||||
|
||||
|
||||
- name: upload artifacts
|
||||
- name: bundle artifacts
|
||||
run: |
|
||||
pwd
|
||||
ls -l
|
||||
mkdir staging && cp nb/target/nb.jar nb/target/nb staging
|
||||
- uses: actions/upload-artifact@v1
|
||||
|
||||
- name: upload artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: binaries
|
||||
path: staging
|
||||
|
||||
- name: upload guidebook
|
||||
- name: docker push
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
repository: nosqlbench/nosqlbench
|
||||
tags: latest, ${{ env.RELEASE_VERSION }}
|
||||
tag_with_ref: false
|
||||
|
||||
- name: bundle guidebook
|
||||
run: mkdir guidebook && cp -R nb/target/guidebook guidebook
|
||||
- uses: actions/upload-artifact@v1
|
||||
|
||||
- name: upload guidebook
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: guidebook
|
||||
path: guidebook
|
||||
|
||||
- name: Create Release
|
||||
- name: create release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
@ -140,7 +157,8 @@ jobs:
|
||||
draft: false
|
||||
prerelease: false
|
||||
body: ${{ steps.prepare_summary.outputs.release_summary }}
|
||||
- name: Upload nb.jar
|
||||
|
||||
- name: upload nb.jar
|
||||
id: upload-nb-jar
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
@ -150,7 +168,8 @@ jobs:
|
||||
asset_path: nb/target/nb.jar
|
||||
asset_name: nb.jar
|
||||
asset_content_type: application/octet-stream
|
||||
- name: Upload nb
|
||||
|
||||
- name: upload nb binary
|
||||
id: upload-nb-binary
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
@ -161,43 +180,25 @@ jobs:
|
||||
asset_name: nb
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
# - name: find latest release
|
||||
# run: |
|
||||
# LATEST_GH_RELEASE_ID=$(curl --silent "https://api.github.com/repos/nosqlbench/nosqlbench/releases/latest" | jq -r .id)
|
||||
# echo "::set-env name=LATEST_GH_RELEASE_ID::${LATEST_GH_RELEASE_ID}"
|
||||
# - name: upload jar
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# asset_path: nb/target/nb.jar
|
||||
# asset_name: nb.jar
|
||||
# asset_content_type: application/octet-stream
|
||||
# upload_url: https://uploads.github.com/repos/nosqlbench/nosqlbench/releases/${{ env.LATEST_GH_RELEASE_ID }}/assets{?name,label}
|
||||
# - name: upload binary
|
||||
# uses: actions/upload-release-asset@v1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# asset_path: nb/target/nb
|
||||
# asset_name: nb
|
||||
# asset_content_type: application/octet-stream
|
||||
# upload_url: https://uploads.github.com/repos/nosqlbench/nosqlbench/releases/${{ env.LATEST_GH_RELEASE_ID }}/assets{?name,label}
|
||||
|
||||
docs:
|
||||
needs: release
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
|
||||
- name: set git username
|
||||
run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||
|
||||
- name: set git email
|
||||
run: git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
||||
|
||||
- name: download guidebook
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: guidebook
|
||||
path: guidebook
|
||||
|
||||
- run: ls -la
|
||||
|
||||
- name: clone nosqlbench-docs
|
||||
env:
|
||||
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
|
||||
@ -209,6 +210,7 @@ jobs:
|
||||
find .
|
||||
git remote set-url origin https://${{secrets.NBDROID_NAME}}:${{secrets.NBDROID_TOKEN}}@github.com/nosqlbench/nosqlbench-docs.git
|
||||
git remote -v
|
||||
|
||||
- name: push changes
|
||||
env:
|
||||
NBDROID_NAME: ${{ secrets.NBDROID_NAME }}
|
||||
@ -229,4 +231,3 @@ jobs:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -8,3 +8,5 @@ d0ae1dd2 (origin/master, origin/HEAD) updated release notes
|
||||
3c29a80d updated release notes
|
||||
08489c55 Update docker ci on trigger
|
||||
0877afc8 testing dockerhub
|
||||
14f6f9b4 update release notes
|
||||
55b21edc streamline docker publish
|
||||
|
Loading…
Reference in New Issue
Block a user