Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
soufiane6a committed Apr 30, 2023
0 parents commit 9071c51
Show file tree
Hide file tree
Showing 121 changed files with 8,185 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
.*
secret*
data
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gradlew text eol=lf
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI/CD Workflow for Walt.ID Wallet Kit

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
verify-wrapper:
name: "Verification"
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

gradle:
needs: verify-wrapper
name: "Build"
strategy:
matrix:
# os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v2.1.0
with:
distribution: 'adopt-hotspot'
java-version: '16'
- name: Running gradle build
uses: eskatos/gradle-command-action@v1.3.3
with:
arguments: build --no-daemon
55 changes: 55 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Snapshot release workflow for Walt.ID Wallet Kit

on:
push:
branches:
- master

jobs:
verify-wrapper:
name: "Verification"
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

gradle:
needs: verify-wrapper
name: "Build"
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup java
uses: actions/setup-java@v2.1.0
with:
distribution: 'adopt-hotspot'
java-version: '16'
- name: Running gradle build
uses: eskatos/gradle-command-action@v1.3.3
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
with:
# arguments: build publish --no-daemon
arguments: build --no-daemon
- name: Docker Build and Push SNAPSHOT
uses: philpotisk/github-action-docker-build-push@master
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_FILE: Dockerfile
CONTAINER_TAG: waltid/walletkit:latest
- name: Prepare CD
run: sed "s/_DEFAULT_DEPLOYMENT_/$GITHUB_SHA/g" k8s/deployment-dev.yaml > k8s/deployment_mod.yaml
- name: Continuous deployment
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -n dev -f k8s/deployment_mod.yaml
42 changes: 42 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Snapshot release workflow for Walt.ID Wallet Kit

on:
push:
tags:
- 'v*'

jobs:
verify-wrapper:
name: "Verification"
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

gradle:
needs: verify-wrapper
name: "Build"
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Docker Build and Push SNAPSHOT
uses: philpotisk/github-action-docker-build-push@master
env:
DOCKER_USERNAME: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
DOCKER_FILE: Dockerfile
CONTAINER_TAG: ${{ format('waltid/walletkit:{0}', github.ref_name) }}
- name: Prepare CD
run: sed "s/_DEFAULT_DEPLOYMENT_/$GITHUB_SHA/g; s/_VERSION_TAG_/$GITHUB_REF_NAME/g" k8s/deployment-prod.yaml > k8s/deployment_mod.yaml
- name: Continuous deployment
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
args: apply -n default -f k8s/deployment_mod.yaml
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Intellij
.idea/
*.iml
*.iws
out
data

# Mac
.DS_Store

# Maven
log/
target/
*.log

# Gradle
.gradle
build/
gradle-app.setting
!gradle-wrapper.jar
.gradletasknamecache
**/build/
docker/data
docker/data_
issuers-secret.json
/secret_maven_password.txt
/secret_maven_username.txt

# Env
.*.env
.env
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

Notable changes since the last release of the [walt.id Wallet - Kit](https://github.com/walt-id/waltid-walletkit/).

## [Unreleased]
- https://github.com/walt-id/waltid-walletkit/issues/73
- https://github.com/walt-id/waltid-walletkit/issues/74
- https://github.com/walt-id/waltid-walletkit/issues/78
56 changes: 56 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
### Configuration

# set --build-args SKIP_TESTS=true to use
ARG SKIP_TESTS

# --- dos2unix-env # convert line endings from Windows machines
FROM docker.io/rkimf1/dos2unix@sha256:60f78cd8bf42641afdeae3f947190f98ae293994c0443741a2b3f3034998a6ed as dos2unix-env
WORKDIR /convert
COPY gradlew .
RUN dos2unix ./gradlew

# --- build-env
FROM docker.io/gradle:7.6-jdk as build-env

ARG SKIP_TESTS

WORKDIR /appbuild

COPY . /appbuild

# copy converted Windows line endings files
COPY --from=dos2unix-env /convert/gradlew .

# cache Gradle dependencies
VOLUME /home/gradle/.gradle

RUN if [ -z "$SKIP_TESTS" ]; \
then echo "* Running full build" && gradle -i clean build installDist; \
else echo "* Building but skipping tests" && gradle -i clean installDist -x test; \
fi

# --- opa-env
FROM docker.io/openpolicyagent/opa:0.46.1-static as opa-env

# --- iota-env
FROM docker.io/waltid/waltid_iota_identity_wrapper:latest as iota-env

# --- app-env
FROM docker.io/eclipse-temurin:19 AS app-env

WORKDIR /app

COPY --from=opa-env /opa /usr/local/bin/opa

COPY --from=iota-env /usr/local/lib/libwaltid_iota_identity_wrapper.so /usr/local/lib/libwaltid_iota_identity_wrapper.so
RUN ldconfig

COPY --from=build-env /appbuild/build/install/waltid-walletkit /app/
COPY --from=build-env /appbuild/service-matrix.properties /app/
COPY --from=build-env /appbuild/config /app/config


### Execution
EXPOSE 7000 7001 7002 7003 7004 7010

ENTRYPOINT ["/app/bin/waltid-walletkit"]
Loading

0 comments on commit 9071c51

Please sign in to comment.