Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pipeline {
agent any

stages {
stage('Build') {
steps {
script {
def imageName = "my-docker-image"
def imageTag = "${env.BUILD_NUMBER}"

// Build the Docker image
sh "docker build -t ${imageName}:${imageTag} ."
}
}
}
}
}
29 changes: 29 additions & 0 deletions .github/workflows/jenkinstogithub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'

- name: Build and test
run: |
./gradlew clean build

- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: jar
path: build/libs/*.jar
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
FROM node:latest as node
WORKDIR /app
COPY . .
RUN npm install -g @angular/cli
RUN npm install
RUN npm run build --prod
RUN ng build --prod

# stage 2
FROM nginx:alpine
COPY --from=node /app/dist/angular-app /usr/share/nginx/html
COPY --from=node /app/dist/angular-app /usr/share/nginx/html