Skip to content

Commit

Permalink
Merge pull request #3277 from Opetushallitus/remove-maven-npm
Browse files Browse the repository at this point in the history
TOR-2277 Poista mavenin manageroima node ja käytä järjestelmän versiota
  • Loading branch information
a544jh authored Jan 16, 2025
2 parents 53f1388 + 0fd717c commit 2e0175e
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 95 deletions.
5 changes: 5 additions & 0 deletions .github/actions/build_koski/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ runs:
if: steps.lookup.outputs.cache-hit != 'true'
with:
ref: ${{ inputs.commithash }}
- name: Setup Node
if: steps.lookup.outputs.cache-hit != 'true'
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
- name: Set up Java 11
if: steps.lookup.outputs.cache-hit != 'true'
uses: actions/setup-java@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/run_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -186,7 +186,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_security_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/valpas_performance_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
architecture: "x64"
distribution: "zulu"

- name: Setup Node 16
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.17.0"
Expand Down
143 changes: 59 additions & 84 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -396,83 +396,6 @@
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<executions>
<execution>
<id>koski - install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<nodeVersion>v20.17.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm version</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>--version</arguments>
</configuration>
</execution>
<execution>
<id>koski - npm ci</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>koski - npm build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>web</workingDirectory>
<arguments>run build:prod</arguments>
</configuration>
</execution>
<execution>
<id>valpas - install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<nodeVersion>v20.17.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>valpas - npm ci</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<arguments>ci</arguments>
</configuration>
</execution>
<execution>
<id>valpas - npm build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<arguments>run build:prod</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand Down Expand Up @@ -556,25 +479,77 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>Create buildversion.txt</id>
<id>koski - npm ci</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>web</workingDirectory>
<executable>npm</executable>
<arguments>
<argument>ci</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>koski - npm build</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<executable>bash</executable>
<commandlineArgs>scripts/create-buildversion.sh
${basedir}/target/webapp/buildversion.txt ${project.version}</commandlineArgs>
<workingDirectory>web</workingDirectory>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build:prod</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>Run a main class from command line</id>
<id>valpas - npm ci</id>
<goals>
<goal>java</goal>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<executable>npm</executable>
<arguments>
<argument>ci</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>valpas - npm build</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<workingDirectory>valpas-web</workingDirectory>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build:prod</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>Create buildversion.txt</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>bash</executable>
<commandlineArgs>scripts/create-buildversion.sh
${basedir}/target/webapp/buildversion.txt ${project.version}</commandlineArgs>
</configuration>
</execution>
</executions>
<configuration>
Expand Down

0 comments on commit 2e0175e

Please sign in to comment.