Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Project Page Project Page
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • m4lab_tv1
  • Project PageProject Page
  • Merge requests
  • !84

prepare deployment

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Wolfgang Knopki requested to merge testing into prepare_prod 3 years ago
  • Overview 0
  • Commits 106
  • Pipelines 1
  • Changes 28

prepare deployment

  • Wolfgang Knopki @knopkiwg assigned to @knopkiwg 3 years ago

    assigned to @knopkiwg

  • Wolfgang Knopki @knopkiwg merged 3 years ago

    merged

  • Loading
  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • prepare_prod (base)

and
  • latest version
    93f3cc4b
    106 commits, 3 years ago

28 files
+ 11857
- 1652

    Preferences

    File browser
    Compare changes
__t‎est‎
gitlab.‎test.ts‎ +12 -0
methods‎.test.ts‎ +16 -0
con‎fig‎
conf‎ig.ts‎ +41 -0
dbco‎nn.ts‎ +39 -0
func‎tions‎
gitl‎ab.ts‎ +4 -4
helpe‎rs.ts‎ +2 -2
metho‎ds.ts‎ +39 -0
rou‎tes‎
mail‎er.js‎ +0 -31
metho‎ds.js‎ +0 -72
proje‎ct.ts‎ +229 -0
routes-p‎roject.js‎ +0 -362
views/DE‎/project‎
addProjectO‎verview.pug‎ +0 -124
mailingl‎ists.pug‎ +21 -16
manageProjec‎tOverview.pug‎ +0 -124
pagesL‎ist.pug‎ +69 -26
project-sim‎plified.pug‎ +4 -33
projec‎t.html‎ +1 -6
project‎List.pug‎ +72 -26
projectOv‎erview.pug‎ +3 -1
projec‎ts.pug‎ +0 -91
projec‎ts_.pug‎ +0 -51
.giti‎gnore‎ +2 -3
.gitlab‎-ci.yml‎ +7 -3
app‎.ts‎ +88 -0
jest.co‎nfig.js‎ +4 -0
package-‎lock.json‎ +11168 -665
packag‎e.json‎ +24 -12
tsconf‎ig.json‎ +12 -0
__test/gitlab.test.ts 0 → 100644
+ 12
- 0
  • View file @ 93f3cc4b

  • Edit in single-file editor

  • Open in Web IDE

const gitlab = require('../functions/gitlab')
describe('GitLab API', () => {
test('get all projects', async () => {
let projects = await gitlab.getProjects(10, 0)
expect(projects).not.toBeNull()
})
test('get latest pipeline status of a project', async () => {
let status = await gitlab.getLatestPipelineStatus(81)
expect(status).not.toBeNull()
})
})
\ No newline at end of file
__test/methods.test.ts 0 → 100644
+ 16
- 0
  • View file @ 93f3cc4b

  • Edit in single-file editor

  • Open in Web IDE

const methods = require('../functions/methods')
describe('DB methods', () => {
test('all mailinglists', async () => {
let lists = await methods.getAllMailinglists(0)
expect(lists).not.toBeNull()
})
test('project overview', async () => {
let overview = await methods.getProjectOverviewById(81)
expect(overview).not.toBeNull()
})
test('project images', async () => {
let images = await methods.getProjectImagesById(81)
expect(images).not.toBeNull()
})
})
\ No newline at end of file
config/config.js → config/config.ts
+ 41
- 0
  • View file @ 93f3cc4b

  • Edit in single-file editor

  • Open in Web IDE


