-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from FZJ-INM1-BDA/fsdavid-patch-1
Upload to docker pipeline for staging
- Loading branch information
Showing
11 changed files
with
239 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: '[docker image] - Staging' | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
# do not rebuild if... | ||
paths-ignore: | ||
# use_docs (use_docs are built on readthedocs any way) | ||
- 'use_docs/*' | ||
|
||
jobs: | ||
build-docker-img: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERIMG: voluba:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Setup tags' | ||
run: | | ||
DOCKER_IMGSTREAM=${{ secrets.EBRAINS_DOCKER_REG_VOLUBA_NSP }}/${{ env.DOCKERIMG }} | ||
echo "Setting docker image stream to $DOCKER_IMGSTREAM" | ||
echo "DOCKER_IMGSTREAM=$DOCKER_IMGSTREAM" >> $GITHUB_ENV | ||
- name: 'Set matomo env var' | ||
run: | | ||
echo "Using github.ref: $GITHUB_REF" | ||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo "MATOMO_URL=${{ secrets.MATOMO_URL_PROD }}" >> $GITHUB_ENV | ||
echo "MATOMO_ID=${{ secrets.MATOMO_ID_PROD }}" >> $GITHUB_ENV | ||
- name: 'Set version variable & expmt feature flag' | ||
run: | | ||
GIT_HASH=$(git rev-parse --short HEAD) | ||
echo "Setting GIT_HASH: $GIT_HASH" | ||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV | ||
# VERSION=$(jq -r '.version' package.json) | ||
# echo "Setting VERSION: $VERSION" | ||
# echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
# VUE_APP_ENABLE_EXPERIMENTAL_FEATURES="{}" | ||
- name: 'Build docker image' | ||
run: | | ||
echo "Building $DOCKER_IMGSTREAM" | ||
docker build \ | ||
--build-arg MATOMO_URL=$MATOMO_URL \ | ||
--build-arg MATOMO_ID=$MATOMO_ID \ | ||
--build-arg VUE_APP_BACKEND_URL=${{ secrets.VUE_APP_BACKEND_URL }} \ | ||
--build-arg VUE_APP_UPLOAD_URL=${{ secrets.VUE_APP_UPLOAD_URL }} \ | ||
-t $DOCKER_IMGSTREAM \ | ||
. | ||
echo "Successfully built $DOCKER_IMGSTREAM" | ||
- name: 'Push to docker registry' | ||
run: | | ||
echo "Login to docker registry" | ||
docker login \ | ||
-u '${{ secrets.EBRAINS_DOCKER_REG_USER }}' \ | ||
-p '${{ secrets.EBRAINS_DOCKER_REG_TOKEN }}' \ | ||
docker-registry.ebrains.eu | ||
echo "Pushing $DOCKER_IMGSTREAM" | ||
docker push $DOCKER_IMGSTREAM |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: '[docker image]' | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
# do not rebuild if... | ||
paths-ignore: | ||
# use_docs (use_docs are built on readthedocs any way) | ||
- 'use_docs/*' | ||
|
||
jobs: | ||
build-docker-img: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKERIMG: voluba:latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Setup tags' | ||
run: | | ||
DOCKER_IMGSTREAM=${{ secrets.EBRAINS_DOCKER_REG_VOLUBA_NSP }}/${{ env.DOCKERIMG }} | ||
echo "Setting docker image stream to $DOCKER_IMGSTREAM" | ||
echo "DOCKER_IMGSTREAM=$DOCKER_IMGSTREAM" >> $GITHUB_ENV | ||
- name: 'Set matomo env var' | ||
run: | | ||
echo "Using github.ref: $GITHUB_REF" | ||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo "MATOMO_URL=${{ secrets.MATOMO_URL_PROD }}" >> $GITHUB_ENV | ||
echo "MATOMO_ID=${{ secrets.MATOMO_ID_PROD }}" >> $GITHUB_ENV | ||
- name: 'Set version variable & expmt feature flag' | ||
run: | | ||
GIT_HASH=$(git rev-parse --short HEAD) | ||
echo "Setting GIT_HASH: $GIT_HASH" | ||
echo "GIT_HASH=$GIT_HASH" >> $GITHUB_ENV | ||
# VERSION=$(jq -r '.version' package.json) | ||
# echo "Setting VERSION: $VERSION" | ||
# echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
# VUE_APP_ENABLE_EXPERIMENTAL_FEATURES="{}" | ||
- name: 'Build docker image' | ||
run: | | ||
echo "Building $DOCKER_IMGSTREAM" | ||
docker build \ | ||
--build-arg MATOMO_URL=$MATOMO_URL \ | ||
--build-arg MATOMO_ID=$MATOMO_ID \ | ||
--build-arg VUE_APP_BACKEND_URL=${{ secrets.VUE_APP_BACKEND_URL }} \ | ||
--build-arg VUE_APP_UPLOAD_URL=${{ secrets.VUE_APP_UPLOAD_URL }} \ | ||
-t $DOCKER_IMGSTREAM \ | ||
. | ||
echo "Successfully built $DOCKER_IMGSTREAM" | ||
- name: 'Push to docker registry' | ||
run: | | ||
echo "Login to docker registry" | ||
docker login \ | ||
-u '${{ secrets.EBRAINS_DOCKER_REG_USER }}' \ | ||
-p '${{ secrets.EBRAINS_DOCKER_REG_TOKEN }}' \ | ||
docker-registry.ebrains.eu | ||
echo "Pushing $DOCKER_IMGSTREAM" | ||
docker push $DOCKER_IMGSTREAM |
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
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
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
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
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
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
Oops, something went wrong.