Skip to content

Commit

Permalink
Merge pull request #65 from zowe/struga0258-patch-1
Browse files Browse the repository at this point in the history
Automate releasing app-server component
  • Loading branch information
1000TurquoisePogs authored Jul 14, 2021
2 parents a0195d8 + 35feea7 commit 6a83a47
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
49 changes: 49 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the staging branch
push:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2


- name: Login Jfrog
uses: docker/login-action@v1
with:
registry: zowe-docker-snapshot.jfrog.io
username: ${{ secrets.ARTIFACTORY_USERNAME }}
password: ${{ secrets.ARTIFACTORY_PASSWORD }}



- name: build and push image
run: |
cd container
chmod +x *.sh
./pull-zowe-install-artifacts.sh
./download-zlux.sh
cd files
IMAGE_VERSION=$(grep -Po '"version": *\K"[^"]*"' manifest.json | head -n1)
IMAGE_VERSION=`echo $IMAGE_VERSION | sed 's/.\(.*\)/\1/' | sed 's/\(.*\)./\1/'`
cd ..
./build.sh
docker tag zowe-docker-snapshot.jfrog.io/ompzowe/app-server:testing zowe-docker-snapshot.jfrog.io/ompzowe/app-server:$IMAGE_VERSION
docker push zowe-docker-snapshot.jfrog.io/ompzowe/app-server:$IMAGE_VERSION
2 changes: 1 addition & 1 deletion container/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

mkdir -p logs
docker pull node:12
docker build --pull -f Dockerfile.zlux --no-cache --progress=plain -t ompzowe/app-server:testing . 2>&1 | tee logs/docker-build.log
docker build --pull -f Dockerfile.zlux --no-cache --progress=plain -t zowe-docker-snapshot.jfrog.io/ompzowe/app-server:testing . 2>&1 | tee logs/docker-build.log

0 comments on commit 6a83a47

Please sign in to comment.