@@ -16,77 +16,77 @@ variables:
1616# Application building
1717
1818building :
19- stage : build
20- only :
21- - master # Restricts the building to the master branch.
22- - develop # Restricts the building to the develop branch.
23- script :
24- - echo "--Building--"
19+ stage : build
20+ only :
21+ - master # Restricts the building to the master branch.
22+ - develop # Restricts the building to the develop branch.
23+ script :
24+ - echo "--Building--"
2525
26- # npm
26+ # npm
2727
28- - npm install # Installs the dependencies.
28+ - npm install # Installs the dependencies.
2929
30- # Swagger
30+ # Swagger
3131
32- - npm run swagger # Generates the application documentation (Swagger).
32+ - npm run swagger # Generates the application documentation (Swagger).
3333
34- # CodeQL: Directories
34+ # CodeQL: Directories
3535
36- - New-Item -Name "lib" -ItemType "directory" # Creates the lib directory.
37- - cd lib
38- - New-Item -Name "codeql-cli" -ItemType "directory" # Creates the codeql-cli directory.
39- - New-Item -Name "codeql-lib" -ItemType "directory" # Creates the codeql-lib directory.
40- - cd ..
36+ - New-Item -Name "lib" -ItemType "directory" # Creates the lib directory.
37+ - cd lib
38+ - New-Item -Name "codeql-cli" -ItemType "directory" # Creates the codeql-cli directory.
39+ - New-Item -Name "codeql-lib" -ItemType "directory" # Creates the codeql-lib directory.
40+ - cd ..
4141
42- # CodeQL: CLI
42+ # CodeQL: CLI
4343
44- - git clone git@gitlab.unamur.be:denim/codeql-cli-2.13.0.git lib/codeql-cli # Downloads the CodeQL CLI.
45- - ' & ${env:ProgramFiles}\7-Zip\7z.exe x -olib/codeql-cli lib/codeql-cli/codeql-cli.zip' # Unzips the CodeQL CLI.
46- - Remove-Item -Path lib/codeql-cli/codeql-cli.zip
47- # - Move-Item -Path ${env:ProgramFiles}/codeql/codeql-cli -Destination lib/codeql-cli # CodeQL CLI moving to right folder.
44+ - git clone git@gitlab.unamur.be:denim/codeql-cli-2.13.0.git lib/codeql-cli # Downloads the CodeQL CLI.
45+ - ' & ${env:ProgramFiles}\7-Zip\7z.exe x -olib/codeql-cli lib/codeql-cli/codeql-cli.zip' # Unzips the CodeQL CLI.
46+ - Remove-Item -Path lib/codeql-cli/codeql-cli.zip
47+ # - Move-Item -Path ${env:ProgramFiles}/codeql/codeql-cli -Destination lib/codeql-cli # CodeQL CLI moving to right folder.
4848
49- # CodeQL: libraries
49+ # CodeQL: libraries
5050
51- - git clone git@gitlab.unamur.be:denim/codeql-lib-2.13.0.git lib/codeql-lib # Downloads the CodeQL CLI.
52- - ' & ${env:ProgramFiles}\7-Zip\7z.exe x -olib/codeql-lib lib/codeql-lib/codeql-lib.zip' # Unzips the CodeQL CLI.
53- - Remove-Item -Path lib/codeql-lib/codeql-lib.zip
54- # - Move-Item -Path ${env:ProgramFiles}/codeql/codeql-lib -Destination lib/codeql-lib # CodeQL CLI moving to right folder.
51+ - git clone git@gitlab.unamur.be:denim/codeql-lib-2.13.0.git lib/codeql-lib # Downloads the CodeQL CLI.
52+ - ' & ${env:ProgramFiles}\7-Zip\7z.exe x -olib/codeql-lib lib/codeql-lib/codeql-lib.zip' # Unzips the CodeQL CLI.
53+ - Remove-Item -Path lib/codeql-lib/codeql-lib.zip
54+ # - Move-Item -Path ${env:ProgramFiles}/codeql/codeql-lib -Destination lib/codeql-lib # CodeQL CLI moving to right folder.
5555
56- # Environment variables
56+ # Environment variables
5757
58- - New-Item -Name ".env" -ItemType "file" # Creates the environment variables file.
59- - Add-Content .env 'FILE_SYSTEM_SEPARATOR="\"' # Adds the file system separator environment variable for Windows.
60- - New-Item -Name "TEMP" -ItemType "directory" # Creates the temporary working directory for analysis files.
58+ - New-Item -Name ".env" -ItemType "file" # Creates the environment variables file.
59+ - Add-Content .env 'FILE_SYSTEM_SEPARATOR="\"' # Adds the file system separator environment variable for Windows.
60+ - New-Item -Name "TEMP" -ItemType "directory" # Creates the temporary working directory for analysis files.
6161
6262# Unit testing
6363
6464unit-testing :
65- stage : test
66- only :
67- - master # Restricts the unit testing to the master branch.
68- - develop # Restricts the unit testing to the develop branch.
69- variables :
70- GIT_STRATEGY : none # Skips the 'git fetch'.
71- script :
72- - echo "--Unit testing--"
73- - npm run test_unit # Starts the unit testing.
65+ stage : test
66+ only :
67+ - master # Restricts the unit testing to the master branch.
68+ - develop # Restricts the unit testing to the develop branch.
69+ variables :
70+ GIT_STRATEGY : none # Skips the 'git fetch'.
71+ script :
72+ - echo "--Unit testing--"
73+ - npm run test_unit # Starts the unit testing.
7474
7575# Integration testing
7676
7777integration-testing :
78- stage : test
79- only :
80- - master # Restricts the integration testing to the master branch.
81- - develop # Restricts the unit testing to the develop branch.
82- variables :
83- GIT_STRATEGY : none # Skips the 'git fetch'.
84- needs : [ unit-testing ]
85- script :
86- - echo "--Integration testing--"
87- - Set-Content .env 'FILE_SYSTEM_SEPARATOR="/"' # Sets the file system separator environment variable for Linux.
88- - docker-compose up -d # Sets up and starts the docker container via docker-compose started in background.
89- - npm run test_integration # Launches the integration testing.
78+ stage : test
79+ only :
80+ - master # Restricts the integration testing to the master branch.
81+ - develop # Restricts the unit testing to the develop branch.
82+ variables :
83+ GIT_STRATEGY : none # Skips the 'git fetch'.
84+ needs : [unit-testing]
85+ script :
86+ - echo "--Integration testing--"
87+ - Set-Content .env 'FILE_SYSTEM_SEPARATOR="/"' # Sets the file system separator environment variable for Linux.
88+ - docker-compose up -d # Sets up and starts the docker container via docker-compose started in background.
89+ - npm run test_integration # Launches the integration testing.
9090
9191# Application deployment
9292
@@ -119,4 +119,4 @@ cleaning:
119119 - docker rmi $(docker images -a -q) # Removes ALL the images on the host machine runner.
120120 - New-Item -Path ../ -Name "empty" -ItemType "directory" # Creates an empty folder for file deletion.
121121 - robocopy ../empty ./ /MIR; if ($lastexitcode -lt 8) { $global:LASTEXITCODE = $null } # Removes ALL the source files on the host machine runner.
122- - rm ..\empty\
122+ - rm ..\empty\
0 commit comments