maintenance dockerfile, v0.0.2, publish maintenance
This commit is contained in:
parent
f7b0c44939
commit
004180fae7
150
.github/workflows/publish.yml
vendored
150
.github/workflows/publish.yml
vendored
@ -1,64 +1,3 @@
|
||||
#name: CD
|
||||
#
|
||||
#on:
|
||||
# push:
|
||||
# branches: [ master ]
|
||||
#
|
||||
#jobs:
|
||||
# build:
|
||||
# name: Build and push docker images
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
# with:
|
||||
# submodules: recursive
|
||||
#
|
||||
# - name: Build neo4j image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# repository: ocelotsocialnetwork/develop-neo4j
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# tags: latest
|
||||
# path: Ocelot-Social/neo4j/
|
||||
# - name: Build backend base image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# repository: ocelotsocialnetwork/develop-backend
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# tags: build-and-test
|
||||
# target: build-and-test
|
||||
# path: Ocelot-Social/backend/
|
||||
# - name: Build webapp base image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# repository: ocelotsocialnetwork/develop-webapp
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# tags: build-and-test
|
||||
# target: build-and-test
|
||||
# path: Ocelot-Social/webapp/
|
||||
#
|
||||
# - name: Build backend customized image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# repository: ocelotsocialnetwork/develop-backend
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# tags: latest
|
||||
# path: backend/
|
||||
# - name: Build webapp customized image
|
||||
# uses: docker/build-push-action@v1.1.0
|
||||
# with:
|
||||
# repository: ocelotsocialnetwork/develop-webapp
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# tags: latest
|
||||
# path: webapp/
|
||||
|
||||
|
||||
name: ocelot.social publish branded CI
|
||||
|
||||
on:
|
||||
@ -142,42 +81,41 @@ jobs:
|
||||
path: /tmp/webapp-branded.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: DOCKER BUILD PRODUCTION MAINTENANCE ###################################
|
||||
###############################################################################
|
||||
#build_production_maintenance:
|
||||
# name: Docker Build Production - Maintenance
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [prepare]
|
||||
# steps:
|
||||
# ##########################################################################
|
||||
# # CHECKOUT CODE ##########################################################
|
||||
# ##########################################################################
|
||||
# - name: Checkout code
|
||||
# uses: actions/checkout@v2
|
||||
# ##########################################################################
|
||||
# # SET ENVS ###############################################################
|
||||
# ##########################################################################
|
||||
# - name: ENV - VERSION
|
||||
# run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
# - name: ENV - BUILD_DATE
|
||||
# run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
# - name: ENV - BUILD_VERSION
|
||||
# run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
# - name: ENV - BUILD_COMMIT
|
||||
# run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
# ##########################################################################
|
||||
# # BUILD MAINTENANCE DOCKER IMAGE (build) #################################
|
||||
# ##########################################################################
|
||||
# - name: maintenance | Build `production` image
|
||||
# # TODO: --target production
|
||||
# run: |
|
||||
# docker build -t "ocelotsocialnetwork/maintenance:latest" -t "ocelotsocialnetwork/maintenance:${VERSION}" -t "ocelotsocialnetwork/maintenance:${BUILD_VERSION}" webapp/ -f webapp/Dockerfile.maintenance
|
||||
# docker save "ocelotsocialnetwork/maintenance" > /tmp/maintenance.tar
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: docker-maintenance-production
|
||||
# path: /tmp/maintenance.tar
|
||||
# JOB: DOCKER BUILD BRANDED MAINTENANCE ######################################
|
||||
##############################################################################
|
||||
build_branded_maintenance:
|
||||
name: Docker Build Branded - Maintenance
|
||||
runs-on: ubuntu-latest
|
||||
#needs: [nothing]
|
||||
steps:
|
||||
##########################################################################
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
##########################################################################
|
||||
# SET ENVS ###############################################################
|
||||
##########################################################################
|
||||
- name: ENV - VERSION
|
||||
run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
|
||||
- name: ENV - BUILD_DATE
|
||||
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
|
||||
- name: ENV - BUILD_VERSION
|
||||
run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||
- name: ENV - BUILD_COMMIT
|
||||
run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV
|
||||
##########################################################################
|
||||
# BUILD MAINTENANCE DOCKER IMAGE (build) #################################
|
||||
##########################################################################
|
||||
- name: maintenance | Build `branded` image
|
||||
run: |
|
||||
docker build --target branded -t "ocelotsocialnetwork/maintenance-branded:latest" -t "ocelotsocialnetwork/maintenance-branded:${VERSION}" -t "ocelotsocialnetwork/maintenance-branded:${BUILD_VERSION}" -f maintenance.Dockerfile .
|
||||
docker save "ocelotsocialnetwork/maintenance-branded" > /tmp/maintenance-branded.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: docker-maintenance-branded
|
||||
path: /tmp/maintenance-branded.tar
|
||||
|
||||
##############################################################################
|
||||
# JOB: UPLOAD TO DOCKERHUB ###################################################
|
||||
@ -212,13 +150,13 @@ jobs:
|
||||
path: /tmp
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/webapp-branded.tar
|
||||
#- name: Download Docker Image (Maintenance)
|
||||
# uses: actions/download-artifact@v2
|
||||
# with:
|
||||
# name: docker-maintenance-production
|
||||
# path: /tmp
|
||||
#- name: Load Docker Image
|
||||
# run: docker load < /tmp/maintenance.tar
|
||||
- name: Download Docker Image (Maintenance)
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: docker-maintenance-branded
|
||||
path: /tmp
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/maintenance-branded.tar
|
||||
##########################################################################
|
||||
# Upload #################################################################
|
||||
##########################################################################
|
||||
@ -228,8 +166,8 @@ jobs:
|
||||
run: docker push --all-tags ocelotsocialnetwork/backend-branded
|
||||
- name: Push webapp
|
||||
run: docker push --all-tags ocelotsocialnetwork/webapp-branded
|
||||
#- name: Push maintenance
|
||||
# run: docker push --all-tags ocelotsocialnetwork/maintenance
|
||||
- name: Push maintenance
|
||||
run: docker push --all-tags ocelotsocialnetwork/maintenance-branded
|
||||
|
||||
##############################################################################
|
||||
# JOB: GITHUB TAG LATEST VERSION #############################################
|
||||
|
||||
8
maintenance.Dockerfile
Normal file
8
maintenance.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
##################################################################################
|
||||
# BRANDED ########################################################################
|
||||
##################################################################################
|
||||
FROM ocelotsocialnetwork/maintenance:latest as branded
|
||||
|
||||
# Copy public constants to the docker image branding it
|
||||
COPY static/ static/
|
||||
COPY constants/ constants/
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ocelot-social-branded",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "Ocelot Social Branded",
|
||||
"author": "ocelot.social Community",
|
||||
"license": "MIT",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user