@@ -4,16 +4,8 @@ module.exports = {
name: 'Project Page Manager',
port: process.env.PORT || 8888
},
passport: {
strategy: 'saml',
saml: {
path: process.env.SAML_PATH || '/saml/SSO',
entryPoint: process.env.SAML_ENTRY_POINT || 'saml entry URL',
issuer: 'saml issuer URL',
logoutUrl: 'saml Logout URL'
}
},
database: {
host: 'localhost',
user: 'usernamedb', // DB username
password: 'passworddb', // DB password
port: 3306, // MySQL port
@@ -21,15 +13,6 @@ module.exports = {
host_project: 'localhost', // local
dbProject: 'projectdb' // Project DB
},
mailer: {
host: 'mailhost', // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
authUser: 'usernamemail',
authPass: 'passwordmail',
tlsCiphers: 'SSLv3',
from: 'email_from',
},
gitlab: {
token_readWriteProjects: 'putyourtokenhere'
}
@@ -39,16 +22,8 @@ module.exports = {
name: 'Project Page Manager',
port: process.env.PORT || 8888
},
passport: {
strategy: 'saml',
saml: {
path: process.env.SAML_PATH || '/saml/SSO',
entryPoint: process.env.SAML_ENTRY_POINT || 'saml entry URL',
issuer: 'saml issuer URL',
logoutUrl: 'saml Logout URL'
}
},
database: {
host: 'localhost',
user: 'usernamedb', // DB username
password: 'passworddb', // DB password
port: 3306, // MySQL port
@@ -56,15 +31,6 @@ module.exports = {
host_project: 'localhost', // local
dbProject: 'projectdb' // Project DB
},
mailer: {
host: 'mailhost', // hostname
secureConnection: false, // TLS requires secureConnection to be false
port: 587, // port for secure SMTP
authUser: 'usernamemail',
authPass: 'passwordmail',
tlsCiphers: 'SSLv3',
from: 'email_from',
},
gitlab: {
token_readWriteProjects: 'putyourtokenhere'
}
routes/dbconn.js → config/dbconn.ts
+ 39
- 0
  • View file @ 93f3cc4b

  • Edit in single-file editor

  • Open in Web IDE

const mysql = require('mysql')
import mysql from 'mysql2'
var env = process.env.NODE_ENV || 'testing';
const config = require('../config/config')[env]
const config = require('./config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
var userConnection = mysql.createConnection({
const userConnection = mysql.createPool({
host: config.database.host,
user: config.database.user,
password: config.database.password,
port: config.database.port,
database: config.database.dbUser,
multipleStatements: true
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
})
userConnection.connect(function(err) {
if (err) throw err;
})
userConnection.query('USE '+config.database.dbUser)
// user db connection test
userConnection.query('SELECT 1 + 5 AS solution', function (err, rows, fields) {
if (err) throw err
console.log('Solution = ', rows[0].solution)
})
//userConnection.end()
// ==== PROJECT DB CONNECTION ====
var projectConnection = mysql.createConnection({
const projectConnection = mysql.createPool({
host: config.database.host_project,
user: config.database.user,
password: config.database.password,
port: config.database.port,
database: config.database.dbProject
database: config.database.dbProject,
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
})
projectConnection.connect(function(err) {
if (err) throw err;
})
projectConnection.query('USE '+config.database.dbProject)
// projectdb connection test
projectConnection.query('SELECT 10 + 5 AS project', function (err, rows, fields) {
if (err) throw err
console.log('Project = ', rows[0].project)
})
//projectConnection.end()
var connection = {
const connection = {
user: userConnection,
project: projectConnection
}
module.exports = connection
\ No newline at end of file
export = connection
\ No newline at end of file
routes/gitlab.js → functions/gitlab.ts
+ 4
- 4
  • View file @ 93f3cc4b

  • Edit in single-file editor

  • Open in Web IDE


const axios = require('axios')
import axios from 'axios'
var gitlab = {
getProjects: async function(perPage, idAfter) {
getProjects: async function(perPage:number, idAfter:number) {
try {
let projects = await axios({
method: 'get',
@@ -30,7 +30,7 @@ var gitlab = {
data: err}
}
},
getLatestPipelineStatus: async function(projectId) {
getLatestPipelineStatus: async function(projectId:number) {
return axios({
method: 'get',
url: 'https://transfer.hft-stuttgart.de/gitlab/api/v4/projects/'+projectId+'/pipelines'
@@ -40,4 +40,4 @@ var gitlab = {
}
}
module.exports = gitlab
\ No newline at end of file
export = gitlab
\ No newline at end of file
Assignee
Wolfgang Knopki's avatar
Wolfgang Knopki
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
1
1 participant
Wolfgang Knopki
Reference: m4lab_tv1/project-page!84
Source branch: testing

Menu

Explore Projects Groups Snippets

Dies ist die Gitlab-Instanz des Transferportals der Hochschule für Technik Stuttgart. Hier geht es zurück zum Portal