-
Notifications
You must be signed in to change notification settings - Fork 0
License
robertonav20/dagger-modules
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
## Initialize dagger init --sdk=java --source=./ --name=java-build dagger develop --sdk=java dagger init --sdk=typescript --source=./ --name=java-build dagger develop --sdk=typescript ## How to Use ## Local ## Useful commands dagger -m ../modules/java/java-build call publish \ --source=./ \ --imageRepository ttl.sh \ --imageName hello-world \ --imageVersion 1.0.0 export _EXPERIMENTAL_DAGGER_RUNNER_HOST="tcp://localhost:1234" && export NEXUS_USERNAME=admin && export NEXUS_PASSWORD=admin123 && dagger call -vvv -m ../modules/java/java-build publish \ --source=./ \ --username $NEXUS_USERNAME \ --password env:NEXUS_PASSWORD \ --artifact-repository "http://nexus.local/repository/maven-releases" \ --artifact-id "hello-world" \ --artifact-version 1.0.0 \ --image-repository "nexus.local" \ --image-name "docker-repo/hello-world" \ --image-version 1.0.0 dagger -m ../modules/typescript/java-build call publish \ --source=./ \ --imageRepository ttl.sh \ --imageName hello-world \ --imageVersion 1.0.0 export _EXPERIMENTAL_DAGGER_RUNNER_HOST="tcp://localhost:1234" && export NEXUS_USERNAME=admin && export NEXUS_PASSWORD=admin123 && dagger call -vvv -m ../modules/typescript/java-build publish \ --source=./ \ --username $NEXUS_USERNAME \ --password env:NEXUS_PASSWORD \ --artifact-repository "http://nexus.local/repository/maven-releases" \ --artifact-id "hello-world" \ --artifact-version 1.0.0 \ --image-repository "nexus.local" \ --image-name "docker-repo/hello-world" \ --image-version 1.0.0 ## Docker ### Add repos to gitea 1. Initialize Gitea 2. Run script initialize-repo.sh ### Nexus Configuration ### Cenerate certificate nexus docker (NGINX) 1. openssl req -x509 -nodes -newkey rsa:4096 -days 365 -subj "/CN=nexus.local" -addext "subjectAltName = DNS:DNS:nexus.local, IP:127.0.0.1" -keyout certs/nexus.key -out certs/nexus.cert 2. Insert into nginx/certs folder ### Nexus 1. Discover password with docker exec -it nexus cat /nexus-data/admin.password 2. Create admin user with admin123 password 3. Create a docker proxy named docker-proxy with port 8082 anynonymous pull true and docker-hub (http://registry-1.docker.io) as remote storage 4. Create a docker hosted named docker-repo with port 8083 and anynonymous pull true 5. Enable "Docker Bearer Token Realm" in "Security -> Realms" Follow this guide in case is not clear https://medium.com/@sametustaoglu/nexus-proxy-docker-repository-with-nginx-and-traefik-018dd6b04f72 ### Jenkins 1. Create token from Jenkins dashboard 2. Execute the following command CRUMB_NEW=$(curl -s 'http://admin:11d138b3904ccfd86709a3d7dd23ebc385@localhost:8090/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)') \ && curl -s -X POST \ -H $CRUMB_NEW \ "http://admin:11d138b3904ccfd86709a3d7dd23ebc385@localhost:8090/createItem?name=hello-world" \ --header "Content-Type: application/xml" \ -d @hello-world.xml ### Nexus docker repo test echo "admin123" | docker login nexus.local --username admin --password-stdin docker pull nexus.local/nginx:latest docker tag nexus.local/nginx:latest nexus.local/docker-repo/nginx:latest docker push nexus.local/docker-repo/nginx:latest docker logout nexus.local
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published