-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add job build and wait log with exit code
add job build and wait log with exit code Log: Change-Id: I8ae90c8649cbbb817e339119f75db54caa6fd0e3
- Loading branch information
guofei
committed
Jul 5, 2024
1 parent
bc17586
commit a50476f
Showing
10 changed files
with
299 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,12 @@ | ||
current: test | ||
jenkins_servers: | ||
- name: yourServer | ||
url: http://localhost:8080/jenkins | ||
username: test | ||
token: 211e3a2f0231198856dceaff96f2v75ce3 | ||
insecureSkipVerify: true | ||
#mirrors: | ||
#- name: default | ||
# url: http://mirrors.jenkins.io/ | ||
# Language context is accept-language for HTTP header, It contains zh-CN/zh-TW/en/en-US/ja and so on | ||
# Goto 'http://localhost:8080/jenkins/me/configure', then you can generate your token. |
This file contains 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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
FROM golang:1.12 AS builder | ||
FROM golang:1.16 AS builder | ||
|
||
WORKDIR /work | ||
COPY . . | ||
RUN ls -hal && make linux | ||
|
||
FROM alpine:3.10 | ||
ENV JOB_NAME "test" | ||
COPY --from=builder /work/bin/linux/jcli /usr/bin/jcli | ||
RUN jcli config generate -i=false > ~/.jenkins-cli.yaml | ||
COPY bin/build.sh /usr/bin/jclih | ||
RUN chmod +x /usr/bin/jclih | ||
|
||
ENTRYPOINT ["jcli"] | ||
ENTRYPOINT ["jclih"] |
This file contains 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
This file contains 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
This file contains 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,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
BIN_PATH=/usr/bin/jcli | ||
|
||
# If we run make directly, any files created on the bind mount | ||
# will have awkward ownership. So we switch to a user with the | ||
# same user and group IDs as source directory. We have to set a | ||
# few things up so that sudo works without complaining later on. | ||
${BIN_PATH} job build ${JOB_NAME} \ | ||
-b --url https://xxxx.com \ | ||
--config-load false \ | ||
--wait -l \ | ||
--logger-level info $* |
This file contains 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
Oops, something went wrong.