Compare commits

...

2 Commits

Author SHA1 Message Date
18eb2d30c5 fix(jenkins): do not trigger emissary-firmware with dirty tag
All checks were successful
arcad/emissary/pipeline/head This commit looks good
2023-04-06 10:30:40 +02:00
06b1235707 fix(module,app): handle hosts without port
Some checks failed
arcad/emissary/pipeline/head There was a failure building this commit
2023-04-06 10:21:52 +02:00
2 changed files with 14 additions and 16 deletions

25
Jenkinsfile vendored
View File

@ -15,9 +15,9 @@ pipeline {
script {
withCredentials([
usernamePassword([
credentialsId: 'forge-jenkins',
usernameVariable: 'GIT_USERNAME',
passwordVariable: 'GIT_PASSWORD'
credentialsId: 'forge-jenkins',
usernameVariable: 'GIT_USERNAME',
passwordVariable: 'GIT_PASSWORD'
])
]) {
sh '''
@ -43,20 +43,21 @@ pipeline {
script {
withCredentials([
usernamePassword([
credentialsId: 'forge-jenkins',
usernameVariable: 'GITEA_RELEASE_USERNAME',
passwordVariable: 'GITEA_RELEASE_PASSWORD'
credentialsId: 'forge-jenkins',
usernameVariable: 'GITEA_RELEASE_USERNAME',
passwordVariable: 'GITEA_RELEASE_PASSWORD'
])
]) {
sh 'make gitea-release'
}
def currentVersion = sh(returnStdout: true, script: 'make full-version').trim()
build(
job: "../emissary-firmware/${env.GIT_BRANCH}",
parameters: [
[$class: 'StringParameterValue', name: 'emissaryRelease', value: currentVersion]
]
)
sh 'git status'
// build(
// job: "../emissary-firmware/${env.GIT_BRANCH}",
// parameters: [
// [$class: 'StringParameterValue', name: 'emissaryRelease', value: currentVersion]
// ]
// )
}
}
}

View File

@ -202,10 +202,7 @@ func unexpectedHostRedirect(hostTarget string, acceptedHostPatterns ...string) f
fn := func(w http.ResponseWriter, r *http.Request) {
host, port, err := net.SplitHostPort(r.Host)
if err != nil {
logger.Error(r.Context(), "could not split host/port", logger.E(errors.WithStack(err)))
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return
host = r.Host
}
matched := wildcard.MatchAny(host, acceptedHostPatterns...)