forked from msp-eagle/print
-
Notifications
You must be signed in to change notification settings - Fork 0
Mec dev #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MuralitharanK
wants to merge
13
commits into
mec_dev_1.2
Choose a base branch
from
mec_dev
base: mec_dev_1.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mec dev #1
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1ab9ead
MEC
Manoprabamp 98242f5
MEC Card Print Service Updated
trialblazerseee 5706123
MEC Card Print Service Updated
trialblazerseee 88b8519
MEC Card Print Service Updated
trialblazerseee 0310d2a
MEC - 12 - Card Print Service Updated
trialblazerseee 54c7b2e
Update manual_push_trigger.yml
trialblazerseee b1c1ac7
Update manual_push_trigger.yml
trialblazerseee 7e0f8d5
Update manual_push_trigger.yml
trialblazerseee 98de534
Update manual_push_trigger.yml
trialblazerseee a8d7b00
MEC - 12 - Card Printer Integration
trialblazerseee 665290d
MEC - 12 - Card Printer Integration
trialblazerseee 9638e59
MEC - 12 - Card Printer Integration
trialblazerseee 636a435
Merge pull request #1 from iiitb-pilot/mec_dev
trialblazerseee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| name: Manual trigger for maven install | ||
|
|
||
| on: workflow_dispatch | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| env: | ||
| NAMESPACE: ${{ secrets.dev_namespace_docker_hub }} | ||
| SERVICE_NAME: card-print | ||
| SERVICE_LOCATION: ./ | ||
|
|
||
| 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 env | ||
| run: | | ||
| # Strip git ref prefix from version | ||
| echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV | ||
| echo "GPG_TTY=$(tty)" >> $GITHUB_ENV | ||
|
|
||
| - name: Setup branch and GPG public key | ||
| run: | | ||
| # Strip git ref prefix from version | ||
| echo ${{ env.BRANCH_NAME }} | ||
| 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 ./ | ||
| mvn clean install -U -s $GITHUB_WORKSPACE/settings.xml -DskipTests -Dgpg.skip=true --file pom.xml | ||
|
|
||
| - name: Removing target jars | ||
| run: | | ||
| rm -rf $(find -name '*.jar' ! -executable -type f) | ||
|
|
||
| - 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix undefined property reference.
Line 72 references
${{steps.getPomVersion.outputs.info}}, but there is no step with idgetPomVersiondefined in this workflow. This will cause the workflow to fail or use an empty string.🔎 Proposed fix
Either remove the unused echo statement referencing the undefined property:
- 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_NAMEOr add the missing step to extract version from pom.xml if needed.
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.9)
67-67: property "getpomversion" is not defined in object type {}
(expression)
🤖 Prompt for AI Agents