Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi I am missing "docker tag ${imageTag} ${imageTag} " otherwise I get "denied: requested access to the resource is denied" when trying to docker push #2

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
dcae77c
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
0202272
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
f5d5751
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
70646a0
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
c165782
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
a0b2c35
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
e6e3b64
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
a075352
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
0bbce71
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
b67d8e0
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
ef924dc
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
36646b7
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
f613244
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
c08a352
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
772df0a
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
f814369
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
3a003cd
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
83a63d6
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
075dbe1
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
9c7c85f
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
1efbf5d
change Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
0942d6d
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
692b3ad
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
0e9ca21
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
7fab4b1
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
b1f762e
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
6195f2f
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
247f387
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
ab1f101
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
cfd7a4b
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
aa6d06b
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
55a1dbb
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
0282c6d
fixes in Jenkispipeline-4
ugurkocak1980 Dec 27, 2023
cd26adc
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
440ab2a
Update Jenkinsfile-4
ugurkocak1980 Dec 27, 2023
cb3b2c8
adding latest to url
ugurkocak1980 Jan 8, 2024
c5bb5b2
fix url
ugurkocak1980 Jan 8, 2024
1e6b83d
udacity: credentials modfied
Aug 26, 2024
ea28ee5
add src folder
Aug 28, 2024
1650857
add src
Aug 28, 2024
f9a920c
mergeMerge branch 'main' of https://github.com/ugurkocak1980/jenkins-…
Aug 28, 2024
698b66a
delete src
Aug 28, 2024
f793ebb
add Jenkinsfile
Aug 28, 2024
239d9f4
add gitignore file
Aug 28, 2024
fb5ce4f
add cloundbeed png
Aug 28, 2024
6f62bce
rm cloudbees.png
Aug 29, 2024
9cc0661
changed line 22
Aug 30, 2024
30b28f2
modify url
Sep 1, 2024
5973f67
revert
Sep 1, 2024
7a448fe
fix pipeline
Sep 1, 2024
01ba1f1
fixed pipeline
Sep 1, 2024
e905f05
fix3
Sep 1, 2024
8e32a97
change line 2 imageTag
Sep 2, 2024
07f6d58
agent label docker
Sep 2, 2024
1a5ef6c
next try
Sep 2, 2024
3349d77
label docker
Sep 2, 2024
be33d3f
agent any
Sep 3, 2024
1354765
add docker stage
Sep 6, 2024
3160401
entfernde stage
Sep 6, 2024
66443be
test agent docker
Sep 6, 2024
1de75eb
agent any
Sep 6, 2024
e8df60f
url modified
Sep 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.DS_Store
14 changes: 7 additions & 7 deletions Jenkinsfile-4
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
def timeInMillis = currentBuild.timeInMillis
def imageTag = "darinpope/alpine:" + timeInMillis
def imageTag = "ugurkocak1980/alpine" + timeInMillis
@Library("shared-library") _
pipeline {
agent any
environment {
DH_CREDS=credentials('dh-creds')
UK_CREDS=credentials('uk-creds')
}
stages {
stage('Hello') {
steps {
sh """
echo "FROM alpine:latest" > Dockerfile
docker build -t ${imageTag} .
docker build -t ${imageTag} .
"""
sh '''
echo $DH_CREDS_PSW | docker login --username=$DH_CREDS_USR --password-stdin
'''
echo $UK_CREDS_PSW | docker login --username=$UK_CREDS_USR --password-stdin
'''
script {
def sha256 = sh(returnStdout: true, script:"docker push ${imageTag} | grep sha256 | awk -F':' '{print \$4}' | awk '{print \$1}'").trim()
echo sha256
def url = "https://hub.docker.com/layers/" + env.DH_CREDS_USR + "/alpine/" + timeInMillis + "/images/sha256-" + sha256 + "?context=explore"
def url = "https://hub.docker.com/layers/" + env.UK_CREDS_USR + "/alpine" + timeInMillis + "/latest/images/sha256-" + sha256 + "?context=explore"
addSidebarLink(url:url,text:"Image on Docker Hub",icon:"star.gif")
}
}
Expand All @@ -30,4 +30,4 @@ pipeline {
}
}
}
}
}