Create l.java #1406
Workflow file for this run
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
name: Maven Package upon a push | |
on: | |
pull_request: | |
types: [closed] | |
push: | |
branches: | |
- master | |
- 1.1.* | |
- MOSIP-8545 | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
ref: ${{ github.ref }} | |
java-version: 11 | |
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Setup branch and GPG public key | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
echo "::set-env name=GPG_TTY::$(tty)" | |
echo ${{ env.GPG_TTY }} | |
sudo apt-get --yes install gnupg2 | |
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg | |
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven-${{ env.BRANCH_NAME }} | |
- name: Setup the settings file for ossrh server | |
run: echo "<settings> <servers> <server> <id>ossrh</id> <username>${{secrets.ossrh_user}}</username> <password>${{secrets.ossrh_secret}}</password> </server> </servers> <profiles> <profile> <id>ossrh</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>${{secrets.gpg_secret}}</gpg.passphrase> </properties> </profile> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>releases-repo</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>sonar</id> <properties> <sonar.sources>.</sonar.sources> <sonar.host.url>https://sonarcloud.io</sonar.host.url> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> </profiles> </settings>" > $GITHUB_WORKSPACE/settings.xml | |
- name: Build with Maven | |
run: | | |
cd pre-registration | |
mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml | |
- name: Ready the springboot artifacts | |
run: find -name '*.jar' -executable -type f -exec zip release.zip {} + | |
- name: Upload the springboot jars | |
uses: actions/upload-artifact@v1 | |
with: | |
name: release | |
path: ./release.zip | |
publish_to_nexus: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
ref: ${{ github.ref }} | |
java-version: 11 | |
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Setup branch and GPG public key | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
echo "::set-env name=GPG_TTY::$(tty)" | |
echo ${{ env.GPG_TTY }} | |
sudo apt-get --yes install gnupg2 | |
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg | |
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven-${{ env.BRANCH_NAME }} | |
- name: Setup the settings file for ossrh server | |
run: echo "<settings> <servers> <server> <id>ossrh</id> <username>${{secrets.ossrh_user}}</username> <password>${{secrets.ossrh_secret}}</password> </server> </servers> <profiles> <profile> <id>ossrh</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>${{secrets.gpg_secret}}</gpg.passphrase> </properties> </profile> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>releases-repo</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>sonar</id> <properties> <sonar.sources>.</sonar.sources> <sonar.host.url>https://sonarcloud.io</sonar.host.url> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> </profiles> </settings>" > $GITHUB_WORKSPACE/settings.xml | |
- name: Install xmllint | |
run: | | |
sudo apt-get update | |
sudo apt-get install libxml2-utils | |
- name: Build with Maven | |
run: | | |
cd pre-registration | |
mvn -B package --file pom.xml -s $GITHUB_WORKSPACE/settings.xml | |
- name: Publish the maven package | |
run: | | |
chmod +x ./deploy.sh | |
cd pre-registration && mvn deploy -DskipTests -s $GITHUB_WORKSPACE/settings.xml -f pom.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.access_token }} | |
GPG_TTY: $(tty) | |
- name: Analyze with SonarCloud | |
run: | | |
cd pre-registration | |
mvn -B verify sonar:sonar -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
docker-pre-registration-booking-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-booking-service | |
SERVICE_LOCATION: pre-registration/pre-registration-booking-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-booking-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-application-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-application-service | |
SERVICE_LOCATION: pre-registration/pre-registration-application-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-application-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-login-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-login-service | |
SERVICE_LOCATION: pre-registration/pre-registration-login-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-login-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-batchjob: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-batchjob | |
SERVICE_LOCATION: pre-registration/pre-registration-batchjob | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-batchjob | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-datasync-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-datasync-service | |
SERVICE_LOCATION: pre-registration/pre-registration-datasync-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-datasync-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-demographic-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-demographic-service | |
SERVICE_LOCATION: pre-registration/pre-registration-demographic-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-demographic-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-document-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-document-service | |
SERVICE_LOCATION: pre-registration/pre-registration-document-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-document-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-generateqrcode-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-generateqrcode-service | |
SERVICE_LOCATION: pre-registration/pre-registration-generateqrcode-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-generateqrcode-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-notification-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-notification-service | |
SERVICE_LOCATION: pre-registration/pre-registration-notification-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-notification-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-transliteration-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-transliteration-service | |
SERVICE_LOCATION: pre-registration/pre-registration-transliteration-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-transliteration-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION | |
docker-pre-registration-captcha-service: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
NAMESPACE: mosipdev | |
SERVICE_NAME: pre-registration-captcha-service | |
SERVICE_LOCATION: pre-registration/pre-registration-captcha-service | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v1 | |
with: | |
name: release | |
path: ./ | |
- name: Setup branch name | |
run: | | |
# Strip git ref prefix from version | |
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" | |
echo ${{ env.BRANCH_NAME }} | |
- name: Get version info from pom | |
id: getPomVersion | |
uses: mavrosxristoforos/[email protected] | |
with: | |
xml-file: ./${{ env.SERVICE_LOCATION }}/pom.xml | |
xpath: /*[local-name()="project"]/*[local-name()="version"] | |
- name: Unzip and extract the pre-registration-transliteration-service | |
run: unzip -uj "release.zip" "${{ env.SERVICE_LOCATION }}/target/*" -d "./${{ env.SERVICE_LOCATION }}/target" | |
- name: Build image | |
run: | | |
cd "./${{env.SERVICE_LOCATION}}" | |
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} | |
- name: Log into registry | |
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin | |
- name: Push image | |
run: | | |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME | |
# Change all uppercase to lowercase | |
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | |
echo "push version ${{steps.getPomVersion.outputs.info}}" | |
VERSION=$BRANCH_NAME | |
echo IMAGE_ID=$IMAGE_ID | |
echo VERSION=$VERSION | |
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION | |
docker push $IMAGE_ID:$VERSION |